/* ===== Defaults seguros (no rompen nada si ya existen) ===== */
:root {
  --tr-primary: #c90d05;
  --tr-fg: #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: #2b2b2b;
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
}
.tor-den-modal .den-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}
.tor-den-modal .den-tabs button {
  background: #2b2b2b;
  color: #eee;
  border: 0;
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
}
.tor-den-modal .den-tabs button.on {
  background: #c90d05;
  color: #fff;
}
.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%;
  border-collapse: collapse;
  margin-top: 0.6rem;
  font-size: 0.78rem;
}
.tor-puntos-table th,
.tor-puntos-table td {
  padding: 0.4rem 0.5rem;
  border: 1px solid #2a2a2a;
  text-align: left;
}
.tor-puntos-table th {
  background: #181818;
  font-weight: 600;
  color: #e0e0e0;
}
.tor-puntos-table tbody tr:nth-child(even) {
  background: #151515;
}

/* ===== Sanciones ===== */
.tor-sanciones-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.8rem;
  font-size: 0.7rem;
  table-layout: fixed;
}
.tor-sanciones-table th,
.tor-sanciones-table td {
  border: 1px solid #2a2a2a;
  padding: 0.45rem 0.55rem;
  vertical-align: top;
  word-break: break-word;
  white-space: normal;
}
.tor-sanciones-table th {
  background: #181818;
  font-weight: 600;
  font-size: 0.66rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #cfcfcf;
}
.tor-sanciones-table tbody tr:nth-child(even) {
  background: #151515;
}
.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;
}

/* 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 */
.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: #1b1b1b;
  border: 1px solid #2a2a2a;
  color: var(--tr-fg);
  font-size: 0.78rem;
}
.tor-badge i,
.estado i,
.sancion i {
  width: 14px;
  height: 14px;
  font-size: 0.95em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* 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;
}
.tor-cal-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.75rem;
}
.tor-cal-table thead th {
  background: #151515;
  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;
}

/* Zebra */
.tor-cal-table tbody tr:nth-child(odd) {
  background: #121212;
}
.tor-cal-table tbody tr:nth-child(even) {
  background: #161616;
}
.tor-cal-table tbody tr:hover {
  background: #1b1b1b;
}

/* Countdown */
.tor-countdown {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  padding: 0.26rem 0.55rem;
  border-radius: 8px;
}
.tor-countdown .cd-label {
  font-size: 0.62rem;
  font-weight: 800;
  color: #d0d0d0;
}
.tor-countdown .cd-time {
  font-family: monospace;
  font-weight: 900;
  color: #fff;
}
.tor-countdown.ended {
  opacity: 0.7;
}

/* Responsive */
@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;
  }
}

/* ===== Tablas de Posiciones / Rondas (estilo común) ===== */
.tor-standings,
.tor-rondas {
  margin-top: 1rem;
}
.tor-standings-content,
.tor-rondas-content {
  margin-top: 0.6rem;
}
.tor-std-tab.on {
  background: #2b4f8a;
  color: #fff;
  border-color: #1e3558;
}
.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;
}

.tor-std-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}
.tor-std-table thead th {
  background: #151515;
  color: #e3e3e3;
  font-weight: 700;
  padding: 8px 10px;
  border-bottom: 1px solid #232323;
  text-align: center;
}
.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-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;
}
/* Chase column (blue background entire column) */
.tor-std-chase {
  background: #0d2242;
  color: #d7e7ff;
  font-weight: 700;
}

/* Rondas specific tweaks */
.tor-std-rondas thead th {
  font-size: 12px;
}
.tor-std-colcomp {
  width: 72px;
}
/* Emoji flag inline tweaks */
.tor-emoji-flag {
  display: inline-block;
  margin-right: 4px;
}
@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 {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #1f1f1f;
  border: 1px solid #2b2b2b;
  padding: 0.26rem 0.52rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.68rem;
}
.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: rgba(0, 0, 0, 0.6);
  display: none;
}
.tor-res-modal {
  position: absolute;
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
  width: min(1100px, 92vw);
  max-height: 90vh;
  overflow: hidden;
  background: #111;
  border: 1px solid #222;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
}
.tor-res-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #222;
  background: #151515;
}
.tor-res-head h4 {
  margin: 0;
  font-size: 1rem;
  color: #fff;
}
.tor-res-close {
  background: #1f1f1f;
  border: 1px solid #333;
  color: #eee;
  border-radius: 6px;
  padding: 0.3rem 0.5rem;
  cursor: pointer;
}
.tor-res-close:hover {
  background: #262626;
}

.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;
}

.tor-res-table-wrap {
  overflow: auto;
  border: 1px solid #222;
  border-radius: 8px;
}
.tor-res-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}
.tor-res-table thead th {
  position: sticky;
  top: 0;
  background: #181818;
  color: #e0e0e0;
  font-weight: 700;
  padding: 0.45rem 0.55rem;
  text-align: left;
  border-bottom: 1px solid #2a2a2a;
}
.tor-res-table tbody td {
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid #1b1b1b;
}
.tor-res-table tbody tr:nth-child(even) {
  background: #141414;
}
.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: #1f1f1f;
  border: 1px solid #2b2b2b;
  color: #e7e7e7;
  padding: 0.32rem 0.6rem;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
}
.tor-cal-act i {
  font-size: 0.9em;
}
.tor-cal-act:hover {
  background: #262626;
  border-color: #3a3a3a;
  color: #fff;
}
.tor-cal-act.tor-act-resultados {
  background: #123047;
  border-color: #1a4769;
  color: #d8ecff;
}
.tor-cal-act.tor-act-resultados:hover {
  background: #173c59;
  border-color: #215a86;
  color: #fff;
}
.tor-cal-act.tor-act-info {
  background: #2b2b2b;
  border-color: #3a3a3a;
  color: #e7e7e7;
}
.tor-cal-act.tor-act-info:hover {
  background: #363636;
}
.tor-res-table tbody tr:nth-child(odd) {
  background: #121212;
}

@media (max-width: 680px) {
  .tor-res-table {
    font-size: 0.7rem;
  }
  .tor-res-modal {
    top: 3%;
    width: 96vw;
  }
}

/* ===== Tabla de Posiciones ===== */
.tor-standings {
  margin-top: 1rem;
}
.tor-standings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}
.tor-std-tab {
  background: #1b1b1b;
  border: 1px solid #2a2a2a;
  color: #cfcfcf;
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  font-size: 0.74rem;
  cursor: pointer;
}
.tor-std-tab.on {
  background: #2b4f8a;
  border-color: #1e3558;
  color: #fff;
}
.tor-standings-content {
  background: #111;
  border: 1px solid #232323;
  border-radius: 10px;
  padding: 0.8rem;
}
.tor-std-dim-title {
  font-weight: 800;
  color: #fff;
  margin: 0.2rem 0 0.4rem;
  font-size: 0.9rem;
}
.tor-std-group-head {
  margin: 0.2rem 0 0.4rem;
}
.tor-std-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-std-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}
.tor-std-table thead th {
  background: #181818;
  color: #e0e0e0;
  font-weight: 700;
  padding: 0.45rem 0.55rem;
  text-align: left;
  border-bottom: 1px solid #2a2a2a;
  position: sticky;
  top: 0;
}
.tor-std-table tbody td {
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid #1b1b1b;
}
.tor-std-table tbody tr:nth-child(odd) {
  background: #121212;
}
.tor-std-table tbody tr:nth-child(even) {
  background: #151515;
}
.tor-td-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.tor-std-pos {
  font-weight: 900;
  color: #eaeaea;
  text-align: center;
}
.tor-std-total {
  font-weight: 900;
  color: #fff;
}
.tor-std-piloto {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.tor-std-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #2a2a2a;
}
.tor-std-actions {
  text-align: right;
}
.tor-std-detalle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #1f1f1f;
  border: 1px solid #2b2b2b;
  color: #e7e7e7;
  padding: 0.28rem 0.55rem;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
}
.tor-std-detalle:hover {
  background: #262626;
  border-color: #3a3a3a;
  color: #fff;
}

/* Detalle modal */
.tor-std-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.6);
  display: none;
}
.tor-std-modal {
  position: absolute;
  top: 6%;
  left: 50%;
  transform: translateX(-50%);
  width: min(900px, 92vw);
  max-height: 88vh;
  overflow: hidden;
  background: #111;
  border: 1px solid #222;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
}
.tor-std-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid #222;
  background: #151515;
}
.tor-std-head h4 {
  margin: 0;
  font-size: 1rem;
  color: #fff;
}
.tor-std-close {
  background: #1f1f1f;
  border: 1px solid #333;
  color: #eee;
  border-radius: 6px;
  padding: 0.3rem 0.5rem;
  cursor: pointer;
}
.tor-std-close:hover {
  background: #262626;
}
.tor-std-body {
  padding: 0.8rem;
  overflow: auto;
}
.tor-std-detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.76rem;
}
.tor-std-detail-table thead th {
  background: #181818;
  color: #e0e0e0;
  font-weight: 700;
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid #2a2a2a;
  position: sticky;
  top: 0;
}
.tor-std-detail-table tbody td {
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid #1b1b1b;
}

/* Rondas: ensure headers are centered even if global overrides set left alignment */
.tor-std-rondas thead th {
  text-align: center;
}
.tor-std-rondas thead th.tor-std-colcomp {
  text-align: center;
}

@media (max-width: 680px) {
  .tor-std-table {
    font-size: 0.7rem;
  }
  .tor-std-modal {
    top: 4%;
    width: 96vw;
  }
}

/* Extra small devices: make modal fullscreen-like and add inner padding */
@media (max-width: 420px) {
  .tor-std-modal {
    left: 50%;
    transform: translateX(-50%);
    width: 98vw;
    top: 2%;
    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;
}

/* ===== Responsive tweaks for Standings (mobile) ===== */
@media (max-width: 768px) {
  /* Preferir layout apilado en standings para legibilidad */
  .tor-standings .tor-std-table {
    font-size: 0.68rem;
  }
  .tor-standings .tor-std-actions {
    display: none;
  }
}
@media (max-width: 520px) {
  /* Usar el modo card-like ya definido (.tor-std-cardable) */
  .tor-standings .tor-std-table {
    font-size: 0.66rem;
  }
  .tor-standings .tor-std-avatar {
    width: 20px;
    height: 20px;
  }
}

/* ===== 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;
}

/* ===== Tablas apiladas (card-like) en móviles pequeños ===== */
@media (max-width: 520px) {
  /* Usar añadiendo clase .tor-std-cardable a las tablas renderizadas por JS */
  .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;
  }
}

/* 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;
  }
}

/* Wrapper para sanciones (mejor scroll en móviles) */
.den-san-table-wrap {
  overflow-x: auto;
}

/* Wrapper genérico para tablas anchas (posiciones, rondas) */
.tor-std-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Forzar contención de overflow en todos los módulos de 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;
}

/* Específicamente para elementos que pueden ser anchos */
.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;
  }
}

/* ================================================================== */
/*  PILLS DINÁMICOS (pegar al FINAL del CSS)                          */
/*  — Roles (rol-*), Estados de sanción/caso (estado-*), Sanciones    */
/*  Nota: usamos .tor-badge.<mod> para subir especificidad y no pisar */
/*        el fondo/borde/color base de .tor-badge                     */
/* ================================================================== */

/* ---------- ROLES (denuncias) ---------- */
.tor-badge.rol-denunciante {
  background: #1e2a3a;
  border-color: #2b4f8a;
  color: #d6e4ff;
}
.tor-badge.rol-denunciado {
  background: #2a1717;
  border-color: #6a2a2a;
  color: #ffd9d9;
}
.tor-badge.rol-involucrado {
  background: #1b1b1b;
  border-color: #2a2a2a;
  color: #e0e0e0;
}
.tor-badge.rol-apelante {
  background: #1f1a12;
  border-color: #6a5a20;
  color: #fff3cc;
}
.tor-badge.rol-sistema {
  background: #121a1d;
  border-color: #2a5a6a;
  color: #cbe4ea;
}
.tor-badge.rol-comisario-revisor {
  background: #151c13;
  border-color: #2e5a3b;
  color: #d9f0d9;
}
.tor-badge.rol-comisario-lider {
  background: #191129;
  border-color: #3e427a;
  color: #d0d4f0;
}

/* ---------- ESTADOS DE SANCIÓN / CASO ---------- */
.tor-badge.estado-en-proceso {
  background: #1a1f2b;
  border-color: #2b4f8a;
  color: #e6efff;
}
.tor-badge.estado-aplicado {
  background: #14251a;
  border-color: #2e5a3b;
  color: #e8ffe8;
}
.tor-badge.estado-rechazado {
  background: #2a1717;
  border-color: #6a2a2a;
  color: #ffd9d9;
}
.tor-badge.estado-sin-accion {
  background: #1b1c1e;
  border-color: #2a2e31;
  color: #d6d6d6;
}
.tor-badge.estado-aplazado {
  background: #2a2416;
  border-color: #6a5a20;
  color: #fff2cc;
}

/* ---------- ESTADOS (programación existentes) con especificidad ---------- */
.tor-badge.estado-programada {
  background: #2b4f8a;
  border-color: #1e3558;
  color: #fff;
}
.tor-badge.estado-completada {
  background: #2e5a3b;
  border-color: #1f3e29;
  color: #fff;
}
.tor-badge.estado-pendiente {
  background: #6a5a20;
  border-color: #4a3f16;
  color: #fff;
}
.tor-badge.estado-asignando {
  background: #503f85;
  border-color: #3a2d5f;
  color: #fff;
}
.tor-badge.estado-cancelada {
  background: #6a2a2a;
  border-color: #4a1d1d;
  color: #fff;
}
.tor-badge.estado-curso {
  background: #6a471f;
  border-color: #4a3115;
  color: #fff;
}
.tor-badge.estado-sala {
  background: #236d63;
  border-color: #1a4e47;
  color: #fff;
}
.tor-badge.estado-cerrada {
  background: #3e4347;
  border-color: #2a2e31;
  color: #fff;
}

/* ---------- SANCIONES (gravedades/tipos) con especificidad ---------- */
.tor-badge.sancion-minima {
  background: #161616;
  border-color: #3a3a3a;
  color: #d9d9d9;
}
.tor-badge.sancion-leve {
  background: #1b190f;
  border-color: #6a5e2a;
  color: #eadfba;
}
.tor-badge.sancion-moderada {
  background: #1c1510;
  border-color: #6a4826;
  color: #f0d1b6;
}
.tor-badge.sancion-grave {
  background: #1c1313;
  border-color: #6a2a2a;
  color: #f0c7c7;
}
.tor-badge.sancion-dsq-carrera {
  background: #1a1212;
  border-color: #7a3131;
  color: #f2c1c6;
}
.tor-badge.sancion-dsq-torneo {
  background: #191118;
  border-color: #6a2f56;
  color: #f0c7de;
}
.tor-badge.sancion-expulsion {
  background: #1a1212;
  border-color: #733030;
  color: #f0bbbb;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.tor-badge.sancion-tiempo {
  background: #121a1d;
  border-color: #2a5a6a;
  color: #cbe4ea;
}
.tor-badge.sancion-licencia {
  background: #131429;
  border-color: #3e427a;
  color: #d0d4f0;
}
.tor-badge.sancion-grid {
  background: #1c1510;
  border-color: #6a4826;
  color: #f0d1b6;
}
.tor-badge.sancion-puntos {
  background: #1c1313;
  border-color: #6a2a2a;
  color: #f0c7c7;
}
.tor-badge.sancion-semanas {
  background: #181120;
  border-color: #5a2a6a;
  color: #e0c7f0;
}

/* ---------- 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; /* similar a la barra de "no eventos" */
  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; /* Reducir altura ya que ahora todo está más compacto */
  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; /* estándar */
  -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: #c90d05;
  color: #fff;
  text-decoration: none;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.2s ease;
}

.torneo-card-btn:hover {
  background: #45a049;
  color: #fff;
  text-decoration: none;
}

/* Controles del slider */
.torneo-slider-controls {
  display: none; /* Se muestra via JS si hay >1 card */
  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; /* Aumentar altura para que sean más grandes */
  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; /* Hacer más grandes los patrocinadores */
  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; /* Aumentar fuente para el tamaño mayor */
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
}

/* Responsive breakpoints */
@media (min-width: 768px) {
  .torneo-card {
    flex: 0 0 calc(50% - 0.5rem); /* 2 cards por fila */
    height: 160px; /* Altura apropiada para desktop */
  }

  .torneo-card-image {
    flex: 0 0 100px;
  }

  .torneo-card-content {
    padding: 0.7rem; /* Más padding en desktop */
  }
}

@media (min-width: 1200px) {
  .torneo-card {
    flex: 0 0 calc(33.333% - 0.67rem); /* 3 cards por fila */
    height: 150px; /* Altura optimizada para pantallas grandes */
  }

  .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;
  }
}

/* ===== CORRECCIÓN CONFLICTOS MOBILE SHORTCODES ===== */
/* Contrarresta reglas de overflow-x que afectan contenido general */
@media (max-width: 768px) {
  /* Resetear overflow-x solo para contenido de shortcode no-tabla */
  .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;
  }

  /* Asegurar que los tabs tengan espaciado lateral correcto */
  .tor-tabs {
    padding-left: 12px !important;
    padding-right: 12px !important;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
  }
}

@media (max-width: 520px) {
  /* Mismo tratamiento para móviles más pequeños */
  .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 (suaviza transiciones/animaciones) */
@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 {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  overflow: hidden;
}

.tor-ses-panel-header {
  background: #222;
  padding: 12px 16px;
  border-bottom: 1px solid #333;
}

.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: #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: #2a2a2a;
}

.tor-ses-panel-content::-webkit-scrollbar-thumb {
  background: #555;
  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;
}

.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.8rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 8px 0;
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tor-panel-card {
  background: #2a2a2a;
  border: 1px solid #333;
  border-radius: 6px;
  margin-bottom: 8px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.tor-panel-card:last-child {
  margin-bottom: 0;
}

.tor-panel-card:hover {
  border-color: #444;
  background: #2d2d2d;
}

.tor-panel-card.en-curso {
  border-color: #28a745;
  box-shadow: 0 0 8px rgba(40, 167, 69, 0.2);
}

.tor-panel-card-header {
  padding: 8px 12px;
  background: #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
}

.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 {
  color: #28a745;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.tor-tiempo-relativo {
  color: #ffc107;
  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 6px;
}

/* Responsive para 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; /* sin espacios arriba/abajo */
}
.sn-banners-viewport {
  overflow: hidden;
  width: 100%;
  /* Altura responsiva por relación de aspecto si está definida */
  aspect-ratio: var(--sn-banners-ratio, auto);
  border-radius: 12px; /* esquinas redondeadas */
}
.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; /* solo visible al pasar el mouse */
  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; /* encima de la imagen */
}
.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;
}
