/* =========================
   RESET GLOBAL
========================= */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background: #EEF4FF;
  color: #333;
}

/* =========================
   HEADER / MENU BASE
========================= */
.site-header {
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 1800px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

/* =========================
   LOGO COM BORDA E ELEVAÇÃO
========================= */
.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 84px;              /* 🔥 logo maior */
  width: auto;
  min-width: 64px;
  padding: 8px;
  border-radius: 16px;
  background: #ffffff;
  border: 3px solid transparent;
  box-shadow: 0 8px 18px rgba(0,0,0,0.22);
  display: block;
}

/* =========================
   MENU
========================= */
.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  height: 40px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

/* BOTÃO DO MENU */
.main-nav .btn-area {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  border-radius: 6px;
  font-weight: 600;
  white-space: nowrap;
}

/* =========================
   MENU PÚBLICO
========================= */
body:not(.role-admin):not(.role-piloto) .site-header {
  background: #0A3D91;
}

body:not(.role-admin):not(.role-piloto) .main-nav a {
  color: #ffffff;
}

body:not(.role-admin):not(.role-piloto) .btn-area {
  background: #1E90FF;
  color: #ffffff;
}

/* =========================
   BANNER HOME
========================= */
.banner {
  min-height: 420px;
  background:
    linear-gradient(rgba(10,61,145,.35), rgba(10,61,145,.45)),
    url('../assets/banner.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
}

.banner-content {
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 24px;
  color: #ffffff;
}

.banner h1 {
  font-size: 42px;
  margin-bottom: 10px;
}

.banner p {
  font-size: 18px;
  margin-bottom: 28px;
}

/* =========================
   HOME CONTEÚDO
========================= */
.home-wrapper {
  max-width: 1800px;
  margin: 0 auto;
  padding: 70px 24px 80px;
}

.home-highlight {
  background: #ffffff;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
  margin-bottom: 60px;
}

.home-section {
  margin-bottom: 70px;
}

.home-section.alt {
  background: #f8fbff;
  padding: 40px;
  border-radius: 16px;
}

.home-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.home-card {
  background: #ffffff;
  padding: 26px;
  border-radius: 14px;
  text-decoration: none;
  color: #333333;
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

/* =========================
   LOGIN / AUTH
========================= */
.auth-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #EEF4FF, #DCE9FF);
}

.auth-content {
  min-height: calc(100vh - 120px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 16px;
}

.auth-box {
  background: #ffffff;
  width: 100%;
  max-width: 960px;
  padding: 36px 32px;
  border-radius: 18px;
  box-shadow: 0 20px 45px rgba(0,0,0,0.18);
}

.auth-box h2 {
  text-align: center;
  color: #0A3D91;
  margin-bottom: 28px;
  font-size: 22px;
  font-weight: 600;
}

/* =========================
   LOGIN – CAMPOS
========================= */
.auth-box form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-box .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-box label {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.auth-box input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  font-size: 15px;
  border-radius: 8px;
  border: 1px solid #cfd8ea;
  background: #f9fbff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-box input:focus {
  outline: none;
  border-color: #0A3D91;
  box-shadow: 0 0 0 3px rgba(10, 61, 145, 0.15);
  background: #ffffff;
}

/* =========================
   BOTÃO ENTRAR (PADRÃO FBKA)
========================= */
.auth-box .btn-primary {
  height: 48px;
  margin-top: 10px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px;
  background: #0A3D91;     /* mesmo azul do topo */
  color: #ffffff;          /* texto branco */
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(10, 61, 145, 0.35);
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.auth-box .btn-primary:hover {
  background: #08306f;
  box-shadow: 0 10px 22px rgba(10, 61, 145, 0.45);
}

.auth-box .btn-primary:active {
  transform: scale(0.97);
}

/* Mensagem de erro */
.form-message {
  margin-top: 8px;
  font-size: 14px;
  color: #d32f2f;
  text-align: center;
}

/* =========================
   LOGIN – MENU AJUSTES
========================= */
body.auth-page .main-nav {
  display: none;
}

body.auth-page .header-container {
  justify-content: center;
}

/* =========================
   RESPONSIVO
========================= */
@media (max-width: 768px) {
  .banner {
    min-height: 280px;
  }

  .banner h1 {
    font-size: 28px;
  }

  .home-wrapper {
    padding: 50px 16px;
  }

  .header-container {
    flex-direction: column;
    gap: 16px;
  }

  /* 🔥 LOGO MAIOR NO MOBILE */
  .logo img {
    height: 112px;        /* antes 58px */
    padding: 10px;
    border-radius: 18px;
  }
}

/* =========================
   TEMA PILOTO (ÁREA LOGADA)
========================= */
body.role-piloto {
  background: #FFF8D6; /* amarelo claro */
}

/* MENU DO PILOTO */
body.role-piloto .site-header {
  background: #FFD400; /* amarelo principal */
  border-bottom: 1px solid #e6c200;
}

body.role-piloto .main-nav a {
  color: #5a4a00;
}

body.role-piloto .main-nav a:hover {
  text-decoration: underline;
}

/* BOTÃO DO MENU */
body.role-piloto .main-nav .btn-area {
  background: #0A3D91;
  color: #ffffff;
}

/* LOGO COM BORDA AMARELA */
body.role-piloto .logo img {
  border-color: #FFD400;
}

/* =========================
   CONTEÚDO DO DASHBOARD PILOTO
========================= */
body.role-piloto main {
  padding-top: 20px;
}

/* Cards do piloto */
body.role-piloto .portal-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
}

body.role-piloto .portal-card h3 {
  color: #0A3D91;
}

/* Card destaque */
body.role-piloto .portal-card.destaque {
  border: 3px solid #FFD400;
  background: linear-gradient(135deg, #ffffff, #fff6cc);
}

/* =========================
   DASHBOARD PILOTO – AJUSTE FINO
========================= */

/* Container geral */
.dashboard-piloto {
  max-width: 1800px; /* levemente menor que o site */
  margin: 32px auto 70px;
  padding: 0 24px;
}

/* Cabeçalho */
.dashboard-header {
  margin-bottom: 24px;
}

.dashboard-header h2 {
  font-size: 24px;
}

/* Grid mais compacto */
body.role-piloto .portal-grid {
  gap: 18px; /* antes estava grande demais */
}

/* Cards */
body.role-piloto .portal-card {
  padding: 22px 26px;   /* ↓ altura */
  min-height: 110px;    /* padroniza tamanho */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Títulos dos cards */
body.role-piloto .portal-card h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

/* Conteúdo */
body.role-piloto .portal-card p {
  font-size: 18px;
  margin: 0;
}

/* Card destaque (Minha Categoria) */
body.role-piloto .portal-card.destaque {
  padding: 24px 28px;
  min-height: 120px;
}

/* Mobile */
@media (max-width: 768px) {
  .dashboard-piloto {
    margin: 24px auto 60px;
  }

  body.role-piloto .portal-card {
    min-height: auto;
  }
}

/* =========================
   DASHBOARD PILOTO – GRID REAL
========================= */

body.role-piloto .portal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
}

/* Responsivo */
@media (max-width: 900px) {
  body.role-piloto .portal-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   TEMA ADMIN (ÁREA LOGADA)
========================= */

body.role-admin {
  background: #EAF6EF; /* verde claro */
}

/* MENU ADMIN */
body.role-admin .site-header {
  background: #1E7F4D; /* verde principal */
  border-bottom: 1px solid #16643d;
}

body.role-admin .main-nav a {
  color: #ffffff;
}

body.role-admin .main-nav a:hover {
  text-decoration: underline;
}

/* BOTÃO SAIR */
body.role-admin .main-nav .btn-area {
  background: #ffffff;
  color: #1E7F4D;
  border: none;
  font-weight: 600;
}

/* LOGO COM BORDA VERDE */
body.role-admin .logo img {
  border-color: #1E7F4D;
}

/* =========================
   DASHBOARD ADMIN
========================= */

body.role-admin main {
  padding-top: 20px;
}

.admin-dashboard {
  max-width: 1800px;
  margin: 32px auto 70px;
  padding: 0 24px;
}

/* Grid */
body.role-admin .portal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-top: 24px;
}

/* Cards */
body.role-admin .portal-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 26px 30px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
}

body.role-admin .portal-card h3 {
  color: #1E7F4D;
  margin-bottom: 8px;
}

body.role-admin .portal-card p {
  font-size: 15px;
  margin: 0;
}

/* Card destaque */
body.role-admin .portal-card.destaque {
  border: 3px solid #1E7F4D;
  background: linear-gradient(135deg, #ffffff, #e7f5ec);
}

/* Responsivo */
@media (max-width: 900px) {
  body.role-admin .portal-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   FOOTER FBKA
========================= */
.footer {
  background: #0A3D91;
  color: #ffffff;
  margin-top: 80px;
}

.footer-clean {
  font-size: 14px;
}

.footer-main {
  max-width: 1800px;
  margin: 0 auto;
  padding: 60px 24px 40px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr auto;
  gap: 32px;
}

/* Marca */
.footer-brand p {
  margin-top: 14px;
  line-height: 1.6;
  color: #dbe6ff;
}

.footer-logo {
  height: 60px;
  background: #ffffff;
  padding: 10px;
  border-radius: 14px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.25);
}

/* Navegação */
.footer-nav h4 {
  margin-bottom: 12px;
  font-size: 15px;
  color: #ffffff;
}

.footer-nav a {
  display: block;
  color: #dbe6ff;
  text-decoration: none;
  margin-bottom: 6px;
}

.footer-nav a:hover {
  text-decoration: underline;
}

/* Destaque */
.footer-highlight {
  background: rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 20px;
}

.footer-highlight .badge {
  display: inline-block;
  background: #FFD400;
  color: #5a4a00;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 600;
  margin-bottom: 10px;
}

.footer-highlight strong {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
}

.footer-highlight small {
  display: block;
  margin-bottom: 10px;
  color: #f0f0f0;
}

.btn-link {
  color: #FFD400;
  font-weight: 600;
  text-decoration: none;
}

.btn-link:hover {
  text-decoration: underline;
}

/* Social */
.footer-social {
  display: flex;
  align-items: flex-start;
}

.instagram-icon {
  width: 26px;
  height: 26px;
  fill: #ffffff;
}

.social-link:hover .instagram-icon {
  fill: #FFD400;
}

/* Legal */
.footer-legal {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #dbe6ff;
}

.footer-legal a {
  color: #dbe6ff;
  margin-left: 14px;
  text-decoration: none;
}

.footer-legal a:hover {
  text-decoration: underline;
}

/* Responsivo */
@media (max-width: 900px) {
  .footer-main {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-legal {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

/* =========================
   MENU RESPONSIVO (MOBILE)
========================= */

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  color: inherit;
}

/* MOBILE */
@media (max-width: 768px) {

  .header-container {
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-top: 16px;
    display: none;
  }

  .main-nav a,
  .main-nav .btn-area {
    height: auto;
    padding: 12px 16px;
    font-size: 16px;
    border-radius: 8px;
  }

  /* MENU ABERTO */
  .main-nav.open {
    display: flex;
  }
}

/* =========================
   LAYOUT COM FOOTER FIXO NO FUNDO
========================= */

html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}

/* Conteúdo principal ocupa o espaço restante */
main {
  flex: 1;
}

/* =========================
   AJUSTE SEGURO – PÁGINAS DE FORMULÁRIO
   (Cadastro / Inscrição / Auth)
========================= */

body.form-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Garante que o conteúdo não fique atrás do menu */
body.form-page .auth-content {
  flex: 1;
  padding-top: 160px; /* espaço seguro para header + logo grande */
  padding-bottom: 80px; /* respiro antes do footer */
}

/* Centralização correta do box */
body.form-page .auth-box {
  margin: 0 auto;
}

@media (max-width: 768px) {
  body.form-page .auth-content {
    padding-top: 180px; /* menu + logo mobile maior */
    padding-bottom: 60px;
  }
}

/* =========================
   FIX DEFINITIVO – FORMULÁRIOS
========================= */

:root {
  --menu-height: 140px; /* fallback */
}

/* Apenas páginas de formulário */
body.form-page main {
  padding-top: calc(var(--menu-height) + 24px);
  padding-bottom: 80px;
}

/* Garante que footer fique no fundo */
body.form-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.form-page main {
  flex: 1;
}

/* =========================
   CORREÇÃO DEFINITIVA – PÁGINAS AUTH (CADASTRO / LOGIN)
   NÃO AFETA OUTRAS PÁGINAS
========================= */

body.auth-page {
  display: flex;
  flex-direction: column;
}

/* O main deixa de centralizar verticalmente */
body.auth-page .auth-content {
  flex: 1;
  min-height: unset;
  align-items: flex-start;
  padding-top: 24px;   /* 🔥 ajuste fino aqui */
  padding-bottom: 40px;
}

/* Garante que o formulário nunca fique colado no menu */
body.auth-page .auth-box {
  margin-top: 0;
}

/* Footer sempre abaixo do conteúdo */
body.auth-page .footer {
  margin-top: auto;
}

/* =========================
   FORM – SEÇÃO CONVITE
========================= */

.form-section {
  font-size: 16px;
  font-weight: 600;
  color: #0A3D91;
  margin-top: 26px;
  margin-bottom: 10px;
}

/* Caixa visual do convite */
.form-section + .form-group,
.form-section + .form-group + .form-checkbox {
  background: #f8fbff;
  padding: 18px 20px;
  border-radius: 12px;
  border: 1px solid #dce6f7;
}

/* Checkbox alinhado */
.form-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #0A3D91;
  cursor: pointer;
}

.form-checkbox label {
  font-size: 14px;
  cursor: pointer;
}

/* =========================
   HOME – LAYOUT PRINCIPAL
========================= */

.home-main-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  margin-bottom: 70px;
}

.home-left,
.home-right {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Responsivo */
@media (max-width: 900px) {
  .home-main-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   AJUSTE DE ESPAÇAMENTO – HOME GRID
   (somente index)
========================= */

/* Espaço vertical entre os painéis dentro das colunas */
.home-left section,
.home-right section {
  margin-bottom: 16px;
}

/* Destaques precisam de mais respiro */
.home-left .home-highlight,
.home-right .home-highlight {
  margin-top: 12px;
}

/* Ajuste fino para telas maiores */
@media (min-width: 901px) {
  .home-left section,
  .home-right section {
    margin-bottom: 24px;
  }
}

/* =========================
   PÁGINA PÚBLICA – PILOTOS
========================= */

.pilotos-wrapper {
  max-width: 1800px;
  margin: 60px 0 80px;
  padding: 0 60px;
}

.categoria-section .pilotos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 40px;
  width: 100%;
}

/* mobile */
@media (max-width: 768px) {

  .pilotos-wrapper {
    padding: 0 16px;
  }

  .categoria-section .pilotos-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}


/* =========================
   CARD PILOTO
========================= */

.piloto-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 24px 18px;
  text-align: center;
  box-shadow: 0 10px 26px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.piloto-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 38px rgba(0,0,0,0.12);
}

/* Foto */
.piloto-foto {
  width: 130px;
  height: 130px;
  margin: 0 auto 16px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #0A3D91;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  background: #f3f6ff;
}

.piloto-foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Nome */
.piloto-nome {
  font-weight: 600;
  font-size: 15px;
  color: #333;
}

/* =========================
   RESPONSIVO MOBILE
========================= */

@media (max-width: 768px) {

  .pilotos-wrapper {
    margin: 40px auto 60px;
    padding: 0 16px;
  }

  .pilotos-header h1 {
    font-size: 24px;
  }

  .categoria-section h2 {
    font-size: 18px;
  }

  .pilotos-grid {
    grid-template-columns: 1fr; /* 🔥 1 card por linha */
    gap: 22px;
  }

  .piloto-card {
    padding: 20px;
  }

  .piloto-foto {
    width: 120px;
    height: 120px;
  }

}


/* =========================
   PÁGINA INDIVIDUAL PILOTO
========================= */

.piloto-page {
  max-width: 1800px;
  margin: 60px auto;
  padding: 0 24px;
}

.piloto-header {
  text-align: center;
  margin-bottom: 40px;
}

.piloto-foto-grande {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid #0A3D91;
  margin-bottom: 16px;
}

.piloto-categoria {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  background: #EEF4FF;
  font-weight: 600;
  color: #0A3D91;
}

.piloto-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.piloto-card {
  background: #ffffff;
  padding: 26px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 10px 24px rgba(0,0,0,0.1);
}

.piloto-card h3 {
  margin-bottom: 8px;
  color: #0A3D91;
}

@media (max-width: 768px) {
  .piloto-info {
    grid-template-columns: 1fr;
  }
}

/* ===============================
   GRID ETAPAS
==================================*/

.grid-etapas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 30px;
}

.card-etapa {
  background: #f8f8f8;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  position: relative;
  transition: 0.2s ease;
}

.card-etapa:hover {
  transform: translateY(-4px);
}

.card-etapa.proxima {
  border: 2px solid #ff6a00;
}

.badge-proxima {
  position: absolute;
  top: -12px;
  left: 20px;
  background: #ff6a00;
  color: white;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
}

.status-realizar {
  color: #ff6a00;
  font-weight: 600;
}

.status-realizada {
  color: green;
  font-weight: 600;
}

/* =====================================================
   AJUSTE PROFISSIONAL – PÁGINA CALENDARIO-ETAPA
   NÃO AFETA OUTRAS ÁREAS DO SITE
===================================================== */

/* Container alinhado com header */
.etapa-container {
  max-width: 1800px;
  margin: 40px auto 80px;
  padding: 0 24px;
}

/* =============================
   HEADER ETAPA – VERSÃO CLEAN
============================= */

.etapa-header {
  background: #f4f6fb; /* cinza claro elegante */
  color: #1f3c88;      /* azul institucional FBKA */
  padding: 24px 28px;
  border-radius: 14px;
  margin-bottom: 24px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  border: 1px solid #e3e8f5;
}

.etapa-header h2 {
  font-size: 22px;
  margin-bottom: 10px;
  font-weight: 700;
  color: #0A3D91; /* azul forte para destaque */
  text-transform: uppercase;
  letter-spacing: 1px;
}

.etapa-meta {
  display: flex;
  gap: 24px;
  font-size: 14px;
  color: #444;
}


.etapa-header p {
  margin: 2px 0;
  font-size: 14px;
}

/* =============================
   ESTATÍSTICAS – FORMATO ELEGANTE
============================= */

.etapa-stats {
  background: #ffffff;
  border-radius: 12px;
  padding: 14px 22px;
  margin-bottom: 30px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);

  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}

.stat-card {
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.stat-card h4 {
  font-size: 12px;
  font-weight: 500;
  color: #777;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card span {
  font-size: 18px;
  font-weight: 600;
}

/* Cores discretas */
.stat-card:nth-child(1) span { color: #0A3D91; }
.stat-card:nth-child(2) span { color: #2ecc71; }
.stat-card:nth-child(3) span { color: #f1c40f; }
.stat-card:nth-child(4) span { color: #e74c3c; }

/* =============================
   TABELA – MAIS SOFISTICADA
============================= */

.etapa-lista {
  margin-top: 10px;
}

.tabela-etapa {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0,0,0,0.08);
}

.tabela-etapa thead {
  background: #f3f5f9;
}

.tabela-etapa th {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.tabela-etapa td {
  font-size: 14px;
  color: #444;
}

.tabela-etapa th,
.tabela-etapa td {
  padding: 12px 16px;
}

.tabela-etapa tr {
  border-bottom: 1px solid #eee;
}

.tabela-etapa tr:hover {
  background: #f9fbff;
}

/* =============================
   RESPONSIVO ETAPA
============================= */

@media (max-width: 900px) {

  .etapa-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {

  .etapa-stats {
    grid-template-columns: 1fr;
  }

  .etapa-header {
    padding: 16px;
  }
}


/* =====================================================
   CALENDÁRIO PÚBLICO – AJUSTE DE LAYOUT
   NÃO AFETA OUTRAS PÁGINAS
===================================================== */

body.role-publico .container {
  max-width: 1800px;
  margin: 50px auto 80px;
  padding: 0 24px;
}

/* Título */
body.role-publico h2 {
  font-size: 26px;
  color: #0A3D91;
  margin-bottom: 24px;
}

/* Filtros */
.filtros {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.filtros select {
  height: 42px;
  padding: 0 14px;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid #cfd8ea;
  background: #ffffff;
  min-width: 180px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filtros select:focus {
  outline: none;
  border-color: #0A3D91;
  box-shadow: 0 0 0 3px rgba(10,61,145,0.15);
}

/* Lista de etapas */
#listaEtapas {
  margin-top: 20px;
}

/* Grid de etapas já existente */
.grid-etapas {
  margin-top: 10px;
}

/* Responsivo */
@media (max-width: 768px) {

  body.role-publico .container {
    margin-top: 30px;
  }

  .filtros {
    flex-direction: column;
  }

  .filtros select {
    width: 100%;
  }
}

/* =========================
   DASHBOARD – MÉTRICAS
========================= */

.admin-nome {
  float: right;
  font-size: 16px;
}

.dashboard-metricas {
  margin-top: 20px;
}

.dashboard-grid-admin {
  margin-top: 20px;
}

.metric-number {
  font-size: 28px;
  font-weight: 700;
  color: #1E7F4D;
  margin-top: 8px;
}

/* =========================
   BOTÕES ETAPAS
========================= */

.ativarBtn,
.desativarBtn {
  padding: 6px 12px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.ativarBtn {
  background: #1E7F4D;
  color: #ffffff;
}

.desativarBtn {
  background: #d32f2f;
  color: #ffffff;
}

.ativarBtn:hover {
  background: #16643d;
}

.desativarBtn:hover {
  background: #a52323;
}

/* =========================
   TABELA ADMIN – ETAPAS
   (SOMENTE PÁGINA ETAPAS)
========================= */

/* Permite que a área do card use largura maior apenas aqui */
body.role-admin #tabelaEtapas {
  width: max-content; /* tabela cresce conforme conteúdo */
  min-width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

/* Permite scroll horizontal apenas na tabela */
body.role-admin .portal-card:has(#tabelaEtapas) {
  overflow-x: auto;
}

/* Células */
#tabelaEtapas th,
#tabelaEtapas td {
  padding: 12px 16px;
  text-align: center;
  border-bottom: 1px solid #e2e2e2;
  vertical-align: middle;
  white-space: nowrap; /* impede quebra feia */
}

/* Cabeçalho */
#tabelaEtapas thead {
  background: #f2f7f4;
}

#tabelaEtapas th {
  font-weight: 600;
  color: #1E7F4D;
}

/* Temporada e Categoria */
#tabelaEtapas td:nth-child(1),
#tabelaEtapas td:nth-child(2) {
  text-align: left;
  min-width: 160px;
}

/* Turno */
#tabelaEtapas td:nth-child(3) {
  min-width: 110px;
}

/* Etapa */
#tabelaEtapas td:nth-child(4) {
  min-width: 60px;
}

/* Data */
#tabelaEtapas td:nth-child(5) {
  min-width: 120px;
}

/* Horário */
#tabelaEtapas td:nth-child(6) {
  min-width: 110px;
}

/* Local */
#tabelaEtapas td:nth-child(7) {
  min-width: 200px;
  text-align: left;
}

/* Valor */
#tabelaEtapas td:nth-child(8) {
  min-width: 100px;
  text-align: right;
  font-weight: 600;
}

/* Coringa */
#tabelaEtapas td:nth-child(9) {
  min-width: 80px;
}

/* Status */
#tabelaEtapas td:nth-child(10) {
  min-width: 90px;
  font-weight: 600;
}

/* Ação */
#tabelaEtapas td:last-child {
  min-width: 190px;
}

/* Botões */
#tabelaEtapas td:last-child button {
  margin-right: 8px;
  white-space: nowrap;
}

/* Hover elegante */
#tabelaEtapas tbody tr:hover {
  background: #f9fcfa;
}

/* =========================
   FILTROS – TABELA ETAPAS
========================= */

.filtros-etapas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0 20px;
}

.filtros-etapas select {
  height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid #cfd8ea;
  background: #ffffff;
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s ease;
}

.filtros-etapas select:focus {
  outline: none;
  border-color: #1E7F4D;
  box-shadow: 0 0 0 3px rgba(30,127,77,0.15);
}

/* =========================
   EXPANSÃO REAL – PILOTOS DESKTOP
========================= */

@media (min-width: 1800px) {

  body:not(.role-admin):not(.role-piloto) .pilotos-wrapper {
    max-width: 1800px;
    padding: 0 80px;
  }

  body:not(.role-admin):not(.role-piloto) 
  .categoria-section .pilotos-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 50px;
  }

}

/* ======================================
   WIDE LAYOUT – SOMENTE PÁGINA PILOTOS
====================================== */

body.pagina-wide .header-container,
body.pagina-wide .banner-content,
body.pagina-wide .footer-main {
  max-width: 1800px;
}

body.pagina-wide .pilotos-wrapper {
  max-width: 1800px;
  padding: 0 60px;
}

body.pagina-wide .categoria-section .pilotos-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 40px;
}


/* ======================================
   CENTRAL PAGAMENTOS
====================================== */
.btn-admin{
  background: var(--cor-admin);
  color: black;
  padding: 12px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: 0.2s;
}

.btn-admin:hover{
  opacity: 0.9;
  transform: translateY(-2px);
}