/* === Fixture layout adjustments (no expand parent) === */
.torneo-fixture {
  min-width: 0;
}
.torneo-fixture-scroll {
  width: 100%;
  max-width: 100%;
}
.torneo-fixture-inner {
  flex-wrap: nowrap;
}
/* Fijamos ancho base por columna para evitar que calcule sobre vw y empuje layout */
.tfx-phase {
  flex: 0 0 100px;
  min-width: 100px;
}
@media (max-width: 900px) {
  .tfx-phase {
    flex: 0 0 240px;
    min-width: 240px;
  }
}
@media (max-width: 600px) {
  .tfx-phase {
    flex: 0 0 220px;
    min-width: 220px;
  }
}
/* ===== Defaults seguros (no rompen nada si ya existen) ===== */
/*
 * Normalización root torneos -> tokens nitro-core.
 * Eliminamos variables locales duplicadas en favor de --sn-*.
 * Mantiene "--tr-*" como alias temporal por retrocompatibilidad JS/otros CSS.
 */
:root {
  /* Aliases (LEGACY) */
  --tr-primary: var(--sn-theme-primary, #c90d05);
  --tr-fg: var(--sn-color-text, #d6d6d6);
  /* Superficies locales apuntan a core (permiten override fino si se requiere) */
  --tor-color-surface-0: var(--sn-color-surface, #111);
  --tor-color-surface-1: var(--sn-color-surface-alt, #151515);
  --tor-color-surface-2: var(--sn-color-surface-raised, #1b1b1b);
  --tor-color-border: var(--sn-color-border, #2a2a2a);
  --tor-color-accent: var(--sn-theme-primary, #c90d05);
  --tor-color-pill-bg: var(--sn-color-surface-raised, #1b1b1b);
  --tor-color-pill-border: var(--sn-color-border, #2a2a2a);
  --tor-color-pill-fg: var(--sn-color-text, #d6d6d6);
}

/* ===== Denuncias (casos) ===== */
.tor-denuncias {
  margin-top: 0.6rem;
}
.tor-den-card {
  border: 1px solid #222;
  background: #111;
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.6rem;
}
.tor-den-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.3rem;
}
.tor-den-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.tor-den-date {
  color: #cfcfcf;
  font-size: 0.8rem;
}
.tor-den-body {
  color: #ddd;
  font-size: 0.9rem;
}
.tor-den-ppl {
  margin-top: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.tor-den-line {
  color: #e9e9e9;
}
.tor-den-actions {
  margin-top: 0.5rem;
  text-align: right;
}
.tor-den-actions .tor-btn {
  background: var(
    --sn-grad-theme,
    linear-gradient(
      135deg,
      var(--sn-theme-primary, #c90d05),
      var(--sn-theme-primary-hover, #e01006) 55%
    )
  );
  color: #fff;
  border: 1px solid var(--sn-theme-primary-accent, #9e0a03);
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  transition: filter 0.22s ease, transform 0.16s ease;
}
.tor-den-actions .tor-btn:hover {
  filter: brightness(1.12) saturate(1.05);
}
.tor-den-actions .tor-btn:active {
  transform: translateY(2px);
}
.tor-den-modal .den-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}
.tor-den-modal .den-tabs button {
  background: #1f1f1f;
  color: #d0d0d0;
  border: 1px solid #2c2c2c;
  border-radius: 8px;
  padding: 0.38rem 0.7rem;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.tor-den-modal .den-tabs button:hover {
  background: #262626;
}
.tor-den-modal .den-tabs button.on {
  background: var(
    --sn-grad-theme,
    linear-gradient(
      135deg,
      var(--sn-theme-primary, #c90d05),
      var(--sn-theme-primary-hover, #e01006) 55%
    )
  );
  color: #fff;
  border-color: var(--sn-theme-primary-accent, #9e0a03);
  box-shadow: 0 0 0 1px var(--sn-theme-primary-accent, #9e0a03),
    0 2px 5px rgba(0, 0, 0, 0.45);
}
.den-com-item {
  border-top: 1px solid #222;
  padding: 0.45rem 0;
}
.den-invol {
  margin-bottom: 0.6rem;
}
.den-concepto {
  margin-bottom: 0.6rem;
}
.den-com-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  color: #cfcfcf;
  font-size: 0.85rem;
}
.den-com-text {
  margin-top: 0.3rem;
  color: #e7e7e7;
}
.den-adjuntos .den-adj-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-right: 0.6rem;
  margin-top: 0.25rem;
}
.den-adjuntos a {
  display: inline-block;
  margin-right: 0.6rem;
  margin-top: 0.25rem;
  color: #9ecbff;
}
.den-ok {
  color: #1ec970;
  font-weight: 900;
}
.den-no {
  color: #f05a5a;
  font-weight: 900;
}

/* ===== Nitro Torneos – Reglamento (dark sobrio) ===== */
.tor-reglamento {
  background: #111;
  border: 1px solid #222;
  border-radius: 8px;
  padding: 1rem;
  font-size: 0.9rem;
  color: #ddd;
}
.tor-reglamento-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.8rem;
}
.tor-reglamento-tab {
  background: #1b1b1b;
  border: 1px solid #2a2a2a;
  color: #c8c8c8;
  padding: 0.45rem 0.8rem;
  font-size: 0.72rem;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  line-height: 1;
}
.tor-reglamento-tab i {
  width: 1rem;
  height: 1rem;
  font-size: 0.95em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tor-reglamento-tab:hover:not(.on) {
  background: #202020;
  border-color: #333;
  color: #e0e0e0;
}
.tor-reglamento-tab.on {
  background: var(--tr-primary);
  color: #fff;
  border-color: var(--tr-primary);
}
.tor-reglamento-content {
  min-height: 160px;
}
.tor-reglamento-content .tor-loading {
  padding: 1.2rem;
  text-align: center;
  color: #8e8e8e;
}

/* ===== Puntos ===== */
.tor-puntos-table {
  width: 100%;
  margin-top: 0.6rem;
  font-size: 0.78rem;
}
.tor-puntos-table {
  --sn-table-bg-head: #181818;
  --sn-table-bg-even: #151515;
  --sn-table-border-color: #2a2a2a;
}
.tor-puntos-table thead th {
  background: var(--sn-table-bg-head);
  font-weight: 600;
  color: #e0e0e0;
}
.tor-puntos-table td,
.tor-puntos-table th {
  padding: 0.4rem 0.5rem;
  text-align: left;
}
.tor-puntos-table.sn-table {
  border-collapse: collapse;
}

/* ===== Sanciones ===== */
.tor-sanciones-table {
  width: 100%;
  margin-top: 0.8rem;
  font-size: 0.7rem;
  table-layout: fixed;
}
.tor-sanciones-table {
  --sn-table-bg-head: #181818;
  --sn-table-bg-even: #151515;
  --sn-table-border-color: #2a2a2a;
}
.tor-sanciones-table th {
  background: var(--sn-table-bg-head);
  font-weight: 600;
  font-size: 0.66rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #cfcfcf;
}
.tor-sanciones-table td,
.tor-sanciones-table th {
  padding: 0.45rem 0.55rem;
  vertical-align: top;
  word-break: break-word;
  white-space: normal;
}
.tor-sanciones-table td.tor-td-seccion {
  font-weight: 600;
  background: #161616;
}
.tor-sanciones-table td.tor-td-accion {
  background: #141414;
}
.tor-sanciones-table td.tor-td-gravedad {
  text-align: center;
}
.tor-sanciones-table td.tor-td-observaciones {
  font-size: 0.62rem;
  line-height: 1.2;
}
.tor-sanciones-table td.tor-td-valor {
  text-align: center !important;
  vertical-align: middle;
}
.tor-sanciones-table.sn-table {
  border-collapse: collapse;
}

/* Roles en denuncias */
.rol-denunciante {
  background: #1e2a3a;
  border-color: #2b4f8a;
  color: #d6e4ff;
}
.rol-denunciado {
  background: #2a1717;
  border-color: #6a2a2a;
  color: #ffd9d9;
}
.rol-involucrado {
  background: #1b1b1b;
  border-color: #2a2a2a;
  color: #e0e0e0;
}
.rol-apelante {
  background: #1f1a12;
  border-color: #6a5a20;
  color: #fff3cc;
}
.rol-sistema {
  background: #121a1d;
  border-color: #2a5a6a;
  color: #cbe4ea;
}
.rol-comisario-revisor {
  background: #151c13;
  border-color: #2e5a3b;
  color: #d9f0d9;
}
.rol-comisario-lider {
  background: #191129;
  border-color: #3e427a;
  color: #d0d4f0;
}

/* ===== Estados de sanciones/casos (sobrios) ===== */
.estado-en-proceso {
  background: #1a1f2b;
  border-color: #2b4f8a;
  color: #e6efff;
}
.estado-aplicado {
  background: #14251a;
  border-color: #2e5a3b;
  color: #e8ffe8;
}
.estado-rechazado {
  background: #2a1717;
  border-color: #6a2a2a;
  color: #ffd9d9;
}
.estado-sin-accion {
  background: #1b1c1e;
  border-color: #2a2e31;
  color: #d6d6d6;
}
.estado-aplazado {
  background: #2a2416;
  border-color: #6a5a20;
  color: #fff2cc;
}

/* ===== Pills comunes (refactor) ===== */
.tor-pill,
.tor-badge,
.estado,
.sancion {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  line-height: 1;
  white-space: nowrap;
  vertical-align: middle;
  font-weight: 600;
  background: var(--tor-pill-bg, var(--tor-color-pill-bg));
  border: 1px solid var(--tor-pill-border, var(--tor-color-pill-border));
  color: var(--tor-pill-fg, var(--tor-color-pill-fg));
  font-size: 0.78rem;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}

/* Asegurar icono y texto legibles en pills */
.tor-badge i,
.estado i,
.sancion i {
  width: 14px;
  height: 14px;
  font-size: 0.95em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Botón inscripción (bloqueado) más visible en rojo */
.sn-tor-badge.st-blocked-accounts,
.sn-tor-badge.st-blocked-profile,
.sn-tor-badge.st-blocked-license,
.sn-tor-badge.st-blocked-config,
.sn-tor-badge.st-blocked-membership {
  background: #7a150f !important;
  border-color: #c90d05 !important;
  color: #fff !important;
  box-shadow: 0 0 0 1px rgba(201, 13, 5, 0.35),
    0 0 6px -1px rgba(201, 13, 5, 0.55);
}
.sn-tor-badge.st-blocked-accounts:hover,
.sn-tor-badge.st-blocked-profile:hover,
.sn-tor-badge.st-blocked-license:hover,
.sn-tor-badge.st-blocked-config:hover,
.sn-tor-badge.st-blocked-membership:hover {
  background: #c90d05 !important;
  border-color: #ff4e42 !important;
  color: #fff !important;
}
.sn-tor-badge.st-blocked-accounts i,
.sn-tor-badge.st-blocked-profile i,
.sn-tor-badge.st-blocked-license i,
.sn-tor-badge.st-blocked-config i,
.sn-tor-badge.st-blocked-membership i {
  color: #fff !important;
}

/* Variantes de estado (sobrias) */
.estado-programada {
  background: #2b4f8a;
  border-color: #1e3558;
  color: #fff;
}
.estado-completada {
  background: #2e5a3b;
  border-color: #1f3e29;
  color: #fff;
}
.estado-pendiente {
  background: #6a5a20;
  border-color: #4a3f16;
  color: #fff;
}
.estado-asignando {
  background: #503f85;
  border-color: #3a2d5f;
  color: #fff;
}
.estado-cancelada {
  background: #6a2a2a;
  border-color: #4a1d1d;
  color: #fff;
}
.estado-curso {
  background: #6a471f;
  border-color: #4a3115;
  color: #fff;
}
.estado-sala {
  background: #236d63;
  border-color: #1a4e47;
  color: #fff;
}
.estado-cerrada {
  background: #3e4347;
  border-color: #2a2e31;
  color: #fff;
}

/* Variantes de sanción */
.sancion-minima {
  background: #161616;
  border-color: #3a3a3a;
  color: #d9d9d9;
}
.sancion-leve {
  background: #1b190f;
  border-color: #6a5e2a;
  color: #eadfba;
}
.sancion-moderada {
  background: #1c1510;
  border-color: #6a4826;
  color: #f0d1b6;
}
.sancion-grave {
  background: #1c1313;
  border-color: #6a2a2a;
  color: #f0c7c7;
}
.sancion-dsq-carrera {
  background: #1a1212;
  border-color: #7a3131;
  color: #f2c1c6;
}
.sancion-dsq-torneo {
  background: #191118;
  border-color: #6a2f56;
  color: #f0c7de;
}
.sancion-expulsion {
  background: #1a1212;
  border-color: #733030;
  color: #f0bbbb;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.sancion-tiempo {
  background: #121a1d;
  border-color: #2a5a6a;
  color: #cbe4ea;
}
.sancion-licencia {
  background: #131429;
  border-color: #3e427a;
  color: #d0d4f0;
}
.sancion-grid {
  background: #1c1510;
  border-color: #6a4826;
  color: #f0d1b6;
}
.sancion-puntos {
  background: #1c1313;
  border-color: #6a2a2a;
  color: #f0c7c7;
}
.sancion-semanas {
  background: #181120;
  border-color: #5a2a6a;
  color: #e0c7f0;
}

/* ===== Calendario Torneos ===== */
.tor-calendario {
  margin-top: 1rem;
}
.tor-cal-section {
  margin-bottom: 1.2rem;
}
.tor-cal-section-title {
  margin: 0.2rem 0 0.7rem 0;
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.6px;
  color: #fff;
  text-transform: uppercase;
  padding-left: 0.6rem;
  border-left: 4px solid #2a2a2a;
  text-shadow: none;
}
.tor-cal-section.programadas .tor-cal-section-title {
  border-left-color: #2b4f8a;
}
.tor-cal-section.completadas .tor-cal-section-title {
  border-left-color: #2e5a3b;
}
.tor-cal-division-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.tor-cal-card {
  background: #121212;
  border: 1px solid #232323;
  border-radius: 12px;
  overflow: hidden;
}
.tor-cal-card-head {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 0.5rem 0.8rem;
  align-items: center;
  padding: 0.85rem 1rem;
  background: #151515;
  border-bottom: 1px solid #292929;
  position: relative;
}
.tor-cal-card-head h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #f2f2f2;
}
.tor-cal-card-head:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #2a2a2a;
  border-radius: 4px 0 0 4px;
}
.tor-cal-section.programadas .tor-cal-card-head {
  background: #121820;
}
.tor-cal-section.programadas .tor-cal-card-head:before {
  background: #2b4f8a;
}
.tor-cal-section.completadas .tor-cal-card-head {
  background: #111a14;
}
.tor-cal-section.completadas .tor-cal-card-head:before {
  background: #2e5a3b;
}

.tor-cal-card-body {
  overflow-x: auto;
}
/* Calendario table -> .sn-table variants */
.tor-cal-table {
  width: 100%;
  font-size: 0.75rem;
}
.tor-cal-table {
  --sn-table-bg-head: #151515;
  --sn-table-bg-even: #161616;
  --sn-table-bg-odd: #121212;
  --sn-table-border-color: #232323;
}
.tor-cal-table thead th {
  background: var(--sn-table-bg-head);
  color: #e3e3e3;
  font-weight: 700;
  padding: 0.45rem 0.55rem;
  text-align: left;
  border-bottom: 1px solid #232323;
}
.tor-cal-table tbody td {
  padding: 0.5rem 0.55rem;
  border-bottom: 1px solid #1b1b1b;
  vertical-align: middle;
}
.tor-cal-table.sn-table {
  border-collapse: separate;
  border-spacing: 0;
}
.tor-cal-table tbody tr:hover {
  background: #1b1b1b;
}

/* Countdown */
.tor-countdown {
  --tor-pill-bg: #1a1a1a;
  --tor-pill-border: #2a2a2a;
  --tor-pill-fg: #d0d0d0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.26rem 0.55rem;
  border-radius: 8px;
  background: var(--tor-pill-bg);
  border: 1px solid var(--tor-pill-border);
  color: var(--tor-pill-fg);
}
.tor-countdown:not(.ended) {
  background: linear-gradient(135deg, #2a0b09, #3d0f0c 40%, #520f0a);
  border-color: #61100c;
  box-shadow: 0 0 0 1px #130605, 0 0 12px -3px rgba(201, 13, 5, 0.55);
  position: relative;
}
.tor-countdown:not(.ended):before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle at 15% 25%,
    rgba(255, 90, 70, 0.15),
    transparent 60%
  );
  pointer-events: none;
}
.tor-countdown:not(.ended) .cd-time {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
  text-shadow: 0 0 6px rgba(184, 0, 201, 0.5);
}
.tor-countdown.pulse:not(.ended) {
  animation: torCountdownPulse 1.8s ease-in-out infinite;
}
@keyframes torCountdownPulse {
  0%,
  100% {
    box-shadow: 0 0 0 1px #130605, 0 0 10px -4px rgba(201, 13, 5, 0);
  }
  50% {
    box-shadow: 0 0 0 1px #130605, 0 0 18px -2px rgba(201, 13, 5, 0.65);
  }
}
.tor-countdown .cd-label {
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--tor-pill-fg);
}
.tor-countdown .cd-time {
  font-family: monospace;
  font-weight: 900;
  color: #fff;
}
.tor-countdown.ended {
  opacity: 0.7;
}

/* Responsive calendario */
@media (max-width: 900px) {
  .tor-cal-card-head h4 {
    font-size: 0.85rem;
  }
  .tor-cal-card-head .ronda-formato {
    font-size: 0.66rem;
  }
  .tor-cal-table {
    font-size: 0.7rem;
  }
  .tor-cal-table .col-formato,
  .tor-cal-table .col-estado-ronda,
  .tor-cal-table .col-faltan {
    display: none;
  }
}
@media (max-width: 680px) {
  .tor-cal-card-head {
    grid-template-columns: auto 1fr auto;
  }
  .tor-cal-table {
    font-size: 0.66rem;
  }
  .tor-cal-table .col-pista,
  .tor-cal-table .col-hasta,
  .tor-cal-table .col-estado-comp {
    display: none;
  }
  .tor-cal-table th,
  .tor-cal-table td {
    padding: 0.4rem 0.45rem;
  }
}
@media (max-width: 480px) {
  .tor-cal-table {
    font-size: 0.62rem;
  }
  .tor-cal-table .col-no {
    display: none;
  }
}
/* Extra calendario safeguards for very small screens */
@media (max-width: 520px) {
  .tor-cal-card-body {
    overflow-x: auto;
  }
  .tor-cal-card-body .tor-cal-table {
    min-width: 520px;
  }
}

/* === Torneos calendario helpers (flags + sesión) === */
.pista-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.tor-flag {
  display: inline-block;
  width: 24px;
  height: 18px;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  border: 1px solid #2a2a2a;
  border-radius: 2px;
}
.sesion-badge {
  --tor-pill-bg: #1f1f1f;
  --tor-pill-border: #2b2b2b;
  --tor-pill-fg: #e7e7e7;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--tor-pill-bg);
  border: 1px solid var(--tor-pill-border);
  padding: 0.26rem 0.52rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.68rem;
  color: var(--tor-pill-fg);
}
.sesion-badge:before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--sesion-color, #555);
  box-shadow: 0 0 0 1px #000;
}
.sesion-badge i {
  font-size: 0.78rem;
}

/* ===== Modal de Resultados de Sesión ===== */
.tor-res-open {
  overflow: hidden;
}
.tor-res-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--sn-overlay-bg, rgba(0, 0, 0, 0.6));
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: none;
  display: flex;
  align-items: center; /* centrado vertical */
  justify-content: center;
  padding: 40px 20px; /* uniforme */
  box-sizing: border-box;
}
.tor-res-modal {
  position: relative;
  width: min(1100px, 96vw);
  max-height: 88vh;
  overflow: hidden;
  background: var(--sn-color-surface, #111);
  border: 1px solid var(--sn-color-border, #222);
  border-radius: var(--sn-radius-lg, 10px);
  box-shadow: var(--sn-shadow-xl, 0 10px 40px rgba(0, 0, 0, 0.6));
  display: flex;
  flex-direction: column;
  animation: snModalIn 0.4s cubic-bezier(0.4, 0.12, 0.2, 1);
  /* Defensive: ensure modal itself is not stretched full width causing visual left bias */
  margin: 0 auto;
}
.tor-res-overlay.force-center .tor-res-modal,
.tor-res-modal.force-center {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  margin: 0 !important;
}
.tor-res-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sn-space-3, 0.8rem) var(--sn-space-4, 1rem);
  border-bottom: 1px solid var(--sn-color-border, #222);
  background: var(--sn-color-surface-alt, #151515);
}
.tor-res-head h4 {
  margin: 0;
  font-size: var(--sn-font-size-md, 1rem);
  color: var(--sn-color-text-strong, #fff);
  font-weight: 600;
}
.tor-res-close {
  background: var(--sn-color-surface-raised, #1f1f1f);
  border: 1px solid var(--sn-color-border, #333);
  color: var(--sn-color-text, #eee);
  border-radius: var(--sn-radius-sm, 6px);
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  font: 500 var(--sn-font-size-xs, 0.7rem) / 1 var(--sn-font-sans, system-ui);
  transition: background 0.22s ease, filter 0.22s ease;
}
.tor-res-close:hover {
  background: var(--sn-color-surface-alt, #262626);
  filter: brightness(1.1);
}
.tor-res-tabs {
  display: flex;
  gap: 0.4rem;
  padding: 0.5rem 0.8rem;
  border-bottom: 1px solid #222;
  background: #131313;
  overflow: auto;
}
.tor-res-tab {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  color: #cfcfcf;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.75rem;
  white-space: nowrap;
}
.tor-res-tab.on {
  background: #2b4f8a;
  color: #fff;
  border-color: #1e3558;
}
.tor-res-body {
  padding: 0.8rem;
  overflow: auto;
}
.tor-res-dim {
  display: block;
}
.tor-res-group-head {
  margin: 0.4rem 0 0.4rem;
}
.tor-res-group-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #1b1b1b;
  border: 1px solid #2a2a2a;
  color: #e3e3e3;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.8rem;
}
.tor-res-group-badge i {
  font-size: 0.9rem;
}

/* Resultados: wrapper + .sn-table */
.tor-res-table-wrap {
  overflow: auto;
  border: 1px solid var(--tor-color-border, #222);
  border-radius: 8px;
}
.tor-res-table {
  width: 100%;
  font-size: 0.78rem;
}
.tor-res-table.sn-table {
  --sn-table-font-size: 0.78rem;
  --sn-table-header-bg: #181818;
  --sn-table-header-fg: #e0e0e0;
  --sn-table-row-alt-bg: #141414;
  --sn-table-row-border: #1b1b1b;
  --sn-table-cell-padding: 0.45rem 0.55rem;
  --sn-table-header-border: #2a2a2a;
}
.tor-res-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}
.tor-res-row-error {
  background: #2a1717 !important;
}
.tor-res-piloto {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.tor-res-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #2a2a2a;
}
.tor-res-auto {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.tor-res-brand {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.3));
}
.tor-actions-col {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.tor-cal-act {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(
    --sn-grad-theme,
    linear-gradient(
      135deg,
      var(--sn-theme-primary, #c90d05),
      var(--sn-theme-primary-hover, #e01006) 55%
    )
  );
  border: 1px solid var(--sn-theme-primary-accent, #9e0a03);
  color: #fff;
  padding: 0.38rem 0.68rem;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 650;
  line-height: 1.1;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  transition: filter 0.22s ease, transform 0.16s ease;
}
.tor-cal-act i {
  font-size: 0.9em;
}
.tor-cal-act:hover {
  filter: brightness(1.12) saturate(1.05);
}
.tor-cal-act.tor-act-resultados {
  background: linear-gradient(135deg, #123047, #1a4769 55%);
  border-color: #215a86;
  color: #e4f4ff;
}
.tor-cal-act.tor-act-resultados:hover {
  filter: brightness(1.12) saturate(1.05);
}
.tor-cal-act.tor-act-info {
  /* Info ahora usa un rojo oscuro diferenciador en lugar de gris neutro */
  background: linear-gradient(135deg, #6a0803, #860a04 55%);
  border-color: #6e0903;
  color: #ffe2df;
}
.tor-cal-act.tor-act-info:hover {
  filter: brightness(1.12);
}
/* Pitwall specific action buttons (migrated from legacy pitwall css) */
.sn-pitwall .tor-cal-act.pw-msg-ver,
.sn-pitwall .tor-cal-act.pw-ver-confirmados,
.sn-pitwall .tor-cal-act[data-action="msg-ver"],
.sn-pitwall .tor-cal-act[data-action="ver-confirmados"] {
  /* Force primary theme visual to avoid flash of unstyled button */
  background: var(
    --sn-grad-theme,
    linear-gradient(
      135deg,
      var(--sn-theme-primary, #c90d05),
      var(--sn-theme-primary-hover, #e01006) 55%
    )
  );
  border: 1px solid var(--sn-theme-primary-accent, #9e0a03);
  color: #fff;
}
.sn-pitwall .tor-cal-act.pw-msg-ver:hover,
.sn-pitwall .tor-cal-act.pw-ver-confirmados:hover,
.sn-pitwall .tor-cal-act[data-action="msg-ver"]:hover,
.sn-pitwall .tor-cal-act[data-action="ver-confirmados"]:hover {
  filter: brightness(1.12) saturate(1.05);
}

/* Redondear cualquier botón dentro de pitwall que no tenga estilo explícito */
.sn-pitwall button,
.sn-pitwall .tor-cal-act,
.sn-pitwall .pw-asist-cell button,
.sn-pitwall .pw-modal button {
  border-radius: 8px !important;
}

/* Optional subtle differentiation if needed later (commented out)
.sn-pitwall .tor-cal-act.pw-ver-confirmados { filter: saturate(1.15); }
*/
.tor-res-table tbody tr:nth-child(odd) {
  background: #121212;
}
@media (max-width: 680px) {
  .tor-res-table {
    font-size: 0.7rem;
  }
  .tor-res-table.sn-table {
    --sn-table-font-size: 0.7rem;
  }
  .tor-res-modal {
    top: 3%;
    width: 96vw;
  }
}

/* ===== Tablas de Posiciones / Rondas (estilo común) ===== */
.tor-standings,
.tor-rondas {
  margin-top: 1rem;
}
.tor-standings-content,
.tor-rondas-content {
  margin-top: 0.6rem;
}

/* Tabs standings/rondas */
.tor-std-tab {
  background: #1b1b1b;
  border: 1px solid #2a2a2a;
  color: #c8c8c8;
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  margin-right: 0.4rem;
  font-size: 0.74rem;
}
.tor-std-tab.on {
  background: #2b4f8a;
  color: #fff;
  border-color: #1e3558;
}

/* Standings / Rondas table -> .sn-table */
.tor-std-table {
  width: 100%;
  font-size: 0.78rem;
  border-collapse: collapse;
}
.tor-std-table {
  --sn-table-bg-head: #151515;
  --sn-table-border-color: #232323;
}
.tor-std-table thead th {
  background: var(--sn-table-bg-head);
  color: #e3e3e3;
  font-weight: 700;
  padding: 8px 10px;
  border-bottom: 1px solid #232323;
  text-align: center;
  position: sticky;
  top: 0;
}
.tor-std-table thead th i {
  margin-right: 6px;
  opacity: 0.9;
}
.tor-std-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  vertical-align: middle;
}
.tor-std-table th,
.tor-std-table td {
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}
.tor-std-table th:last-child,
.tor-std-table td:last-child {
  border-right: 0;
}
.tor-std-table tbody tr:nth-child(odd) {
  background: #121212;
}
.tor-std-table tbody tr:nth-child(even) {
  background: #151515;
}

.tor-td-num {
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.tor-std-piloto {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
}
.tor-std-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.tor-std-penal {
  background: #3a0d0d;
  color: #ffd9d9;
}
.tor-std-total {
  background: #0d2242;
  color: #d7e7ff;
  font-weight: 700;
  font-size: 1.05em;
}
.tor-std-chase {
  background: #0d2242;
  color: #d7e7ff;
  font-weight: 700;
}

/* Rondas specific */
.tor-std-rondas thead th {
  font-size: 12px;
  text-align: center;
}
.tor-std-colcomp {
  width: 72px;
}

/* Emoji flag inline tweaks */
.tor-emoji-flag {
  display: inline-block;
  margin-right: 4px;
}

/* Responsive standings */
@media (max-width: 768px) {
  .tor-standings .tor-std-table {
    font-size: 0.68rem;
  }
  .tor-standings .tor-std-actions {
    display: none;
  }
}
@media (max-width: 520px) {
  .tor-standings .tor-std-table {
    font-size: 0.66rem;
  }
  .tor-standings .tor-std-avatar {
    width: 20px;
    height: 20px;
  }
}
/* Tablas apiladas (card-like) en móviles pequeños */
@media (max-width: 520px) {
  .tor-std-table.tor-std-cardable thead {
    display: none;
  }
  .tor-std-table.tor-std-cardable,
  .tor-std-table.tor-std-cardable tbody,
  .tor-std-table.tor-std-cardable tr,
  .tor-std-table.tor-std-cardable td {
    display: block;
    width: 100%;
  }
  .tor-std-table.tor-std-cardable tr {
    margin-bottom: 0.7rem;
    border: 1px solid #222;
    border-radius: 8px;
    overflow: hidden;
    background: #131313;
  }
  .tor-std-table.tor-std-cardable td {
    text-align: right;
    padding: 0.5rem 0.6rem 0.5rem 48%;
    position: relative;
    border: 0;
    border-bottom: 1px solid #1c1c1c;
  }
  .tor-std-table.tor-std-cardable td:last-child {
    border-bottom: 0;
  }
  .tor-std-table.tor-std-cardable td::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 46%;
    padding: 0.5rem 0.6rem;
    text-align: left;
    color: #bfbfbf;
    font-weight: 700;
  }
  .tor-std-table.tor-std-cardable .tor-std-piloto {
    justify-content: flex-end;
  }
  .tor-std-table.tor-std-cardable .tor-std-piloto span {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
  .tor-std-table.tor-std-cardable .tor-std-actions {
    display: none;
  }
}
/* Rondas: ensure headers center even si global overrides */
.tor-std-rondas thead th.tor-std-colcomp {
  text-align: center;
}

/* ===== Modales detalle standings ===== */
.tor-std-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--sn-overlay-bg, rgba(0, 0, 0, 0.6));
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: none;
  display: flex;
  align-items: center; /* centrado vertical */
  justify-content: center;
  padding: 40px 20px; /* uniforme */
  box-sizing: border-box;
}
.tor-std-modal {
  position: relative;
  width: min(900px, 96vw);
  max-height: 86vh;
  overflow: hidden;
  background: var(--sn-color-surface, #111);
  border: 1px solid var(--sn-color-border, #222);
  border-radius: var(--sn-radius-lg, 10px);
  display: flex;
  flex-direction: column;
  box-shadow: var(--sn-shadow-xl, 0 10px 40px rgba(0, 0, 0, 0.6));
  animation: snModalIn 0.4s cubic-bezier(0.4, 0.12, 0.2, 1);
}
.tor-std-overlay.force-center .tor-std-modal,
.tor-std-modal.force-center {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  margin: 0 !important;
}
.tor-std-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sn-space-3, 0.7rem) var(--sn-space-4, 1rem);
  border-bottom: 1px solid var(--sn-color-border, #222);
  background: var(--sn-color-surface-alt, #151515);
}
.tor-std-head h4 {
  margin: 0;
  font-size: var(--sn-font-size-md, 1rem);
  color: var(--sn-color-text-strong, #fff);
  font-weight: 600;
}
.tor-std-close {
  background: var(--sn-color-surface-raised, #1f1f1f);
  border: 1px solid var(--sn-color-border, #333);
  color: var(--sn-color-text, #eee);
  border-radius: var(--sn-radius-sm, 6px);
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  font: 500 var(--sn-font-size-xs, 0.7rem) / 1 var(--sn-font-sans, system-ui);
  transition: background 0.22s ease, filter 0.22s ease;
}
.tor-std-close:hover {
  background: var(--sn-color-surface-alt, #262626);
  filter: brightness(1.1);
}
.tor-std-body {
  padding: 0.8rem;
  overflow: auto;
}
/* Standings detail: wrapper + .sn-table */
.tor-std-detail-table {
  width: 100%;
  font-size: 0.76rem;
}
.tor-std-detail-table.sn-table {
  --sn-table-font-size: 0.76rem;
  --sn-table-header-bg: #181818;
  --sn-table-header-fg: #e0e0e0;
  --sn-table-header-border: #2a2a2a;
  --sn-table-row-border: #1b1b1b;
  --sn-table-cell-padding: 0.45rem 0.55rem;
}
.tor-std-detail-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}
@media (max-width: 680px) {
  .tor-std-table {
    font-size: 0.7rem;
  }
  .tor-std-modal {
    width: 96vw;
  }
}
@media (max-width: 420px) {
  .tor-std-modal {
    width: 98vw;
    max-height: 96vh;
    border-radius: 6px;
  }
  .tor-std-body {
    padding: 0.6rem;
  }
  .tor-std-head {
    padding: 0.5rem;
  }
}

/* Allow tor-badge to wrap inside table cells on narrow screens */
.tor-badge {
  white-space: normal;
}

/* === HARD OVERRIDES (final safeguard) === */
/* Forzar centrado vertical de cualquier overlay de resultados o standings aunque otro CSS anterior ponga flex-start/top */
.tor-res-overlay,
.tor-std-overlay {
  align-items: center !important;
  justify-content: center !important;
  padding: 40px 20px !important;
}
/* Catch-all: cualquier overlay cuyo class contenga 'res-overlay' o 'std-overlay' (futuros nombres) */
[class*="res-overlay"],
[class*="std-overlay"] {
  align-items: center !important;
  justify-content: center !important;
}

/* Nota: si por alguna razón el flex parent no existe o otro script mueve el modal fuera del overlay,
   se puede añadir via JS la clase 'force-center' al modal u overlay para aplicar el centrado absoluto:
   document.querySelectorAll('.tor-res-modal, .tor-std-modal').forEach(m=>m.classList.add('force-center')) */
/* Quitar restos de top/left aplicados por media queries antiguas */
/* Importante: NO anular transform/top/left globalmente porque la clase .force-center usa translate para centrar. */
.tor-res-modal.force-center,
.tor-std-modal.force-center,
.tor-res-overlay.force-center .tor-res-modal,
.tor-std-overlay.force-center .tor-std-modal {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  margin: 0 !important;
}
/* Botón inscribir: asegurar texto blanco absoluto si algo lo pisa */
.sn-tor-save {
  color: #fff !important;
}
/* ==== Modal Inscritos – Tabs & Controles ==== */
.sn-ins-tabs {
  display: flex;
  gap: 6px;
  margin: 0 0 12px;
  flex-wrap: wrap;
}
.sn-ins-tab {
  --_bg: #1d1d1d;
  --_border: #2a2a2a;
  --_fg: #cfcfcf;
  position: relative;
  background: var(--_bg);
  color: var(--_fg);
  border: 1px solid var(--_border);
  padding: 0.45rem 0.85rem;
  font: 600 0.7rem/1 var(--sn-font-sans, system-ui);
  letter-spacing: 0.5px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease,
    box-shadow 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.sn-ins-tab:hover {
  background: #252525;
}
.sn-ins-tab.active {
  --_bg: linear-gradient(145deg, #7d0f0a, #c90d05 55%, #e52f25);
  --_fg: #fff;
  --_border: #c90d05;
  color: var(--_fg);
  border-color: var(--_border);
  background: var(--_bg);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 4px 14px -4px rgba(201, 13, 5, 0.65);
}
.sn-ins-tab:focus-visible {
  outline: 2px solid #c90d05;
  outline-offset: 2px;
}

.sn-ins-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  flex-wrap: wrap;
}
.sn-ins-controls label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #bbb;
}
.sn-ins-controls select {
  background: #181818;
  color: #eee;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  padding: 0.35rem 0.55rem;
  font-size: 0.68rem;
}
.sn-ins-controls select:focus {
  outline: 1px solid #c90d05;
}

.sn-ins-div {
  display: none;
}
.sn-ins-div.active {
  display: block;
  animation: fadeIn 0.35s ease;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.sn-ins-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.68rem;
}
.sn-ins-table thead th {
  background: #181818;
  color: #ccc;
  font-weight: 700;
  padding: 0.45rem 0.55rem;
  text-align: left;
  border-bottom: 1px solid #272727;
}
.sn-ins-table tbody td {
  padding: 0.42rem 0.55rem;
  border-bottom: 1px solid #1f1f1f;
  color: #ddd;
}
.sn-ins-table tbody tr:hover {
  background: #1d1d1d;
}
.sn-ins-table-wrap {
  margin-bottom: 14px;
  overflow-x: auto;
}
.sn-ins-cat-title {
  font: 700 0.7rem/1.3 var(--sn-font-sans, system-ui);
  letter-spacing: 0.5px;
  color: #eee;
  margin: 10px 0 6px;
  text-transform: uppercase;
}
.sn-ins-empty,
.sn-ins-error {
  padding: 1.1rem;
  background: #191919;
  border: 1px solid #262626;
  border-radius: 10px;
  font-size: 0.72rem;
  color: #ccc;
}

/* Select2 dark adjust (if applied inside modal) */
.sn-ins-modal .select2-container--dark .select2-selection {
  background: #181818;
  border: 1px solid #2a2a2a;
  min-height: 32px;
}
.sn-ins-modal .select2-container--dark .select2-selection__rendered {
  color: #e0e0e0;
}
.sn-ins-modal .select2-container--dark .select2-results__option--highlighted {
  background: #c90d05;
}

/* ===== Tabs scrollables/snap en módulos ===== */
.tor-standings-tabs,
.tor-rondas-tabs,
.tor-calendario-tabs,
.tor-reglamento-tabs,
.tor-den-modal .den-tabs {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}
.tor-standings-tabs > *,
.tor-rondas-tabs > *,
.tor-calendario-tabs > *,
.tor-reglamento-tabs > *,
.tor-den-modal .den-tabs > * {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

/* Denuncias: tabla de sanciones con scroll horizontal en móviles */
@media (max-width: 520px) {
  .den-sanciones {
    overflow-x: auto;
  }
  .den-sanciones .den-san-table {
    min-width: 520px;
    font-size: 0.66rem;
  }
}

/* Wrappers genéricos */
.den-san-table-wrap {
  overflow-x: auto;
}
.tor-std-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Forzar contención de overflow en módulos torneos */
.tor-reglamento,
.tor-calendario,
.tor-standings,
.tor-rondas,
.tor-denuncias {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  box-sizing: border-box;
}
.tor-reglamento > *,
.tor-calendario > *,
.tor-standings > *,
.tor-rondas > *,
.tor-denuncias > * {
  max-width: 100%;
  overflow-x: auto;
}

/* Tablas dentro de shortcodes siempre con scroll interno */
.tor-reglamento table,
.tor-calendario table,
.tor-standings table,
.tor-rondas table,
.tor-denuncias table {
  width: 100%;
  display: table;
  table-layout: auto;
}

/* Contenedores de tabla con scroll obligatorio en móvil */
@media (max-width: 768px) {
  .tor-reglamento,
  .tor-calendario,
  .tor-standings,
  .tor-rondas,
  .tor-denuncias {
    overflow-x: auto !important;
  }
}

/* ---------- Afinado de iconos en pills ---------- */
.tor-badge i {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95em;
}

/* ===== Torneo Sliders ===== */
.torneo-slider {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 1rem;
  position: relative;
}
.torneo-slider-loading,
.torneo-slider-error,
.torneo-slider-empty {
  text-align: center;
  padding: 0.5rem;
  color: #888;
  background: #111;
  border-radius: 8px;
  border: 1px solid #333;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 768px) {
  .torneo-slider-loading,
  .torneo-slider-error,
  .torneo-slider-empty {
    min-height: 44px;
    padding: 0.4rem;
  }
}
.torneo-slider-error {
  color: #ff6b6b;
  border-color: #4a2626;
  background: #1a1111;
}
.torneo-cards-wrapper {
  overflow: hidden;
  border-radius: 8px;
}
.torneo-cards-track {
  display: flex;
  transition: transform 0.3s ease-in-out;
  gap: 1rem;
}
.torneo-card {
  flex: 0 0 100%;
  display: flex;
  background: #111;
  border: 1px solid #333;
  border-radius: 8px;
  height: 140px;
  overflow: hidden;
}
.torneo-card-image {
  flex: 0 0 120px;
  background: #222;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.torneo-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.torneo-card-placeholder {
  color: #666;
  font-size: 0.8rem;
  text-align: center;
  padding: 1rem;
}
.torneo-card-content {
  flex: 1;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0;
}
.torneo-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 0.4rem 0;
  line-height: 1.2;
}
.torneo-card-description {
  font-size: 0.8rem;
  color: #bbb;
  line-height: 1.3;
  margin: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
/* Contenedor para patrocinadores y botón en la misma línea */
.torneo-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
}
.torneo-card-sponsors {
  flex: 1;
  margin-right: 0.5rem;
}
.torneo-card-actions {
  flex-shrink: 0;
}
.torneo-card-btn {
  background: linear-gradient(135deg, #c90d05, #e01b12 55%);
  color: #fff;
  text-decoration: none;
  padding: 0.45rem 1.05rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.1;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  position: relative;
  isolation: isolate;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  transition: background 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease,
    filter 0.25s ease;
}
.torneo-card-btn:hover {
  filter: brightness(1.12) saturate(1.05);
  text-decoration: none;
}
.torneo-card-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}
.torneo-card-btn:focus-visible {
  outline: 2px solid #ff544c;
  outline-offset: 2px;
}
/* Controles del slider */
.torneo-slider-controls {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
  padding: 0.5rem;
}
.torneo-slider-prev,
.torneo-slider-next {
  background: #333;
  border: 1px solid #555;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.2s ease;
}
.torneo-slider-prev:hover,
.torneo-slider-next:hover {
  background: #444;
  border-color: #666;
}
.torneo-slider-dots {
  display: flex;
  gap: 0.5rem;
}
.torneo-slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #555;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}
.torneo-slider-dot.active {
  background: #4caf50;
}
.torneo-slider-dot:hover {
  background: #777;
}
.torneo-slider-dot.active:hover {
  background: #45a049;
}
.torneo-sponsors-container {
  overflow: hidden;
  height: 32px;
  display: flex;
  align-items: center;
}
.torneo-sponsors-track {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  height: 100%;
}
.torneo-sponsor-item {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  background: #222;
  border: 1px solid #444;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
}
.torneo-sponsor-item:hover {
  border-color: #666;
  transform: scale(1.05);
}
.torneo-sponsor-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.torneo-sponsor-placeholder {
  font-size: 0.65rem;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
}
/* Responsive breakpoints */
@media (min-width: 768px) {
  .torneo-card {
    flex: 0 0 calc(50% - 0.5rem);
    height: 160px;
  }
  .torneo-card-image {
    flex: 0 0 100px;
  }
  .torneo-card-content {
    padding: 0.7rem;
  }
}
@media (min-width: 1200px) {
  .torneo-card {
    flex: 0 0 calc(33.333% - 0.67rem);
    height: 150px;
  }
  .torneo-card-content {
    padding: 0.6rem;
  }
  .torneo-card-title {
    font-size: 0.9rem;
  }
  .torneo-card-description {
    font-size: 0.7rem;
  }
}
/* Mobile-specific auto-advance indicator */
@media (max-width: 767px) {
  .torneo-slider-controls::after {
    content: "Auto-avance cada 10s";
    position: absolute;
    bottom: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: #666;
    white-space: nowrap;
  }
}

/* ============================================================= */
/*  MODAL INSCRITOS (GENÉRICO)  sn-tor-modal / sn-ins-modal      */
/* ============================================================= */
.sn-tor-modal,
.sn-ins-modal {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 20px 56px;
  background: var(--sn-overlay-bg, rgba(0, 0, 0, 0.55));
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  box-sizing: border-box;
}
.pw-overlay {
  /* legacy pitwall overlay -> map to unified */
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 48px 20px 56px;
  background: var(--sn-overlay-bg, rgba(0, 0, 0, 0.55));
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  box-sizing: border-box;
}
.pw-overlay.on, /* por si en el futuro se usa la misma convención */
.pw-overlay[style*="display: block"],
.pw-overlay[style*="display:block"] {
  display: flex !important;
}
.sn-tor-modal.on,
.sn-ins-modal.on {
  display: flex;
}
/* Contenedor dialog */
.sn-ins-dialog,
.sn-tor-dialog {
  background: var(--sn-color-surface, #141414);
  border: 1px solid var(--sn-color-border, #262626);
  border-radius: var(--sn-radius-lg, 12px);
  width: min(640px, 96vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  padding: var(--sn-space-4, 16px) var(--sn-space-4, 18px)
    var(--sn-space-5, 18px);
  box-shadow: var(--sn-shadow-xl, 0 12px 42px -6px rgba(0, 0, 0, 0.65));
  position: relative;
  overflow: hidden;
  color: var(--sn-color-text, #e2e2e2);
  font-size: var(--sn-font-size-sm, 0.88rem);
  animation: snModalIn 0.42s cubic-bezier(0.4, 0.12, 0.2, 1);
}
.pw-modal {
  /* legacy pitwall modal -> estilizado como sn-dialog */
  background: var(--sn-color-surface, #141414);
  border: 1px solid var(--sn-color-border, #262626);
  border-radius: var(--sn-radius-lg, 12px);
  width: min(640px, 96vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  padding: var(--sn-space-4, 16px) var(--sn-space-4, 18px)
    var(--sn-space-5, 18px);
  box-shadow: var(--sn-shadow-xl, 0 12px 42px -6px rgba(0, 0, 0, 0.65));
  position: relative;
  overflow: hidden;
  color: var(--sn-color-text, #e2e2e2);
  font-size: var(--sn-font-size-sm, 0.88rem);
  animation: snModalIn 0.42s cubic-bezier(0.4, 0.12, 0.2, 1);
}
.pw-modal-head {
  /* map a header unificado */
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: var(--sn-space-3, 12px);
  margin: 0 0 var(--sn-space-3, 12px) 0;
  padding-right: 34px;
  position: relative;
}
.pw-modal-head h4 {
  margin: 0;
  font-size: var(--sn-font-size-md, 1rem);
  line-height: 1.15;
  font-weight: 600;
  color: var(--sn-color-text-strong, #fff);
}
.pw-close {
  /* unificar botón cerrar */
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--sn-color-surface-raised, transparent);
  border: 1px solid var(--sn-color-border, #303030);
  color: var(--sn-color-text-soft, #cfcfcf);
  cursor: pointer;
  border-radius: var(--sn-radius-sm, 6px);
  font-size: 16px;
  line-height: 1;
  transition: background 0.22s ease, color 0.22s ease, filter 0.22s ease,
    box-shadow 0.22s ease;
}
.pw-close:hover,
.pw-close:focus-visible {
  background: var(--sn-color-surface-alt, #242424);
  color: var(--sn-color-text-strong, #fff);
  box-shadow: 0 0 0 1px var(--sn-color-border-light, #383838),
    0 2px 4px rgba(0, 0, 0, 0.4);
}
.pw-modal-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable both-edges;
  padding-right: 4px;
  align-items: center; /* centrado vertical */
  justify-content: center;
  padding: 40px 20px; /* uniforme */
  max-width: 900px;
  width: min(900px, 96vw);
}
@media (max-width: 600px) {
  .pw-modal {
    width: 96vw;
    max-height: 90vh;
    padding: 14px 14px 18px;
  }
  .pw-modal.pw-wide {
    width: 96vw;
  }
  .pw-close {
    width: 26px;
    height: 26px;
  }
}
/* Header */
.sn-ins-dialog-header,
.sn-tor-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: var(--sn-space-3, 12px);
  margin: 0 0 var(--sn-space-3, 12px) 0;
  padding-right: 34px;
  position: relative;
}
.sn-ins-dialog-header h4,
.sn-tor-dialog-header h4 {
  margin: 0;
  font-size: var(--sn-font-size-md, 1rem);
  line-height: 1.15;
  font-weight: 600;
  color: var(--sn-color-text-strong, #fff);
}
/* Botón cerrar */
.sn-ins-close,
.sn-tor-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--sn-color-surface-raised, transparent);
  border: 1px solid var(--sn-color-border, #303030);
  color: var(--sn-color-text-soft, #cfcfcf);
  cursor: pointer;
  border-radius: var(--sn-radius-sm, 6px);
  font-size: 16px;
  line-height: 1;
  transition: background 0.22s ease, color 0.22s ease, filter 0.22s ease,
    box-shadow 0.22s ease;
}
.sn-ins-close:hover,
.sn-tor-close:hover,
.sn-ins-close:focus-visible,
.sn-tor-close:focus-visible {
  background: var(--sn-color-surface-alt, #242424);
  color: var(--sn-color-text-strong, #fff);
  box-shadow: 0 0 0 1px var(--sn-color-border-light, #383838);
  outline: none;
  filter: brightness(1.05);
}
/* Cuerpo scrollable */
.sn-ins-dialog-body,
.sn-tor-dialog-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable both-edges;
  position: relative;
  padding-right: 4px;
}
.sn-ins-dialog-body::-webkit-scrollbar,
.sn-tor-dialog-body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.sn-ins-dialog-body::-webkit-scrollbar-track,
.sn-tor-dialog-body::-webkit-scrollbar-track {
  background: var(--sn-color-surface-alt, #181818);
}
.sn-ins-dialog-body::-webkit-scrollbar-thumb,
.sn-tor-dialog-body::-webkit-scrollbar-thumb {
  background: var(--sn-color-border, #333);
  border-radius: 4px;
}
.sn-ins-dialog-body::-webkit-scrollbar-thumb:hover,
.sn-tor-dialog-body::-webkit-scrollbar-thumb:hover {
  background: var(--sn-color-border-light, #444);
}
/* Tablas / lista de inscritos */
.sn-ins-dialog-body table,
.sn-tor-dialog-body table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.78rem;
}
.sn-ins-dialog-body th,
.sn-ins-dialog-body td,
.sn-tor-dialog-body th,
.sn-tor-dialog-body td {
  padding: 6px 8px;
  border: 0;
  white-space: normal;
  word-break: break-word;
  vertical-align: middle;
}
.sn-ins-dialog-body thead th,
.sn-tor-dialog-body thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--sn-color-surface-alt, #181818);
  font-weight: 600;
  color: var(--sn-color-text, #e6e6e6);
  font-size: 0.7rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.sn-ins-dialog-body tbody tr:nth-child(odd),
.sn-tor-dialog-body tbody tr:nth-child(odd) {
  background: var(--sn-color-surface-alt, #121212);
}
.sn-ins-dialog-body tbody tr:nth-child(even),
.sn-tor-dialog-body tbody tr:nth-child(even) {
  background: var(--sn-color-surface-raised, #161616);
}
.sn-ins-dialog-body tbody tr + tr td,
.sn-tor-dialog-body tbody tr + tr td {
  border-top: 1px solid var(--sn-color-border, #1f1f1f);
}
/* Filtros / controles dentro del modal */
.sn-ins-filters,
.sn-tor-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px 0;
}
.sn-ins-filters select,
.sn-ins-filters input,
.sn-tor-filters select,
.sn-tor-filters input {
  background: #1c1c1c;
  border: 1px solid #2c2c2c;
  color: #e0e0e0;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.75rem;
  flex: 1 1 140px;
  min-width: 120px;
}
.sn-ins-filters select:focus,
.sn-ins-filters input:focus,
.sn-tor-filters select:focus,
.sn-tor-filters input:focus {
  outline: 1px solid #444;
  border-color: #444;
}
/* Estado vacío / carga */
.sn-ins-empty,
.sn-tor-empty,
.sn-ins-loading,
.sn-tor-loading {
  text-align: center;
  padding: 18px 10px;
  color: #a8a8a8;
  font-size: 0.8rem;
}
/* Etiquetas / badges dentro de la lista */
.sn-ins-badge,
.sn-tor-badge-small {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #1f1f1f;
  border: 1px solid #2b2b2b;
  padding: 2px 6px;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 6px;
  font-weight: 700;
  color: #dcdcdc;
}
/* Responsive refinements modal */
@media (max-width: 880px) {
  .sn-ins-dialog,
  .sn-tor-dialog {
    width: min(560px, 95vw);
  }
}
@media (max-width: 640px) {
  .sn-ins-dialog,
  .sn-tor-dialog {
    width: 96vw;
    padding: 14px 14px 16px;
  }
  .sn-ins-dialog-body table,
  .sn-tor-dialog-body table {
    font-size: 0.72rem;
  }
  .sn-ins-dialog-body th,
  .sn-ins-dialog-body td,
  .sn-tor-dialog-body th,
  .sn-tor-dialog-body td {
    padding: 5px 6px;
  }
}
@media (max-width: 480px) {
  .sn-ins-dialog,
  .sn-tor-dialog {
    width: 97vw;
    max-height: 90vh;
    padding: 12px 12px 14px;
    border-radius: 10px;
  }
  .sn-ins-dialog-header h4,
  .sn-tor-dialog-header h4 {
    font-size: 0.9rem;
  }
  .sn-ins-close,
  .sn-tor-close {
    width: 22px;
    height: 22px;
    font-size: 15px;
  }
  .sn-ins-dialog-body table,
  .sn-tor-dialog-body table {
    font-size: 0.68rem;
  }
  .sn-ins-dialog-body th,
  .sn-ins-dialog-body td,
  .sn-tor-dialog-body th,
  .sn-tor-dialog-body td {
    padding: 4px 4px;
  }
  .sn-ins-filters,
  .sn-tor-filters {
    gap: 6px;
  }
  .sn-ins-filters select,
  .sn-ins-filters input,
  .sn-tor-filters select,
  .sn-tor-filters input {
    font-size: 0.7rem;
    padding: 5px 8px;
  }
}
@media (max-width: 380px) {
  .sn-ins-dialog,
  .sn-tor-dialog {
    width: 98vw;
    padding: 10px 10px 12px;
  }
  .sn-ins-dialog-body table,
  .sn-tor-dialog-body table {
    font-size: 0.64rem;
  }
}
/* Helper para bloquear scroll background cuando modal abierto */
body.sn-ins-modal-open {
  overflow: hidden;
}

/* ===== CORRECCIÓN CONFLICTOS MOBILE SHORTCODES ===== */
@media (max-width: 768px) {
  .tor-content:not(.tor-reglamento):not(.tor-calendario):not(
      .tor-standings
    ):not(.tor-rondas):not(.tor-denuncias),
  .tor-sc-wrap {
    overflow-x: visible !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  .tor-tabs {
    padding-left: 12px !important;
    padding-right: 12px !important;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
  }
}
@media (max-width: 520px) {
  .tor-content:not(.tor-reglamento):not(.tor-calendario):not(
      .tor-standings
    ):not(.tor-rondas):not(.tor-denuncias),
  .tor-sc-wrap {
    overflow-x: visible !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
  .tor-tabs {
    padding-left: 8px !important;
    padding-right: 8px !important;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
  }
}

/* ===== Mejoras no invasivas ===== */
/* 1) Focus visible accesible (solo al navegar con teclado) */
.tor-std-tab:focus-visible,
.tor-res-tab:focus-visible,
.tor-reglamento-tab:focus-visible,
.tor-cal-act:focus-visible,
.tor-std-detalle:focus-visible,
.tor-res-close:focus-visible,
.tor-std-close:focus-visible,
.tor-den-actions .tor-btn:focus-visible,
.torneo-slider-prev:focus-visible,
.torneo-slider-next:focus-visible,
.torneo-slider-dot:focus-visible,
.torneo-card-btn:focus-visible {
  outline: 2px solid var(--tr-primary);
  outline-offset: 2px;
}
/* 2) Respeto a reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .torneo-cards-track {
    transition: none !important;
  }
}

/* ===== PANEL LATERAL SESIONES (shortcode) ===== */
.tor-ses-panel {
  --tor-ses-bg: #1a1a1a;
  --tor-ses-border: #333;
  --tor-ses-header-bg: #222;
  --tor-ses-radius: 8px;
  --tor-ses-scroll-track: #2a2a2a;
  --tor-ses-scroll-thumb: #555;
  background: var(--tor-ses-bg);
  border: 1px solid var(--tor-ses-border);
  border-radius: var(--tor-ses-radius);
  overflow: hidden;
}
.tor-ses-panel-header {
  background: var(--tor-ses-header-bg);
  padding: 12px 16px;
  border-bottom: 1px solid var(--tor-ses-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.tor-ses-panel-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tor-ses-panel-title i {
  color: var(--tor-ses-accent, #c90d05);
}
.tor-ses-panel-content {
  padding: 8px;
  max-height: 1200px;
  overflow-y: auto;
}
.tor-ses-panel-content::-webkit-scrollbar {
  width: 4px;
}
.tor-ses-panel-content::-webkit-scrollbar-track {
  background: var(--tor-ses-scroll-track);
}
.tor-ses-panel-content::-webkit-scrollbar-thumb {
  background: var(--tor-ses-scroll-thumb);
  border-radius: 2px;
}
.tor-ses-panel-content::-webkit-scrollbar-thumb:hover {
  background: #666;
}
.tor-loading-spinner {
  text-align: center;
  color: #999;
  padding: 20px;
  font-size: 0.9rem;
}
.tor-panel-error {
  text-align: center;
  color: #ff6b6b;
  padding: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}
.tor-panel-empty {
  text-align: center;
  color: #999;
  padding: 30px 20px;
}
.tor-panel-empty i {
  font-size: 2rem;
  margin-bottom: 8px;
  display: block;
}
.tor-panel-empty p {
  margin: 0;
  font-size: 0.9rem;
}
.tor-panel-section {
  margin-bottom: 16px;
}
.tor-panel-section:last-child {
  margin-bottom: 0;
}
.tor-panel-section-title {
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 8px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.9;
}
.tor-panel-card {
  --tor-panel-card-bg: #2a2a2a;
  --tor-panel-card-border: #333;
  --tor-panel-card-hover-bg: #2d2d2d;
  --tor-panel-card-hover-border: #444;
  background: var(--tor-panel-card-bg);
  border: 1px solid var(--tor-panel-card-border);
  border-radius: 6px;
  margin-bottom: 8px;
  overflow: hidden;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.tor-panel-card:last-child {
  margin-bottom: 0;
}
.tor-panel-card:hover {
  border-color: var(--tor-panel-card-hover-border);
  background: var(--tor-panel-card-hover-bg);
}
.tor-panel-card.en-curso {
  --tor-panel-card-border: #28a745;
  border-color: var(--tor-panel-card-border);
  box-shadow: 0 0 0 1px #28a74533, 0 0 8px #28a74533;
}
.tor-panel-card-header {
  padding: 8px 12px;
  background: #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 500;
}
.tor-panel-card-meta {
  display: flex;
  gap: 8px;
  align-items: center;
}
.tor-division {
  color: #aaa;
  font-weight: 500;
}
.tor-ronda-code {
  background: #c90d05;
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 600;
  font-size: 0.7rem;
}
.tor-tiempo-curso {
  --tor-tiempo-color: #28a745;
  color: var(--tor-tiempo-color);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}
.tor-tiempo-relativo {
  --tor-tiempo-rel-color: #ffc107;
  color: var(--tor-tiempo-rel-color);
  font-weight: 500;
}
.tor-pulse {
  animation: torPulse 2s infinite;
}
@keyframes torPulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}
.tor-panel-card-body {
  padding: 12px;
}
.tor-sesion-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.tor-sesion-icon {
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
}
.tor-sesion-details {
  flex: 1;
}
.tor-sesion-name {
  font-weight: 600;
  color: #fff;
  font-size: 0.85rem;
  line-height: 1.2;
}
.tor-competencia-name {
  color: #ccc;
  font-size: 0.75rem;
  margin-top: 2px;
}
.tor-pista-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 6px 8px;
  background: #222;
  border-radius: 4px;
}
.tor-flag-icon {
  width: 20px;
  height: 15px;
  border-radius: 2px;
}
.tor-pista-name {
  color: #ddd;
  font-size: 0.8rem;
  font-weight: 500;
}
.tor-panel-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.tor-fecha {
  color: #999;
  font-size: 0.75rem;
}
.tor-estado .tor-estado-badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
  line-height: 1.1;
}

/* Botones detalle / sanciones (estandarizar mini CTA) */
.tor-std-detalle,
.tor-res-detalle,
.tor-sanciones-btn-desc {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(
    --sn-grad-theme,
    linear-gradient(
      135deg,
      var(--sn-theme-primary, #c90d05),
      var(--sn-theme-primary-hover, #e01006) 55%
    )
  );
  border: 1px solid var(--sn-theme-primary-accent, #9e0a03);
  color: #fff !important;
  padding: 0.34rem 0.6rem;
  border-radius: 8px;
  font-size: 0.65rem;
  font-weight: 600;
  text-decoration: none !important;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  transition: filter 0.22s ease, transform 0.16s ease;
}
.tor-std-detalle:hover,
.tor-res-detalle:hover,
.tor-sanciones-btn-desc:hover {
  filter: brightness(1.13) saturate(1.05);
}
.tor-std-detalle:active,
.tor-res-detalle:active,
.tor-sanciones-btn-desc:active {
  transform: translateY(2px);
}
.tor-std-detalle i,
.tor-res-detalle i,
.tor-sanciones-btn-desc i {
  font-size: 0.9em;
}
/* Responsive panel */
@media (max-width: 768px) {
  .tor-ses-panel {
    border-radius: 6px;
  }
  .tor-ses-panel-header {
    padding: 10px 14px;
  }
  .tor-ses-panel-title {
    font-size: 0.85rem;
  }
  .tor-ses-panel-content {
    max-height: 400px;
  }
  .tor-panel-card-header {
    padding: 6px 10px;
    font-size: 0.7rem;
  }
  .tor-ses-panel .tor-panel-card-body {
    padding: 10px;
  }
  .tor-sesion-name {
    font-size: 0.8rem;
  }
  .tor-competencia-name {
    font-size: 0.7rem;
  }
  .tor-pista-name {
    font-size: 0.75rem;
  }
}
@media (max-width: 520px) {
  .tor-panel-content {
    max-height: 350px;
  }
  .tor-panel-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .tor-panel-card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

/* ===== Banners Slider ===== */
.sn-banners {
  position: relative;
  margin: 0;
}
.sn-banners-viewport {
  overflow: hidden;
  width: 100%;
  aspect-ratio: var(--sn-banners-ratio, auto);
  border-radius: 12px;
}
.sn-banners-track {
  display: flex;
  transition: transform 500ms ease;
}
.sn-banner-card {
  position: relative;
  display: block;
  height: 100%;
}
.sn-banner-card img,
.sn-banner-ph {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sn-banner-caption {
  position: absolute;
  left: 0.6rem;
  bottom: 0.6rem;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  font-size: 0.85rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
}
.sn-banner-card:hover .sn-banner-caption,
.sn-banner-card:focus .sn-banner-caption {
  opacity: 1;
}
.sn-banners-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #333;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}
.sn-banners-nav.prev {
  left: 8px;
}
.sn-banners-nav.next {
  right: 8px;
}
.sn-banners-nav:hover {
  background: rgba(0, 0, 0, 0.75);
}
.sn-banners-empty,
.sn-banners-error {
  text-align: center;
  padding: 0.8rem;
  color: #cfcfcf;
}

/* Torneo Fixture - layout por fases (columnas) y divisiones (filas) */
.torneo-fixture {
  color: #ddd;
}
.torneo-fixture-scroll {
  overflow-x: auto;
}
.torneo-fixture-inner {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 1fr);
  gap: 12px;
  padding: 8px 0;
}
.torneo-fixture-loading {
  text-align: center;
  padding: 0.75rem;
  background: #151515;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
}
.tfx-phase {
  background: #101010;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 8px;
  min-height: 100%;
}
.tfx-phase-title {
  margin: 0 0 6px 0;
  font-size: 1rem;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tfx-phase-range {
  font-size: 0.75rem;
  color: #9a9a9a;
}
.tfx-division {
  background: #161616;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  padding: 6px;
  margin-bottom: 8px;
}
.tfx-division-title {
  margin: 0 0 4px 0;
  font-weight: 600;
  font-size: 0.9rem;
  color: #eaeaea;
}
.tfx-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  padding: 6px 8px;
  margin-bottom: 6px;
}
.tfx-pos {
  color: #bdbdbd;
  font-weight: 600;
}
.tfx-arrow {
  color: #888;
  padding: 0 6px;
}
.tfx-dest {
  color: #cfcfcf;
}
.tfx-piloto {
  color: #9bd6ff;
  font-weight: 600;
  white-space: nowrap;
}
.tfx-piloto.empty {
  color: #777;
  font-weight: 400;
}
@media (max-width: 768px) {
  .torneo-fixture-inner {
    grid-auto-columns: minmax(180px, 1fr);
  }
}
/* Entrants (clasificados hacia esta división) */
.tfx-entrants {
  background: #121212;
  border: 1px dashed #2a2a2a;
  border-radius: 6px;
  padding: 6px 8px;
  margin-top: 6px;
}
.tfx-entrants-title {
  font-size: 0.8rem;
  color: #bdbdbd;
  margin-bottom: 4px;
}
.tfx-entrant {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
}
.tfx-entrant-name {
  color: #dfefff;
  font-weight: 600;
}
.tfx-entrant-from {
  color: #9a9a9a;
  font-size: 0.8rem;
}
.tfx-entrants.tfx-empty {
  color: #7d7d7d;
  font-style: italic;
  text-align: center;
}
