/* =====================================================
   VARIÁVEIS GLOBAIS (IDENTIDADE DO SITE)
===================================================== */

:root {
  --cor-primaria: #f97316;   /* público */
  --cor-secundaria: #16a34a; /* piloto */
  --cor-admin: #717276;      /* admin */

  --cinza-claro: #f5f5f5;
  --cinza-borda: #e5e7eb;
  --cinza-texto: #333;

  --fonte-base: "Arial", sans-serif;
}

/* =====================================================
   RESET / BASE
===================================================== */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--fonte-base);
  background: #ffffff;
  color: var(--cinza-texto);
}

h1, h2, h3 {
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 12px;
}

h1 { font-size: 28px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }

p {
  line-height: 1.6;
}

html, body {
  width: 100%;
  overflow-x: hidden;
}

/* =====================================================
   HEADER / MENU
===================================================== */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: linear-gradient(90deg, #ffffff 80%, var(--cor-primaria));
  border-bottom: 4px solid var(--cor-primaria);
  position: relative;
}

.logo img {
  height: 95px;
}

nav {
  display: flex;
  gap: 18px;
}

nav a {
  text-decoration: none;
  font-weight: 700;
  color: #222;
}

nav a.ativo {
  color: var(--cor-primaria);
  border-bottom: 3px solid var(--cor-primaria);
  padding-bottom: 4px;
}

/* ===== VARIAÇÕES DE MENU ===== */

/* ==============================
   VARIAÇÃO POR ROLE (NOVA LÓGICA)
============================== */

body.role-publico .site-header {
  background: linear-gradient(90deg, #ffffff 80%, var(--cor-primaria));
  border-bottom: 4px solid var(--cor-primaria);
}

body.role-piloto .site-header {
  background: linear-gradient(90deg, #ffffff 80%, var(--cor-secundaria));
  border-bottom: 4px solid var(--cor-secundaria);
}

body.role-admin .site-header {
  background: linear-gradient(90deg, #ffffff 80%, var(--cor-admin));
  border-bottom: 4px solid var(--cor-admin);
}

/* LINK ATIVO */

body.role-publico nav a.ativo {
  color: var(--cor-primaria);
  border-bottom-color: var(--cor-primaria);
}

body.role-piloto nav a.ativo {
  color: var(--cor-secundaria);
  border-bottom-color: var(--cor-secundaria);
}

body.role-admin nav a.ativo {
  color: var(--cor-admin);
  border-bottom-color: var(--cor-admin);
}


/* =====================================================
   MENU RESPONSIVO
===================================================== */

.menu-toggle {
  display: none;
  font-size: 26px;
  background: none;
  border: none;
  cursor: pointer;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  nav {
    display: none;
    flex-direction: column;
    background: #fff;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    border-top: 3px solid var(--cor-primaria);
    z-index: 10;
  }

  nav.aberto {
    display: flex;
  }

  nav a {
    padding: 14px 20px;
    border-bottom: 1px solid #eee;
  }

  .logo img {
    height: 80px; /* 🔥 logo maior no celular */
  }
  
}

/* =====================================================
   CONTAINER
===================================================== */

.container {
  max-width: 1700px;
  margin: 40px auto;
  padding: 0 20px;
}

/* =====================================================
   FORMULÁRIOS
===================================================== */

.form-piloto,
.form-admin,
.form-login {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

label {
  font-weight: 600;
}

input,
select {
  padding: 12px 14px;
  font-size: 16px;
  border: 1px solid var(--cinza-borda);
  border-radius: 6px;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--cor-primaria);
}

/* =====================================================
   BOTÕES
===================================================== */

button,
.btn-primary {
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}

button:hover,
.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--cor-primaria);
  color: #fff;
}

.btn-secundario {
  background: var(--cor-secundaria);
  color: #fff;
}

.btn-admin {
  background: var(--cor-admin);
  color: #fff;
}

/* =====================================================
   TABELAS (GLOBAL)
===================================================== */

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

th,
td {
  padding: 12px;
  border: 1px solid var(--cinza-borda);
  text-align: center;
}

th {
  background: var(--cinza-claro);
  font-weight: 700;
}

.col-pos { width: 80px; }
.col-pontos { width: 120px; font-weight: 700; }
.col-piloto {
  text-align: left;
  padding-left: 14px;
  width: 60%;
}

/* =====================================================
   GALERIA DE PILOTOS
===================================================== */

.galeria-pilotos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.card-piloto {
  padding: 40px;
  border: 2px solid var(--cor-secundaria);
  border-radius: 22px;
  background: #f0fdf4;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card-piloto:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}

.card-piloto img {
  width: 90%;
  height: 145px;
  object-fit: cover;
  border-radius: 8px;
}

/* =====================================================
   PERFIL DO PILOTO
===================================================== */

.perfil-piloto {
  text-align: center;
  margin-bottom: 30px;
}

.foto-piloto-wrapper {
  width: 160px;
  height: 160px;
  margin: 0 auto 20px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--cor-primaria);
}

.foto-piloto-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =====================================================
   ESTATÍSTICAS
===================================================== */

.estatisticas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin: 30px 0;
}

.estatisticas div {
  padding: 14px;
  background: #f9fafb;
  border: 1px solid var(--cinza-borda);
  border-radius: 8px;
  font-weight: 600;
}

/* =====================================================
   HALL DA FAMA
===================================================== */

.hall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.hall-card {
  border: 2px solid #d4af37;
  border-radius: 12px;
  padding: 20px;
  background: #fffaf0;
  text-align: center;
}

.hall-posicao {
  font-size: 28px;
  font-weight: 900;
  color: #d4af37;
}

/* =====================================================
   PORTAL HOME
===================================================== */

.portal {
  max-width: 1500px;
  margin: 40px auto;
  padding: 0 20px;
}

.portal-hero {
  text-align: center;
  margin-bottom: 40px;
}

.portal-hero h1 {
  font-size: clamp(32px, 6vw, 42px);
}

.portal-hero p {
  font-size: 18px;
  opacity: 0.85;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.portal-card {
  padding: 24px;
  border-radius: 14px;
  background: #f9fafb;
  border: 2px solid var(--cinza-borda);
  text-decoration: none;
  color: #111;
  transition: transform 0.2s, box-shadow 0.2s;
}

.portal-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.portal-card.destaque {
  border-color: var(--cor-primaria);
  background: #fff7ed;
}

/* =====================================================
   ANIMAÇÕES LEVES
===================================================== */

.fade-in {
  animation: fade 0.4s ease-in;
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* =====================================================
   DARK MODE
===================================================== */

body.dark {
  background: #0f172a;
  color: #e5e7eb;
}

body.dark .site-header,
body.dark nav {
  background: #020617;
}

body.dark nav a {
  color: #e5e7eb;
}

body.dark nav a.ativo {
  border-bottom-color: var(--cor-primaria);
}

body.dark table th {
  background: #020617;
}

body.dark table td {
  background: #020617;
}

body.dark .portal-card {
  background: #020617;
  border-color: #334155;
  color: #e5e7eb;
}

body.dark .estatisticas div {
  background: #020617;
  border-color: #334155;
}

/* =====================================================
   ÁREA ADMIN – VISUAL EXCLUSIVO
===================================================== */

body.admin {
  background: #f3f4f6;
}

body.admin h1,
body.admin h2 {
  color: var(--cor-admin);
}

body.admin table th {
  background: #e5e7eb;
}

body.admin .btn-primary {
  background: var(--cor-admin);
}

/* =====================================================
    DASHBOARD ADMIN 
	=================================================== */

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.dashboard-card {
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.dashboard-card h3 {
  font-size: 14px;
  margin-bottom: 10px;
  opacity: 0.8;
}

.dashboard-card span {
  font-size: 32px;
  font-weight: 900;
}

.dashboard-card.alerta {
  border-color: #dc2626;
  background: #fef2f2;
  color: #991b1b;
}

.alerta {
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-weight: 600;
}

.alerta.warning {
  background: #fff7ed;
  border: 2px solid #f97316;
  color: #9a3412;
}

.alerta.danger {
  background: #fee2e2;
  border: 2px solid #dc2626;
  color: #7f1d1d;
}

.alerta.info {
  background: #eff6ff;
  border: 2px solid #2563eb;
  color: #1e3a8a;
}

/* =====================================================
   CALENDÁRIO EM CARDS
===================================================== */

.calendario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.calendario-card {
  border: 2px solid var(--cinza-borda);
  border-radius: 14px;
  padding: 20px;
  background: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.calendario-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

.calendario-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.calendario-data {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.calendario-categoria {
  font-size: 14px;
  opacity: 0.85;
  margin-bottom: 10px;
}

/* STATUS */
.status-realizada {
  color: #16a34a;
  font-weight: 700;
}

.status-futura {
  color: #f97316;
  font-weight: 700;
}

/* ADMIN (futuro) */
.calendario-card.admin {
  border-color: var(--cor-admin);
}


/* =====================================================
   DESTAQUE PRÓXIMA ETAPA
===================================================== */

.calendario-card.proxima {
  border: 3px solid var(--cor-primaria);
  background: #fff7ed;
  position: relative;
}

.badge-proxima {
  position: absolute;
  top: -10px;
  right: -10px;
  background: var(--cor-primaria);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}


/* ======================================================
   CONFIRMAÇÃO ETAPA
========================================================*/

.status-confirmado {
  color: var(--cor-secundaria);
  font-weight: 700;
}

.status-inscrito {
  color: #16a34a;
  font-weight: 700;
}

.status-aguardando {
  color: var(--cor-primaria);
  font-weight: 700;
}

.badge-status {
  padding: 4px 10px;
  border-radius: 6px;
}

/* ===== NOTIFICAÇÕES UX ===== */

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 18px;
  border-radius: 8px;
  font-weight: 600;
  color: #fff;
  z-index: 9999;
  box-shadow: 0 8px 20px rgba(0,0,0,.2);
  animation: slideIn .3s ease;
}

.toast.sucesso { background: #16a34a; }
.toast.erro    { background: #dc2626; }
.toast.aviso   { background: #f97316; }

@keyframes slideIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ===== CONTATOS ADMIN ===== */

.contato-nao-lido {
  background: #fff7ed;
  cursor: pointer;
  border-left: 5px solid var(--cor-primaria);
}

.modal-box {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  max-width: 500px;
  margin: 100px auto;
}

#modal-contato {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
}

.badge-nao-lido {
  background: var(--cor-primaria);
  color: #fff;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge-alerta {
  background: #dc2626;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 12px;
  margin-left: 6px;
}


/* ==========================================
  FOOTER
============================================ */
.footer-clean {
  background: #ffffff;
  color: #000000;
  font-family: Arial, sans-serif;
}

.footer-main {
  max-width: 2100px;
  margin: auto;
  padding: 50px 20px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 40px;
}

.footer-logo {
  max-width: 140px;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.6;
}

.footer-nav h4 {
  font-size: 14px;
  color: #000000;
  margin-bottom: 12px;
}

.footer-nav a {
  display: block;
  font-size: 14px;
  color: #000000;
  text-decoration: none;
  margin-bottom: 8px;
}

.footer-nav a:hover {
  color: #000000;
}

.footer-highlight {
  border-left: 2px solid #ffffff;
  padding-left: 20px;
}

.badge {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #ffffff;
  margin-bottom: 6px;
}

.footer-highlight strong {
  display: block;
  font-size: 15px;
  color: #000000;
}

.footer-highlight small {
  display: block;
  font-size: 13px;
  margin: 6px 0 10px;
}

.btn-link {
  font-size: 14px;
  color: #38bdf8;
  text-decoration: none;
  font-weight: bold;
}

.footer-legal {
  border-top: 1px solid #1e293b;
  padding: 15px 20px;
  max-width: 2100px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.legal-links a {
  margin-left: 15px;
  color: #94a3b8;
  text-decoration: none;
}

/* MOBILE */
@media (max-width: 768px) {
  .footer-main {
    grid-template-columns: 1fr;
  }

  .footer-highlight {
    border-left: none;
    border-top: 2px solid #38bdf8;
    padding-top: 15px;
  }

  .footer-legal {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.instagram-icon {
  width: 26px;   /* 🔽 tamanho reduzido */
  height: 26px;
  fill: #94a3b8; /* cinza elegante */
  transition: fill 0.3s ease, transform 0.3s ease;
}

.social-link:hover .instagram-icon {
  fill: #e1306c; /* cor oficial Instagram */
  transform: scale(1.1);
}

/* =====================================================
   HERO SLIDER
===================================================== */

.hero-slider {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto 20px;
  overflow: hidden;
  border-radius: 16px;
}

.hero-slide {
  display: none;
}

.hero-slide.ativo {
  display: block;
}

.hero-slide img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* MOBILE */
@media (max-width: 768px) {
  .hero-slider {
    border-radius: 12px;
  }
}

/* pagamentos */
.pagamento-pix {
  max-width: 520px;
  margin: auto;
}

.box-pix textarea {
  width: 100%;
  height: 90px;
  padding: 10px;
  font-size: 14px;
  margin-bottom: 10px;
}

.box-recebedor {
  margin-top: 20px;
  font-size: 14px;
  background: #f9f9f9;
  padding: 12px;
  border-radius: 6px;
}

/* ==============================
   QR CODE – VISUAL PREMIUM
============================== */

.qr-wrapper {
  display: flex;
  justify-content: center;
  margin: 24px 0;
}

.qr-box {
  position: relative;
  padding: 16px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}

/* container do QR */
#qrcode {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* garante centralização do canvas/img gerado */
#qrcode img,
#qrcode canvas {
  display: block;
  margin: auto;
}

/* LOGO CENTRAL */
.qr-logo {
  position: absolute;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  inset: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 6px 16px rgba(0,0,0,0.18);
}

.qr-logo img {
  width: 34px;
  height: auto;
}

/* MOBILE */
@media (max-width: 480px) {
  .qr-box {
    padding: 12px;
  }
  .qr-logo {
    width: 44px;
    height: 44px;
  }
  .qr-logo img {
    width: 28px;
  }
}

/* ==============================
   INFORMAÇÕES PIX
============================== */

.pix-info {
  margin-top: 18px;
  padding: 14px;
  background: #f9fafb;
  border: 1px solid var(--cinza-borda);
  border-radius: 10px;
  font-size: 14px;
  text-align: left;
}

.pix-info p {
  margin: 6px 0;
}

.pix-info strong {
  color: #111;
}

/* MOBILE */
@media (max-width: 480px) {
  .pix-info {
    font-size: 13px;
  }
}


.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-box {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  width: 100%;
  max-width: 420px;
}


/* =====================================================
   CLASSIFICAÇÃO GERAL – AJUSTE EXCLUSIVO DA TABELA
   (NÃO AFETA NENHUMA OUTRA PÁGINA)
===================================================== */

#tabela-classificacao {
  font-size: 13px;        /* 🔽 reduz largura total */
  white-space: nowrap;    /* evita quebra de linha */
}

#tabela-classificacao th,
#tabela-classificacao td {
  padding: 2px 3px;       /* 🔽 células mais compactas */
  text-align: center;
}

#tabela-classificacao th {
  font-size: 11px;
  font-weight: 600;
}

#tabela-classificacao td strong {
  font-size: 14px;
}

#tabela-classificacao .total strong {
  font-size: 15px;        /* mantém destaque do total */
}


/* =====================================================
   LEGENDA – CLASSIFICAÇÃO GERAL
   (EXCLUSIVA DESTA PÁGINA)
===================================================== */

.legenda-classificacao {
  margin-top: 12px;
  font-size: 13px;
  color: #555;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.legenda-classificacao span {
  white-space: nowrap;
}

.legenda-classificacao strong {
  color: #111;
}

/* =============================
     BARRA DE PESQUISA (YOUTUBE)
  ============================= */

  .video-search {
    max-width: 520px;
    margin: 20px auto 10px;
  }

  .video-search input {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    outline: none;
  }

  .video-search input:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249,115,22,.15);
  }


/* ============================
   GRID DE LARGADA - ADMIN
============================ */

.grid-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.grid-header h1 {
  font-size: 24px;
  margin: 0;
}

.grid-section-title {
  margin-top: 30px;
  color: #0a7c3a;
  font-weight: 700;
  font-size: 18px;
}

.grid-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 25px;
  font-size: 13px;
}

.grid-table th,
.grid-table td {
  border: 1px solid #cfcfcf;
  padding: 6px;
  text-align: center;
}

.grid-table th {
  background: #f5f5f5;
  font-weight: 600;
}

.grid-table td.col-piloto {
  text-align: left;
}

.btn-print {
  background: #f97316;
  color: #fff;
  padding: 10px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
}

/* ============================
   IMPRESSÃO (PDF)
============================ */

@media print {

  body {
    background: #fff;
  }

  .btn-print {
    display: none;
  }

  .container {
    width: 100%;
    margin: 0;
  }

  .grid-table {
    font-size: 12px;
  }
}


/* =========================
   CABEÇALHO GRID OFICIAL
========================= */

.grid-header-oficial {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.grid-header-left h2 {
  color: #f26522;
  font-size: 22px;
  font-weight: bold;
}

.logo-grid {
  height: 60px;
}

/* =========================
   IMPRESSÃO
========================= */

@media print {

  .no-print,
  select,
  button,
  .form-piloto {
    display: none !important;
  }

  body {
    background: white;
  }

  .grid-table {
    page-break-inside: avoid;
  }
}


.grid-subinfo {
  margin-top: 6px;
  font-size: 14px;
  color: #333;
  font-weight: normal;
}


@media print {

  body {
    background: white;
  }

  /* Remove menu e footer */
  [data-include="menu"],
  [data-include="footer"] {
    display: none !important;
  }

  /* Remove botões */
  .btn-print,
  .btn-admin,
  #btn-gerar-grid,
  #btn-carregar,
  .no-print {
    display: none !important;
  }

  /* Ajustar margens para PDF */
  @page {
    margin: 15mm;
  }

}

.titulo-etapa-principal {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.titulo-laranja {
  color: #f26522; /* laranja Win or Wall */
  font-weight: 700;
}

.grid-subinfo {
  margin-top: 6px;
  font-size: 10px;
  color: #333;
  letter-spacing: 0.3px;
}

/* ======================================================
   🎨 DESTACAR COLUNAS LASTRO TOTAL E KART (NORMAL + PDF)
====================================================== */

.grid-table th:nth-last-child(2),
.grid-table td:nth-last-child(2),
.grid-table th:last-child,
.grid-table td:last-child {
  background-color: #f2f2f2;
}

/* FORÇAR COR NO PDF */
@media print {

  .grid-table th:nth-last-child(2),
  .grid-table td:nth-last-child(2),
  .grid-table th:last-child,
  .grid-table td:last-child {
    background-color: #f2f2f2 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

}


/* ======================================================
   🎨 CARD Record (traçados)
====================================================== */

.card-recorde {
  background: #111;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
}

.card-recorde h2 {
  margin-bottom: 8px;
  color: #f5c518;
}

.card-destaque {
  background: linear-gradient(135deg, #1f2937, #111827);
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 25px;
  color: #fff;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.card-destaque h2 {
  color: #f97316; /* laranja do site */
  margin-bottom: 10px;
}

.tempo-destaque {
  font-size: 3rem;
  font-weight: bold;
  color: #facc15; /* amarelo elegante */
  margin: 10px 0;
}


/* ======================================================
   🔥 TABELA PROFISSIONAL RESPONSIVA – WIN OR WALL
====================================================== */

.table-wrapper {
  position: relative;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
}

/* Sombra lateral indicando scroll */
.table-wrapper::after {
  content: "";
  position: sticky;
  right: 0;
  top: 0;
  height: 100%;
  width: 20px;
  pointer-events: none;
  background: linear-gradient(to left, rgba(0,0,0,0.08), transparent);
}

/* Tabela base */
.table-pro {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  background: #fff;
  font-size: 14px;
}

/* Cabeçalho fixo */
.table-pro thead th {
  position: sticky;
  top: 0;
  background: #111827;
  color: #fff;
  padding: 12px;
  text-align: left;
  z-index: 2;
}

/* Células */
.table-pro th,
.table-pro td {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
}

/* Hover elegante */
.table-pro tbody tr:hover {
  background: #f9fafb;
}

/* Zebra leve */
.table-pro tbody tr:nth-child(even) {
  background: #f3f4f6;
}

/* Mobile */
@media (max-width: 768px) {
  .table-pro {
    min-width: 1000px;
    font-size: 13px;
  }
}

/* Ajustar largura das colunas Posição e ADV */
.table-pro th:nth-child(2),
.table-pro td:nth-child(2) {
  width: 90px;
}

.table-pro th:nth-child(5),
.table-pro td:nth-child(5) {
  width: 80px;
}

/* Ajustar largura dos inputs numéricos */
.table-pro td input {
  width: 70px;
}


/* ================================
   HALL DA FAMA - LAYOUT FINAL
================================ */

.tabela-hall {
  width: 100%;
  table-layout: fixed;
}

.col-posicao {
  width: 10%;
  text-align: center;
}

.col-piloto {
  width: 65%;
  text-align: left;
  font-weight: 600;
}

.col-titulos {
  width: 15%;
  text-align: center;
}


/* ================================
   MEMÓRIAS DO CAMPEONATO
================================ */

.memoria-intro{
max-width:800px;
margin-bottom:40px;
color:#555;
line-height:1.6;
}

.memoria-timeline{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
gap:20px;
}

.memoria-temporada{
background:#fff;
border:1px solid #ddd;
border-left:4px solid #ff7a18;
padding:20px;
border-radius:6px;
transition:transform .2s, box-shadow .2s;
}

.memoria-temporada:hover{
transform:translateY(-3px);
box-shadow:0 6px 18px rgba(0,0,0,0.15);
}

.memoria-temporada h2{
font-size:20px;
margin-bottom:10px;
}

.memoria-temporada p{
color:#666;
margin-bottom:15px;
}

.memoria-link{
font-weight:600;
color:#ff7a18;
text-decoration:none;
}

.memoria-link:hover{
text-decoration:underline;
}

/* =========================
   DASHBOARD
========================= */

.dashboard{
max-width:1200px;
margin:auto;
}

/* CARDS */

.dashboard-cards{
display:grid;
grid-template-columns:120px 120px 120px 1fr;
gap:20px;
margin:30px 0;
}

/* GRID PRINCIPAL */

.dashboard-grid{
display:grid;
grid-template-columns:280px 1fr;
gap:30px;
}

/* PERFIL */

.perfil-card{
background:#fff;
border:1px solid #ddd;
padding:20px;
border-radius:8px;
}

.foto-piloto{
width:100%;
max-width:180px;
border-radius:6px;
margin-bottom:10px;
}

/* RESULTADOS */

.resultados-card{
background:#fff;
border:1px solid #ddd;
padding:20px;
border-radius:8px;
}

/* upload foto */

.perfil-card input[type="file"]{
width:100%;
max-width:100%;
margin-top:10px;
}

.perfil-card button{
margin-top:8px;
}

/* evitar quebra feia */

.perfil-card{
overflow:hidden;
}

/* RESPONSIVO */

@media (max-width:900px){

.dashboard-grid{
grid-template-columns:1fr;
}

.dashboard-cards{
grid-template-columns:1fr 1fr;
}

}

/* upload de foto */

.perfil-card input[type="file"]{
display:block;
width:100%;
margin-top:10px;
}

.perfil-card input[type="file"]::file-selector-button{
display:block;
margin-bottom:6px;
}

/* =====================================================
   TRAÇADOS – PÁGINA PÚBLICA
===================================================== */

.tracados-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
  gap: 24px;
  margin-top: 30px;
}

/* CARD */

.tracado-card {
  border: 1px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  background: #fff;
}

.tracado-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 18px rgba(0,0,0,0.15);
}

.tracado-card img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.tracado-card h3 {
  padding: 12px;
  font-size: 16px;
  text-align: center;
}

/* MODAL FULLSCREEN */

.modal-tracado {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-tracado img {
  max-width: 95%;
  max-height: 95%;
  border-radius: 6px;
}

.filtros-tracados{
display:flex;
gap:15px;
margin:20px 0;
flex-wrap:wrap;
}

.filtros-tracados select{
padding:8px 12px;
border-radius:6px;
border:1px solid #ccc;
font-size:14px;
}

.tracado-card img{
  width:100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

/* mobile */

@media (max-width:768px){

  .tracado-card img{
    aspect-ratio:auto;
    height:auto;
    object-fit:contain;
  }

}

/* =========================
   TRAÇADOS MOBILE
========================= */

@media (max-width:768px){

  .tracado-card{
    overflow: visible;
  }

  .tracado-card img{
    width:100%;
    height:auto !important;
    object-fit:contain !important;
  }

}

@media (max-width:768px){

  .tracados-grid{
    grid-template-columns: 1fr;
  }

}