/* =========================================================
   INDEX TECH THEME (index.tech.css) — PREMIUM
   Escopo: apenas index.html quando body/html tiver .theme-tech
   Objetivo: visual exclusivo, moderno, “premium hub”
   ========================================================= */

/* =========================
   TOKENS (TECH PREMIUM)
   ========================= */
:root {
  /* base */
  --bg0: #070a12;
  --bg1: #0a1020;

  /* superfícies */
  --card: rgba(255, 255, 255, 0.06);
  --card2: rgba(255, 255, 255, 0.08);
  --stroke: rgba(255, 255, 255, 0.1);
  --stroke2: rgba(255, 255, 255, 0.16);

  /* texto */
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.64);
  --muted2: rgba(255, 255, 255, 0.48);

  /* acentos */
  --a1: #7c3aed; /* roxo */
  --a2: #22d3ee; /* ciano */
  --a3: #10b981; /* verde */
  --danger: #ef4444;

  /* raio/sombras */
  --radius: 18px;
  --radiusSm: 14px;

  --shadow: 0 18px 55px rgba(0, 0, 0, 0.62);
  --shadowSoft: 0 12px 32px rgba(0, 0, 0, 0.4);

  /* rings */
  --ringCyan: 0 0 0 4px rgba(34, 211, 238, 0.14);
  --ringPurple: 0 0 0 4px rgba(124, 58, 237, 0.14);

  /* tabela */
  --theadBg: rgba(10, 16, 32, 0.94);
  --cellBg: rgba(255, 255, 255, 0.035);
  --cellBgAlt: rgba(255, 255, 255, 0.02);
  --gridLine: rgba(255, 255, 255, 0.08);

  /* sticky (P + E) */
  --sticky-bg: rgba(10, 16, 32, 0.98);
  --sticky-sep: rgba(0, 0, 0, 0.45);
}

/* =========================
   BACKGROUND (glow + grid)
   ========================= */
html,
body {
  background:
    radial-gradient(
      1200px 620px at 14% -10%,
      rgba(124, 58, 237, 0.24),
      transparent 55%
    ),
    radial-gradient(
      980px 560px at 86% 0%,
      rgba(34, 211, 238, 0.18),
      transparent 60%
    ),
    radial-gradient(
      900px 760px at 70% 120%,
      rgba(16, 185, 129, 0.11),
      transparent 60%
    ),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  color: var(--text);
}

/* grid sutil (não pesa performance) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.3;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(
    ellipse at top,
    rgba(0, 0, 0, 1) 18%,
    rgba(0, 0, 0, 0) 72%
  );
}

/* =========================
   TOPBAR (glass premium)
   ========================= */
.theme-tech .topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(10, 16, 32, 0.62);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.theme-tech .topbar .wrap {
  padding-top: 12px;
  padding-bottom: 12px;
}

.theme-tech .topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0 12px;
}

.theme-tech .brand-title {
  font-weight: 950;
  letter-spacing: -0.35px;
  color: var(--text);
}

.theme-tech .brand-sub {
  color: var(--muted);
}

/* =========================
   BOTÕES (neon premium)
   ========================= */
.theme-tech .btn {
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 999px;
  box-shadow: none;
  transition:
    transform 0.1s ease,
    box-shadow 0.14s ease,
    border-color 0.14s ease,
    filter 0.14s ease;
}

.theme-tech .btn:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 211, 238, 0.36);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

.theme-tech .btn:active {
  transform: translateY(0);
  filter: brightness(0.98);
}

.theme-tech .btn--danger {
  border-color: rgba(239, 68, 68, 0.26);
  background: rgba(239, 68, 68, 0.08);
  color: rgba(255, 255, 255, 0.9);
}

.theme-tech .btn--danger:hover {
  border-color: rgba(239, 68, 68, 0.45);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

/* =========================
   NAV PILLS (hub feel)
   ========================= */
.theme-tech .nav-label {
  color: rgba(255, 255, 255, 0.55);
}

.theme-tech #navClubs .tab,
.theme-tech #navViews .tab {
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.88);
  transition:
    transform 0.1s ease,
    box-shadow 0.14s ease,
    border-color 0.14s ease;
}

.theme-tech #navClubs .tab:hover,
.theme-tech #navViews .tab:hover {
  transform: translateY(-1px);
  border-color: rgba(124, 58, 237, 0.36);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.theme-tech #navClubs .tab.active,
.theme-tech #navViews .tab.active {
  border-color: rgba(34, 211, 238, 0.56);
  background: linear-gradient(
    90deg,
    rgba(34, 211, 238, 0.18),
    rgba(124, 58, 237, 0.12)
  );
  box-shadow:
    inset 0 -2px 0 rgba(34, 211, 238, 0.45),
    0 0 0 3px rgba(34, 211, 238, 0.08);
}

/* scrollbar do nav */
.theme-tech #navClubs::-webkit-scrollbar,
.theme-tech #navViews::-webkit-scrollbar {
  height: 8px;
}
.theme-tech #navClubs::-webkit-scrollbar-thumb,
.theme-tech #navViews::-webkit-scrollbar-thumb {
  background: linear-gradient(
    90deg,
    rgba(34, 211, 238, 0.55),
    rgba(124, 58, 237, 0.55)
  );
  border-radius: 999px;
}
.theme-tech #navClubs::-webkit-scrollbar-track,
.theme-tech #navViews::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
}

/* =========================
   CARDS (glass + highlight)
   ========================= */
.theme-tech .card,
.theme-tech .filters.card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.07),
    rgba(255, 255, 255, 0.045)
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
}

/* highlight premium (acabamento) */
.theme-tech .card::before,
.theme-tech .filters.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.02) 30%,
    rgba(255, 255, 255, 0) 60%
  );
}

.theme-tech .card-h {
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-tech #title {
  color: var(--text);
  font-weight: 950;
}

/* =========================
   FILTERS (premium)
   ========================= */
.theme-tech .filters .label {
  color: rgba(255, 255, 255, 0.8) !important;
}
.theme-tech .filters .hint {
  color: rgba(255, 255, 255, 0.64) !important;
}

.theme-tech .chip {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition:
    transform 0.1s ease,
    box-shadow 0.14s ease,
    border-color 0.14s ease;
}
.theme-tech .chip:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 211, 238, 0.32);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.08);
}
.theme-tech .chip.is-on {
  background: linear-gradient(
    90deg,
    rgba(34, 211, 238, 0.85),
    rgba(124, 58, 237, 0.8)
  );
  color: rgba(10, 16, 32, 0.96);
  border: none;
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.18);
}

.theme-tech .seg {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.theme-tech .seg-btn {
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.theme-tech .seg-btn.is-active {
  background: linear-gradient(
    90deg,
    rgba(34, 211, 238, 0.85),
    rgba(124, 58, 237, 0.8)
  );
  color: rgba(10, 16, 32, 0.96);
  border: none;
}

/* =========================
   TABLE WRAP (scroll premium)
   ========================= */
.theme-tech #tableWrap,
.theme-tech .table-wrap {
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.55),
    rgba(15, 23, 42, 0.32)
  );
  padding: 14px;
}

.theme-tech .table-wrap::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.theme-tech .table-wrap::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    rgba(34, 211, 238, 0.55),
    rgba(124, 58, 237, 0.55)
  );
  border-radius: 999px;
}
.theme-tech .table-wrap::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
}

/* =========================
   TABELA (dark premium)
   ========================= */
.theme-tech table.sheet {
  background: transparent;
}

.theme-tech table.sheet th,
.theme-tech table.sheet td {
  border-right: 1px solid var(--gridLine);
  border-bottom: 1px solid var(--gridLine);
  background: var(--cellBg);
  color: rgba(255, 255, 255, 0.9);
}

.theme-tech table.sheet thead th {
  background: var(--theadBg) !important;
  color: rgba(255, 255, 255, 0.9) !important;
  border-bottom: 1px solid rgba(34, 211, 238, 0.22) !important;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 40;
}

.theme-tech table.sheet thead th.th-active {
  background: rgba(34, 211, 238, 0.12) !important;
  box-shadow: inset 0 -2px 0 rgba(34, 211, 238, 0.55);
}

/* zebra + hover */
.theme-tech table.sheet tbody tr:nth-child(even) td {
  background: var(--cellBgAlt);
}
.theme-tech table.sheet tbody tr:hover td {
  background: rgba(34, 211, 238, 0.085);
  transition: background 0.15s ease;
}

/* =========================
   RANKING (P)
   ========================= */
.theme-tech td.rank {
  color: rgba(255, 255, 255, 0.92);
}
.theme-tech td.rank.top1 {
  background: rgba(16, 185, 129, 0.14) !important;
  box-shadow: inset 0 0 14px rgba(16, 185, 129, 0.18);
}
.theme-tech td.rank.top2 {
  background: rgba(34, 211, 238, 0.13) !important;
}
.theme-tech td.rank.top3 {
  background: rgba(124, 58, 237, 0.13) !important;
}

/* =========================
   BADGES NUMÉRICOS (contraste premium)
   ========================= */
.theme-tech td.num .val {
  background: rgba(226, 232, 240, 0.92);
  color: rgba(8, 12, 22, 0.92);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.22),
    0 6px 18px rgba(0, 0, 0, 0.25);
}

.theme-tech td.num .val.is-good {
  background: rgba(16, 185, 129, 0.86);
  color: rgba(3, 20, 12, 0.95);
  box-shadow:
    inset 0 0 0 1px rgba(16, 185, 129, 0.35),
    0 0 0 3px rgba(16, 185, 129, 0.1);
}

.theme-tech td.num .val.is-bad {
  background: rgba(239, 68, 68, 0.84);
  color: rgba(25, 4, 4, 0.95);
  box-shadow:
    inset 0 0 0 1px rgba(239, 68, 68, 0.35),
    0 0 0 3px rgba(239, 68, 68, 0.1);
}

.theme-tech td.num .val.is-mid {
  background: rgba(226, 232, 240, 0.92);
  color: rgba(8, 12, 22, 0.92);
}

/* escudos */
.theme-tech .team-crest {
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.55));
}

/* =========================
   HEATMAP (TECH mais forte)
   ========================= */
.theme-tech .sheet td.hm1 {
  background: rgba(239, 68, 68, 0.48) !important;
}
.theme-tech .sheet td.hm2 {
  background: rgba(239, 68, 68, 0.28) !important;
}
.theme-tech .sheet td.hm3 {
  background: var(--cellBg) !important;
}
.theme-tech .sheet td.hm4 {
  background: rgba(34, 197, 94, 0.28) !important;
}
.theme-tech .sheet td.hm5 {
  background: rgba(34, 197, 94, 0.48) !important;
}

/* =========================
   STICKY (P + E) — DEFINITIVO
   Mantém as larguras/offsets como no seu layout base.
   ========================= */
.theme-tech table.sheet th:nth-child(1),
.theme-tech table.sheet td:nth-child(1),
.theme-tech table.sheet th:nth-child(2),
.theme-tech table.sheet td:nth-child(2) {
  position: sticky !important;
  z-index: 999 !important;
  background: var(--sticky-bg) !important;
  background-image: none !important;
  background-clip: padding-box !important;
}

/* offsets desktop (mantém seu padrão) */
.theme-tech table.sheet th:nth-child(1),
.theme-tech table.sheet td:nth-child(1) {
  left: 0 !important;
}
.theme-tech table.sheet th:nth-child(2),
.theme-tech table.sheet td:nth-child(2) {
  left: 46px !important;
}

/* separador vertical */
.theme-tech table.sheet th:nth-child(2),
.theme-tech table.sheet td:nth-child(2) {
  box-shadow: 10px 0 0 var(--sticky-sep) !important;
}

/* header acima de tudo */
.theme-tech table.sheet thead th {
  z-index: 1000 !important;
}

/* caso heatmap “escape” pras sticky */
.theme-tech table.sheet td:nth-child(1).hm1,
.theme-tech table.sheet td:nth-child(1).hm2,
.theme-tech table.sheet td:nth-child(1).hm3,
.theme-tech table.sheet td:nth-child(1).hm4,
.theme-tech table.sheet td:nth-child(1).hm5,
.theme-tech table.sheet td:nth-child(2).hm1,
.theme-tech table.sheet td:nth-child(2).hm2,
.theme-tech table.sheet td:nth-child(2).hm3,
.theme-tech table.sheet td:nth-child(2).hm4,
.theme-tech table.sheet td:nth-child(2).hm5 {
  background: var(--sticky-bg) !important;
}

/* =========================
   TEXTO DA COLUNA EQUIPE (DESKTOP)
   (sem “sumir” no escuro)
   ========================= */
.theme-tech table.sheet td.text,
.theme-tech table.sheet th.text,
.theme-tech .team-cell,
.theme-tech .team-cell * {
  color: rgba(255, 255, 255, 0.96) !important;
  opacity: 1 !important;
  font-weight: 950 !important;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55);
}

/* =========================
   FOOTER (tech premium)
   ========================= */
.theme-tech .site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 16, 32, 0.62);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, 0.7);
}

.theme-tech .site-footer a {
  color: rgba(34, 211, 238, 0.92);
  text-decoration: none;
}
.theme-tech .site-footer a:hover {
  text-decoration: underline;
}

/* =========================
   MOBILE (ajustes finos)
   Mantém seus padrões de responsividade.
   ========================= */
@media (max-width: 720px) {
  body::before {
    opacity: 0.22;
    background-size: 52px 52px;
  }

  .theme-tech .brand-sub {
    display: none;
  }

  /* sticky backgrounds no mobile */
  .theme-tech table.sheet thead th:nth-child(1),
  .theme-tech table.sheet tbody td:nth-child(1),
  .theme-tech table.sheet thead th:nth-child(2),
  .theme-tech table.sheet tbody td:nth-child(2) {
    background: rgba(10, 16, 32, 0.98) !important;
  }

  /* Coluna E só com escudo + mais estreita (mantém seu padrão) */
  .theme-tech table.sheet th.text,
  .theme-tech table.sheet td.text {
    min-width: 0 !important;
    width: auto !important;
    max-width: none !important;
  }

  .theme-tech table.sheet th:nth-child(1),
  .theme-tech table.sheet td:nth-child(1) {
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    padding-left: 4px !important;
    padding-right: 4px !important;
  }

  .theme-tech table.sheet th:nth-child(2),
  .theme-tech table.sheet td:nth-child(2) {
    width: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    left: 34px !important; /* bate com a largura do P */
  }

  .theme-tech .team-cell {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
  }

  .theme-tech .team-cell span {
    display: none !important;
  }

  .theme-tech .team-crest {
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
  }
}

/* Remove o “buraco” que a seção EQUIPES ocupava */
#navClubs,
.nav-section:has(#navClubs) {
  display: none !important;
}

/* Garante que os botões do topo fiquem bem alinhados */
.top-actions {
  gap: 8px;
}

/* Mobile: se quebrar linha, mantém organizado */
@media (max-width: 720px) {
  .top-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

.theme-tech #navClubs {
  display: none !important;
}

@media (max-width: 720px) {
  .theme-tech table.sheet th:nth-child(1),
  .theme-tech table.sheet td:nth-child(1) {
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
  }

  .theme-tech table.sheet th:nth-child(2),
  .theme-tech table.sheet td:nth-child(2) {
    width: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;
    left: 34px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .theme-tech .team-cell span {
    display: none !important;
  }
  .theme-tech .team-cell {
    justify-content: center !important;
    gap: 0 !important;
  }
  .theme-tech .team-crest {
    width: 18px !important;
    height: 18px !important;
  }
}
