:root {
  --bg: #ffffff;
  --navy: #0c1f3c;
  --navy-2: #0f2748;
  --gold: #c9a227;
  --gold-dim: rgba(201, 162, 39, 0.15);
  --text: #1a2332;
  --muted: #5c677a;
  --border: #e6e9f0;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(12, 31, 60, 0.08);
  font-family: "DM Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

.hidden {
  display: none !important;
}

/* Login */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 40%);
}

.login-card {
  width: min(420px, 100%);
}

.login-card-wide {
  width: min(440px, 100%);
}

.login-portal-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.login-tab {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.login-tab.active {
  border-color: var(--navy);
  color: var(--navy);
  background: var(--gold-dim);
}

.login-jugador-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.link-like {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link-like.active {
  color: var(--navy);
  text-decoration: none;
}

.login-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.login-brand-logo {
  flex-shrink: 0;
  height: auto;
  max-height: 64px;
  width: auto;
  max-width: min(220px, 42vw);
  object-fit: contain;
}

.login-brand-text {
  min-width: 0;
}

.login-brand h1 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--navy);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--navy);
}

.login-form input {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}

.error-text {
  margin: 0;
  min-height: 1.25em;
  font-size: 0.875rem;
  color: #b42318;
}

/* Shell */
.shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--navy);
  color: #fff;
  padding: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 14px 18px;
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid var(--navy);
  text-align: center;
}

.sidebar-brand-logo {
  display: block;
  height: auto;
  max-height: 104px;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  object-fit: contain;
}

.nav {
  display: flex;
  flex-direction: column;
  padding: 12px 10px;
  gap: 2px;
}

.nav-link {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.nav-link.active {
  background: var(--gold-dim);
  color: var(--gold);
  font-weight: 600;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
}

.logo-slot {
  min-width: 0;
  flex: 1;
  max-width: 200px;
  height: 40px;
  display: flex;
  align-items: center;
}

.logo-placeholder {
  font-size: 0.8rem;
  color: var(--muted);
  border: 1px dashed var(--border);
  padding: 8px 14px;
  border-radius: 8px;
}

.logo-slot img {
  max-height: 40px;
  max-width: 180px;
  object-fit: contain;
}

.profile {
  position: relative;
}

.profile-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px 6px 6px;
  cursor: pointer;
  font: inherit;
  color: var(--navy);
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.profile-name {
  font-size: 0.9rem;
  font-weight: 600;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px;
  z-index: 20;
}

.profile-email {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 10px;
  word-break: break-all;
}

.profile-logout {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.profile-logout:hover {
  background: var(--navy-2);
}

.content {
  padding: 24px;
  flex: 1;
  background: #fafbfc;
}

.page-head h2 {
  margin: 0 0 4px;
  color: var(--navy);
  font-size: 1.5rem;
}

.muted {
  color: var(--muted);
  margin: 0;
  font-size: 0.9rem;
}

.grid {
  display: grid;
  gap: 20px;
}

.cards {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  margin-top: 20px;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 1px 0 rgba(12, 31, 60, 0.04);
}

.card.stat.accent {
  border-color: rgba(201, 162, 39, 0.35);
  background: linear-gradient(180deg, #fffef8 0%, #fff 100%);
}

.stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  margin-top: 8px;
}

.stat-value.sm {
  font-size: 1.25rem;
}

.stat-sub {
  margin-top: 8px;
  font-size: 0.85rem;
}

.chart-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  margin-top: 20px;
}

.dashboard-reps-card {
  margin-top: 16px;
}

.btn-sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-right: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  font-size: 1.25rem;
  cursor: pointer;
  flex-shrink: 0;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(10, 22, 40, 0.45);
}

.sidebar-backdrop:not(.hidden) {
  display: block;
}

body.sidebar-menu-open {
  overflow: hidden;
}

@media (max-width: 960px) {
  .chart-row {
    grid-template-columns: 1fr;
  }

  .btn-sidebar-toggle {
    display: inline-flex;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 950;
    width: min(280px, 88vw);
    max-width: 88vw;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
  }

  .sidebar.sidebar-open {
    transform: translateX(0);
  }

  .sidebar-brand {
    align-items: center;
    padding: 12px 14px 10px;
  }

  .sidebar-brand-logo {
    max-height: 80px;
    max-width: 100%;
    margin: 0 auto;
  }

  .nav-link {
    font-size: 0.9rem;
    padding: 12px 14px;
  }

  .main {
    width: 100%;
  }

  .topbar {
    padding: 0 12px;
  }

  .content {
    padding: 16px 12px 24px;
  }

  .logo-slot {
    max-width: 140px;
  }

  .grid.cards {
    grid-template-columns: 1fr;
  }
}

.chart-head h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  color: var(--navy);
}

.chart-wrap {
  position: relative;
  height: 280px;
  margin-top: 12px;
}

.agenda-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  max-height: 300px;
  overflow: auto;
}

.agenda-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  gap: 4px;
}

.agenda-list li:last-child {
  border-bottom: none;
}

.agenda-time {
  font-weight: 600;
  color: var(--navy);
}

.agenda-meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.placeholder {
  margin-top: 16px;
}

.camera-title {
  margin: 0 0 12px;
  color: var(--navy);
}

.camera-frame-wrap {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #0a1221;
}

.camera-frame {
  width: 100%;
  height: 360px;
  border: 0;
  display: block;
  background: #0a1221;
}

.camera-help {
  margin-top: 10px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.super-admin-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--navy);
}

.super-admin-form label.span-2,
.super-admin-form .span-2 {
  grid-column: 1 / -1;
}

.small-print {
  font-size: 0.8125rem;
  margin: 0 0 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.jugador-search-wrap {
  display: block;
  margin-bottom: 8px;
}

.jugador-search-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  font-size: 1rem;
}

.jugador-club-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.jugador-club-row-outer {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.jugador-club-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  font: inherit;
}

.jugador-club-row:hover {
  border-color: rgba(12, 31, 60, 0.25);
  box-shadow: var(--shadow);
}

.jugador-club-row-logo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: contain;
  background: #f4f6f9;
  flex-shrink: 0;
}

.jugador-club-row-main {
  flex: 1;
  min-width: 0;
}

.jugador-club-row-main strong {
  display: block;
  color: var(--navy);
}

.jugador-fav-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.jugador-fav-btn.is-fav {
  border-color: var(--gold);
  background: var(--gold-dim);
}

.jugador-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.jugador-video-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #0a1220;
  position: relative;
}

.jugador-video-card-inner {
  position: relative;
}

.jugador-video-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 10px;
  padding: 10px;
  background: #f4f6fa;
  border-top: 1px solid var(--border);
}

.jugador-action-btn {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  cursor: pointer;
  background: #fff;
  color: var(--text);
  line-height: 0;
  font-size: 1.15rem;
}

.jugador-action-btn svg {
  display: block;
}

.jugador-action-btn:hover {
  filter: brightness(0.96);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.jugador-action-btn--fav {
  color: var(--muted);
}

.jugador-action-btn--fav.is-fav {
  color: var(--gold);
  border-color: var(--gold);
  background: var(--gold-dim);
}

.jugador-action-btn--overlay {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.92);
}

.jugador-video-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #fff;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.jugador-s3-fav-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

/* Estrella sobre miniatura de club (sin vídeo): no tapa controles del reproductor */
.jugador-s3-fav-btn--overlay {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.92);
}

.jugador-video-dl-btn {
  flex: 1 1 auto;
  min-width: 8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.jugador-video-dl-btn svg {
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .jugador-video-toolbar {
    padding: 10px;
    gap: 10px;
  }

  .jugador-video-dl-btn {
    flex: 1 1 100%;
    min-height: 44px;
    font-size: 0.9rem;
  }

  .jugador-s3-fav-btn:not(.jugador-s3-fav-btn--overlay) {
    width: 44px;
    height: 44px;
  }
}

.jugador-s3-fav-btn:hover {
  background: #fff;
  color: var(--text);
}

.jugador-s3-fav-btn.is-fav {
  color: var(--gold);
  border-color: var(--gold);
  background: var(--gold-dim);
}

/* Jugadores: solo favoritos S3; sin calendario ni lista por fecha */
body.role-jugador #repeticiones-admin-only {
  display: none !important;
}

.rep-s3-fav-card {
  margin-bottom: 1rem;
}

.rep-s3-fav-heading {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}

.rep-s3-fav-sub {
  margin: 0 0 0.75rem;
}

.jugador-video-card video {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  background: #000;
  vertical-align: top;
}

.jugador-video-card-inner video {
  pointer-events: auto;
}

.jugador-video-card-meta {
  padding: 8px 10px;
  font-size: 0.8rem;
  color: var(--muted);
  background: #fff;
}

/* Mis cámaras / búsqueda: miniatura de club (misma rejilla que videos S3) */
.jugador-club-mini-stack {
  position: relative;
}

.jugador-club-thumb-open {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.jugador-club-thumb-logo-wrap {
  aspect-ratio: 16 / 10;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a1220;
  padding: 12px;
  box-sizing: border-box;
}

.jugador-club-thumb-logo-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.jugador-club-thumb-placeholder {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.jugador-club-thumb-caption strong {
  display: block;
  color: var(--text);
}

.jugador-video-share {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px 10px 10px;
  background: #f4f6fa;
  border-top: 1px solid var(--border);
}

.jugador-video-share-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.jugador-video-share-icons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.jugador-share-btn {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  cursor: pointer;
  background: #fff;
  color: var(--text);
  line-height: 0;
}

.jugador-share-btn svg {
  display: block;
}

.jugador-share-btn:hover {
  filter: brightness(0.96);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.jugador-share-fb {
  border-color: #1877f2;
  color: #1877f2;
}

.jugador-share-ig {
  border-color: #c13584;
  color: #c13584;
}

.jugador-share-wa {
  border-color: #25d366;
  color: #25d366;
}

.jugador-ios-save-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.jugador-ios-save-overlay.hidden {
  display: none;
}

.jugador-ios-save-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.jugador-ios-save-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  max-height: 92vh;
  overflow: auto;
  margin: 0 auto;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  background: #fff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.2);
}

.jugador-ios-save-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.jugador-ios-save-title {
  margin: 0 2.5rem 8px 0;
  font-size: 1.1rem;
}

.jugador-ios-save-hint {
  margin: 0 0 12px;
  font-size: 0.85rem;
}

.jugador-ios-save-video {
  width: 100%;
  max-height: 40vh;
  border-radius: 8px;
  background: #000;
  margin-bottom: 12px;
}

.jugador-ios-share-btn {
  width: 100%;
}

@media (max-width: 768px) {
  .jugador-video-actions {
    gap: 8px;
    padding: 10px 8px;
  }

  .jugador-action-btn {
    width: 44px;
    height: 44px;
  }
}

.form-grid input,
.form-grid select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}

.list-simple {
  display: grid;
  gap: 8px;
}

.rep-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 8px;
}

.rep-grid-dashboard {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.rep-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 0 rgba(12, 31, 60, 0.04);
}

.rep-card-preview {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0a1221;
}

.rep-preview-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rep-preview-fallback {
  width: 100%;
  height: 100%;
  min-height: 112px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.8rem;
}

.rep-preview-fallback a {
  color: var(--gold);
  font-weight: 600;
  text-decoration: none;
}

.rep-preview-fallback a:hover {
  text-decoration: underline;
}

.rep-card-body {
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.rep-card-meta {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.35;
}

.rep-card-meta strong {
  display: block;
  color: var(--navy);
  font-size: 0.9rem;
}

.rep-card .btn-danger {
  flex-shrink: 0;
  padding: 0.45rem 0.65rem;
  font-size: 0.8rem;
}

.rep-calendar-card {
  margin-bottom: 16px;
}

.repeticiones-admin-only {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

@media (max-width: 900px) {
  .repeticiones-admin-only {
    grid-template-columns: 1fr;
  }
}

.rep-cal-wrap-compact {
  margin-bottom: 0;
}

.rep-calendar {
  max-width: 420px;
}

.rep-calendar--compact {
  max-width: 100%;
}

.rep-calendar--compact .rep-cal-header {
  gap: 6px;
  margin-bottom: 8px;
}

.rep-calendar--compact .rep-cal-title {
  font-size: 0.88rem;
}

.rep-calendar--compact .rep-cal-arrow {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 1rem;
}

.rep-calendar--compact .rep-cal-weekdays {
  font-size: 0.62rem;
  gap: 2px;
  margin-bottom: 4px;
}

.rep-calendar--compact .rep-cal-days {
  gap: 4px;
}

.rep-calendar--compact .rep-cal-day {
  max-height: 34px;
  font-size: 0.75rem;
  border-radius: 8px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.rep-calendar--compact .rep-cal-day:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(12, 31, 60, 0.12);
}

.rep-calendar--compact .rep-cal-day:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

.rep-calendar--compact .rep-cal-day.has-video::after {
  bottom: 4px;
  width: 4px;
  height: 4px;
}

.rep-list-s3-admin {
  margin-top: 4px;
}

.rep-calendar-hint {
  margin: 12px 0 0;
  font-size: 0.875rem;
}

.rep-cal-wrap-compact .rep-calendar-hint {
  font-size: 0.8125rem;
  line-height: 1.4;
}

.rep-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.rep-cal-title {
  font-weight: 700;
  color: var(--navy);
  font-size: 1.05rem;
  flex: 1;
  text-align: center;
}

.rep-cal-arrow {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--navy);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.rep-cal-arrow:hover {
  background: var(--gold-dim);
  border-color: rgba(201, 162, 39, 0.45);
}

.rep-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 6px;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.rep-cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.rep-cal-day {
  aspect-ratio: 1;
  max-height: 48px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: #f3f5f9;
  color: var(--navy);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  position: relative;
}

.rep-cal-day:hover:not(:disabled) {
  background: var(--gold-dim);
}

.rep-cal-day:disabled {
  opacity: 0;
  cursor: default;
  pointer-events: none;
}

.rep-cal-day.is-today:not(.is-selected) {
  border-color: rgba(12, 31, 60, 0.2);
}

.rep-cal-day.is-selected {
  background: var(--navy);
  color: #fff;
  border-color: var(--gold);
  box-shadow: 0 4px 12px rgba(12, 31, 60, 0.2);
}

.rep-cal-day.has-video::after {
  content: "";
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

.rep-cal-day.is-selected.has-video::after {
  background: var(--gold);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.rep-card-meta small {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 400;
}

.rep-list-card {
  padding-top: 16px;
}

.list-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.list-item-main {
  font-size: 0.9rem;
  color: var(--text);
}

.btn-danger {
  background: #b42318;
  color: #fff;
}

.btn-danger:hover {
  background: #8f1b13;
}

.btn {
  padding: 0.65rem 1rem;
  border-radius: 8px;
  border: none;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background: var(--navy);
  color: #fff;
}

.btn-primary:hover {
  background: var(--navy-2);
}

.btn-secondary {
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: #f3f5f9;
}

.btn-ticket {
  background: linear-gradient(180deg, #fffef8 0%, #fff 100%);
  color: var(--navy);
  border: 1px solid rgba(201, 162, 39, 0.55);
  font-size: 0.8rem;
}

.btn-ticket:hover {
  background: var(--gold-dim);
  border-color: rgba(201, 162, 39, 0.85);
}

.form-agenda-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.config-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.config-section h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: var(--navy);
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}

.config-section .form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
}

.config-section .form-grid label.span-2 {
  grid-column: 1 / -1;
}

.config-section .form-grid input[readonly] {
  background: #f3f5f9;
  color: var(--muted);
}

.config-msg {
  margin: 0 0 12px;
  min-height: 1.25em;
  font-size: 0.9rem;
  color: #0d6e3e;
}

.config-msg.error {
  color: #b42318;
}

.cfg-logo-preview {
  margin-top: 10px;
  max-height: 80px;
  max-width: 220px;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px;
  background: #fafbfc;
}

.list-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}

.logo-mark {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
}

.logo-mark.sm {
  width: 36px;
  height: 36px;
  font-size: 0.75rem;
  border-radius: 10px;
}

/* ——— Torneos (admin) ——— */
.torneo-root {
  max-width: 1120px;
}

.torneo-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
}

@media (max-width: 960px) {
  .torneo-layout {
    grid-template-columns: 1fr;
  }
}

.torneo-panel {
  padding: 0;
  overflow: hidden;
}

.torneo-panel-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 20px 0;
}

.torneo-panel-ico {
  font-size: 2rem;
  line-height: 1;
}

.torneo-panel-title {
  margin: 0 0 4px;
  font-size: 1.2rem;
  color: var(--navy);
}

.torneo-panel-sub {
  margin: 0;
  font-size: 0.88rem;
}

.torneo-form-create {
  padding: 16px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.torneo-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.torneo-field-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--navy);
}

.torneo-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  background: #fff;
}

.torneo-input:focus {
  outline: none;
  border-color: rgba(201, 162, 39, 0.65);
  box-shadow: 0 0 0 3px var(--gold-dim);
}

.torneo-input--narrow {
  max-width: 5.5rem;
}

.torneo-input--sm {
  padding: 6px 8px;
  font-size: 0.85rem;
  border-radius: 8px;
}

.torneo-hint {
  margin: 0;
  font-size: 0.78rem;
}

.torneo-deporte-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

@media (max-width: 520px) {
  .torneo-deporte-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.torneo-deporte-opt {
  cursor: pointer;
  margin: 0;
}

.torneo-deporte-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.torneo-deporte-opt-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: #fafbfc;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.torneo-deporte-opt input:checked + .torneo-deporte-opt-inner {
  border-color: var(--gold);
  background: var(--gold-dim);
  box-shadow: 0 4px 14px rgba(12, 31, 60, 0.08);
}

.torneo-deporte-emoji {
  font-size: 1.75rem;
  line-height: 1;
}

.torneo-deporte-txt {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--navy);
}

.torneo-select-wrap {
  position: relative;
}

.torneo-select-ico {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  pointer-events: none;
  opacity: 0.85;
}

.torneo-select {
  width: 100%;
  padding: 10px 12px 10px 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  background: #fff;
  cursor: pointer;
}

.torneo-formato-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.torneo-formato-tile {
  cursor: pointer;
  margin: 0;
}

.torneo-formato-tile input {
  position: absolute;
  opacity: 0;
}

.torneo-formato-tile-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: 16px 12px;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: #fff;
  min-height: 108px;
  justify-content: center;
  transition: border-color 0.15s, background 0.15s;
}

.torneo-formato-tile input:checked + .torneo-formato-tile-inner {
  border-color: var(--navy);
  background: linear-gradient(180deg, #f0f5ff 0%, #fff 100%);
}

.torneo-formato-big {
  font-size: 2rem;
  line-height: 1;
}

.torneo-formato-t {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--navy);
}

.torneo-formato-d {
  font-size: 0.75rem;
}

.torneo-vueltas-ui {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.torneo-vueltas-quick {
  display: flex;
  gap: 6px;
}

.torneo-vbtn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  color: var(--navy);
  transition: background 0.15s, border-color 0.15s;
}

.torneo-vbtn:hover {
  border-color: var(--gold);
  background: var(--gold-dim);
}

.torneo-btn-create {
  align-self: flex-start;
  padding-left: 28px;
  padding-right: 28px;
}

.torneo-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 20px 22px;
}

.torneo-mini-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-left-color: #c5ced9;
  background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
  box-shadow: var(--shadow);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.torneo-mini-card:hover {
  box-shadow: 0 6px 20px rgba(12, 31, 60, 0.1);
}

.torneo-mini-card--padel,
.torneo-mini-card--tenis {
  border-left-color: #1a4a8c;
  background: linear-gradient(135deg, #fff 0%, #f3f7fc 100%);
}

.torneo-mini-card--padel .torneo-mini-ribbon,
.torneo-mini-card--tenis .torneo-mini-ribbon {
  background: linear-gradient(145deg, #dce8f8, #fff);
  border-color: rgba(26, 74, 140, 0.2);
}

.torneo-mini-card--padel .torneo-chip:first-child,
.torneo-mini-card--tenis .torneo-chip:first-child {
  background: rgba(26, 74, 140, 0.12);
  color: #0c1f3c;
}

.torneo-mini-card--futbol {
  border-left-color: #1a6b45;
  background: linear-gradient(135deg, #fff 0%, #f0faf5 100%);
}

.torneo-mini-card--futbol .torneo-mini-ribbon {
  background: linear-gradient(145deg, #d4ede0, #fff);
  border-color: rgba(26, 107, 69, 0.25);
}

.torneo-mini-card--futbol .torneo-chip:first-child {
  background: rgba(26, 107, 69, 0.14);
  color: #0d3d24;
}

.torneo-mini-card--basquetbol {
  border-left-color: #8b4513;
  background: linear-gradient(135deg, #fff 0%, #faf6f0 100%);
}

.torneo-mini-card--basquetbol .torneo-mini-ribbon {
  background: linear-gradient(145deg, #f0e0cc, #fff);
  border-color: rgba(139, 69, 19, 0.25);
}

.torneo-mini-card--basquetbol .torneo-chip:first-child {
  background: rgba(139, 69, 19, 0.14);
  color: #4a2c0d;
}

.torneo-mini-card--beisbol {
  border-left-color: #2e4a7a;
  background: linear-gradient(135deg, #fff 0%, #f3f6fb 100%);
}

.torneo-mini-card--beisbol .torneo-mini-ribbon {
  background: linear-gradient(145deg, #d8e2f0, #fff);
  border-color: rgba(46, 74, 122, 0.25);
}

.torneo-mini-card--beisbol .torneo-chip:first-child {
  background: rgba(46, 74, 122, 0.14);
  color: #1a2d4a;
}

.torneo-mini-card--softbol {
  border-left-color: #b85c2e;
  background: linear-gradient(135deg, #fff 0%, #fff8f3 100%);
}

.torneo-mini-card--softbol .torneo-mini-ribbon {
  background: linear-gradient(145deg, #f5dcc8, #fff);
  border-color: rgba(184, 92, 46, 0.28);
}

.torneo-mini-card--softbol .torneo-chip:first-child {
  background: rgba(184, 92, 46, 0.16);
  color: #4a2818;
}

.torneo-mini-card--voleibol {
  border-left-color: #6b52a8;
  background: linear-gradient(135deg, #fff 0%, #f6f3fb 100%);
}

.torneo-mini-card--voleibol .torneo-mini-ribbon {
  background: linear-gradient(145deg, #e4dcf5, #fff);
  border-color: rgba(107, 82, 168, 0.25);
}

.torneo-mini-card--voleibol .torneo-chip:first-child {
  background: rgba(107, 82, 168, 0.14);
  color: #2d1f4a;
}

.torneo-mini-ribbon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: linear-gradient(145deg, #e8ecf4, #fff);
  border: 1px solid var(--border);
}

.torneo-mini-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: var(--navy);
}

.torneo-mini-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.torneo-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #eef2f8;
  color: var(--navy);
}

.torneo-chip--muted {
  font-weight: 500;
  color: var(--muted);
  background: #f4f6fa;
}

.torneo-chip--accent {
  background: rgba(201, 162, 39, 0.2);
  color: #7a5f0a;
}

.torneo-mini-open {
  flex-shrink: 0;
}

.torneo-mini-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.torneo-empty {
  text-align: center;
  padding: 32px 16px;
}

.torneo-empty-ico {
  font-size: 3rem;
  display: block;
  margin-bottom: 8px;
  opacity: 0.45;
}

/* Detalle torneo */
.torneo-hero-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  margin-bottom: 20px;
  border-radius: 16px;
  background: linear-gradient(120deg, #0c1f3c 0%, #1a4a8c 55%, #153a6b 100%);
  color: #fff;
  box-shadow: var(--shadow);
}

.torneo-hero-bar--futbol {
  background: linear-gradient(120deg, #0d3d24 0%, #1a6b45 100%);
}

.torneo-hero-bar--basquetbol {
  background: linear-gradient(120deg, #4a2c0d 0%, #8b4513 100%);
}

.torneo-hero-bar--beisbol {
  background: linear-gradient(120deg, #1a2d4a 0%, #2e4a7a 100%);
}

.torneo-hero-bar--softbol {
  background: linear-gradient(120deg, #4a2818 0%, #b85c2e 55%, #8b3d1f 100%);
}

.torneo-hero-bar--voleibol {
  background: linear-gradient(120deg, #2d1f4a 0%, #4a3a7a 100%);
}

.torneo-back.btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.torneo-back.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.torneo-hero-main {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.torneo-hero-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.torneo-hero-qr-actions {
  display: inline-flex;
  gap: 8px;
}

.torneo-qr-box--hero {
  min-width: 110px;
  min-height: 110px;
  margin: 0;
  padding: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.torneo-qr-box--hero canvas {
  width: 100px !important;
  height: 100px !important;
  border-radius: 8px;
  background: #fff;
}

.torneo-hero-torneo-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  flex-shrink: 0;
}

.torneo-hero-main-text {
  min-width: 0;
}

.torneo-hero-emoji {
  font-size: 2.75rem;
  line-height: 1;
}

.torneo-hero-title {
  margin: 0 0 8px;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.torneo-hero-chips .torneo-chip {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.torneo-hero-chips .torneo-chip--muted {
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.1);
}

.torneo-tlogo-admin {
  margin-bottom: 20px;
  padding: 14px 18px;
}

.torneo-tlogo-strip-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

.torneo-tlogo-strip-label {
  font-weight: 700;
  color: var(--navy);
}

.torneo-tlogo-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.torneo-tlogo-hint {
  flex-basis: 100%;
  margin: 0;
}

.torneo-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 20px;
  margin-bottom: 20px;
}

.torneo-detail-grid--visual {
  grid-template-columns: 1fr;
}

@media (max-width: 900px) {
  .torneo-detail-grid {
    grid-template-columns: 1fr;
  }
}

.torneo-card-accent {
  background: linear-gradient(145deg, #0a1628 0%, #132a4a 100%);
  color: #e8ecf4;
  border: 1px solid rgba(201, 162, 39, 0.25);
}

.torneo-qr-card .torneo-sec-title {
  color: #fff;
}

.torneo-sec-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.torneo-sec-ico {
  font-size: 1.5rem;
  line-height: 1;
}

.torneo-sec-title {
  margin: 0;
  font-size: 1.05rem;
  color: var(--navy);
}

.torneo-link-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(201, 162, 39, 0.25);
  color: var(--gold);
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  border: 1px solid rgba(201, 162, 39, 0.45);
}

.torneo-link-pill:hover {
  background: rgba(201, 162, 39, 0.35);
}

.torneo-qr-box {
  display: flex;
  justify-content: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  margin: 8px 0 0;
}

.torneo-equipos-toolbar {
  margin-bottom: 12px;
}

.torneo-equipos-search-wrap {
  display: block;
  margin: 0;
}

.torneo-equipos-search {
  width: 100%;
  max-width: 22rem;
}

.torneo-equipos-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 16px;
  min-height: 2rem;
  align-items: start;
}

@media (min-width: 560px) {
  .torneo-equipos-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
  }
}

.torneo-team-chip {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f0f4fa;
  border: 1px solid var(--border);
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.torneo-team-head-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.torneo-team-head-row .torneo-team-head {
  flex: 1;
  min-width: 0;
}

.torneo-team-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: none;
  background: transparent;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.torneo-team-head .torneo-team-meta {
  align-items: flex-start;
}

.torneo-team-head .torneo-team-name {
  text-align: left;
}

.torneo-team-head-hint {
  font-size: 0.72rem;
  line-height: 1.25;
}

.torneo-team-head:hover .torneo-team-name {
  color: var(--gold-dark, #8a6d1a);
}

.torneo-team-head:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 8px;
}

.torneo-team-chevron {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(12, 31, 60, 0.06);
  color: var(--navy);
  transition: transform 0.2s ease, background 0.15s;
}

.torneo-team-chevron svg {
  display: block;
  transition: transform 0.2s ease;
}

.torneo-team-chip--open .torneo-team-chevron svg {
  transform: rotate(180deg);
}

.torneo-team-chip--open .torneo-team-chevron {
  background: var(--gold-dim);
  color: var(--navy);
}

.torneo-team-body {
  width: 100%;
  min-width: 0;
  padding-top: 10px;
}

.torneo-team-body.hidden {
  display: none;
}

.torneo-plantel {
  margin-top: 0;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.torneo-plantel-lbl {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}

.torneo-plantel-ul {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  max-height: 120px;
  overflow-y: auto;
}

.torneo-plantel-li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.82rem;
  padding: 4px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.torneo-plantel-nom {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.torneo-plantel-del {
  border: none;
  background: transparent;
  color: #b42318;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 4px;
}

.torneo-plantel-add {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.torneo-plantel-bulk {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.torneo-plantel-xls-lbl,
.torneo-plantel-fotos-lbl,
.torneo-plantel-foto-lbl {
  position: relative;
  cursor: pointer;
  margin: 0;
  overflow: hidden;
}

.torneo-plantel-foto {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #eef1f6;
}

.torneo-plantel-foto--ph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.torneo-plantel-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.torneo-plantel-cred {
  font-size: 0.72rem;
  line-height: 1.2;
}

.torneo-stats-picker {
  margin-bottom: 10px;
}

.torneo-stats-stack .torneo-stat-jor.hidden {
  display: none;
}

.torneo-stat-extra td {
  background: #fafbfd;
  padding: 12px !important;
}

.torneo-partido-extra {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.torneo-est-hint {
  margin: 0 0 10px;
}

.torneo-est-partido-glob {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-bottom: 12px;
}

.torneo-est-fwrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
  min-width: 140px;
  flex: 1 1 160px;
}

.torneo-est-equipos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

@media (max-width: 720px) {
  .torneo-est-equipos-grid {
    grid-template-columns: 1fr;
  }
}

.torneo-est-fieldset {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.torneo-est-fieldset legend {
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0 6px;
}

.torneo-est-inl {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-size: 0.8rem;
}

.torneo-est-inline {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.torneo-est-jug-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 900px) {
  .torneo-est-jug-grid {
    grid-template-columns: 1fr;
  }
}

.torneo-est-h6 {
  margin: 0 0 8px;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--navy);
}

.torneo-table--micro {
  font-size: 0.75rem;
}

.torneo-table--micro th,
.torneo-table--micro td {
  padding: 4px 6px;
}

.torneo-table-wrap--micro {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.torneo-table--micro {
  min-width: 16rem;
}

.torneo-est-jname {
  font-weight: 600;
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.torneo-pub-table-wrap {
  overflow-x: auto;
}

.torneo-pub-table--jug {
  min-width: 480px;
}

.torneo-team-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.torneo-team-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
  align-items: center;
}

.torneo-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.torneo-icon-btn:hover {
  background: #f0f4fa;
  border-color: #c5cdd9;
}

.torneo-icon-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.torneo-icon-btn--edit:hover {
  color: #0d47a1;
  border-color: rgba(13, 71, 161, 0.35);
  background: rgba(13, 71, 161, 0.06);
}

.torneo-icon-btn--del {
  color: #b42318;
  border-color: rgba(180, 35, 24, 0.25);
  background: rgba(180, 35, 24, 0.04);
}

.torneo-icon-btn--del:hover {
  background: rgba(180, 35, 24, 0.12);
  border-color: rgba(180, 35, 24, 0.45);
  color: #8a1c15;
}

.torneo-icon-btn:disabled,
.torneo-icon-btn.torneo-icon-btn--del:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.torneo-team-avatar--img {
  padding: 0;
  overflow: hidden;
  background: #fff;
}

.torneo-team-logoimg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.torneo-team-avatar {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--navy), var(--navy-2));
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.75rem;
}

.torneo-team-ini {
  position: relative;
  z-index: 1;
}

.torneo-team-avatar--haslogo::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid #fff;
}

.torneo-team-name {
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  color: var(--navy);
  line-height: 1.2;
  word-break: break-word;
}

.torneo-team-grupo {
  font-size: 0.7rem;
  color: var(--muted);
}

.torneo-inline-empty {
  margin: 0;
  font-size: 0.88rem;
}

.torneo-form-equipo {
  margin-top: 4px;
}

.torneo-form-equipo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
}

.torneo-avatar-add {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  background: #fafbfc;
}

.torneo-avatar-add:hover {
  border-color: var(--gold);
  background: var(--gold-dim);
}

.torneo-avatar-add-plus {
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1;
}

.torneo-avatar-add-preview {
  position: absolute;
  inset: 3px;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
}

.torneo-file-invis {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.torneo-avatar-add .torneo-file-invis {
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  clip: auto;
  pointer-events: auto;
  cursor: pointer;
}

.torneo-form-equipo-fields {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 160px;
}

.torneo-btn-add-team {
  align-self: center;
}

.torneo-form-equipo-submitcol {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  min-width: 7rem;
}

.torneo-quitar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
}

.torneo-quitar-logo input {
  width: auto;
  cursor: pointer;
}

.torneo-cal-gen {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.torneo-cal-gen-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.torneo-vueltas-compact {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
}

.torneo-vueltas-compact input {
  width: 4.5rem;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-weight: 700;
}

.torneo-standings-card,
.torneo-stats-capture-card,
.torneo-jornadas-card {
  margin-bottom: 18px;
}

.torneo-stats-capture-card--empty {
  opacity: 0.95;
}

.torneo-stats-legend {
  margin: 0 0 14px;
  line-height: 1.45;
}

.torneo-stat-jor {
  margin-bottom: 20px;
}

.torneo-stat-jor:last-of-type {
  margin-bottom: 12px;
}

.torneo-stat-jor-title {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--navy);
}

.torneo-table-wrap--stats {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  overscroll-behavior-x: contain;
}

.torneo-table--stats {
  font-size: 0.82rem;
  width: max-content;
  min-width: 100%;
}

.torneo-table--stats .torneo-th-n,
.torneo-table--stats .torneo-td-n {
  width: 2rem;
  text-align: center;
}

.torneo-table--stats .torneo-th-center {
  text-align: center;
}

.torneo-table--stats .torneo-th-state {
  white-space: nowrap;
}

.torneo-table--stats .torneo-stat-inp {
  width: 4.5rem;
  vertical-align: middle;
}

.torneo-table--stats .torneo-stat-inp .torneo-stat-score {
  width: 100%;
  min-width: 0;
}

.torneo-table--stats .torneo-stat-dash {
  text-align: center;
  width: 1.25rem;
  color: var(--muted);
  font-weight: 700;
}

.torneo-table--stats .torneo-stat-name {
  font-weight: 600;
}

.torneo-table--stats .torneo-stat-state {
  text-align: center;
  vertical-align: middle;
}

.torneo-stat-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.torneo-stat-tag--pend {
  background: #f0f2f7;
  color: var(--muted);
}

.torneo-stat-tag--ok {
  background: #e6f7ec;
  color: #146c2e;
}

.torneo-stats-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.torneo-jornada-stats-hint {
  margin: 0 0 10px;
  line-height: 1.45;
}

.torneo-jornadas-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 10px;
}

.torneo-jornadas-picker label {
  white-space: nowrap;
}

.torneo-jornadas-picker select {
  width: min(240px, 100%);
}

.torneo-standings-wrap {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  overscroll-behavior-x: contain;
}

.torneo-table-wrap {
  border-radius: 12px;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  overscroll-behavior-x: contain;
  border: 1px solid var(--border);
}

.torneo-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.torneo-table--stand {
  min-width: 34rem;
}

.torneo-table th,
.torneo-table td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
}

.torneo-table thead {
  background: #f4f6fa;
}

.torneo-th-rank {
  width: 2.5rem;
}

.torneo-td-rank {
  text-align: center;
  vertical-align: middle;
}

.torneo-medal {
  font-size: 1.15rem;
}

.torneo-rank-n {
  font-weight: 800;
  color: var(--muted);
  font-size: 0.9rem;
}

.torneo-stand-name {
  font-weight: 600;
  color: var(--navy);
}

.torneo-pts {
  display: inline-block;
  min-width: 2rem;
  padding: 2px 8px;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--gold-dim), #fff5d6);
  font-weight: 800;
  text-align: center;
  color: var(--navy);
}

.torneo-pts-h {
  font-weight: 700;
}

@media (max-width: 768px) {
  .torneo-root {
    max-width: 100%;
    overflow-x: hidden;
  }

  .torneo-standings-card,
  .torneo-stats-capture-card,
  .torneo-jornadas-card {
    padding-left: 12px;
    padding-right: 12px;
    overflow: visible;
  }

  .torneo-standings-wrap::before,
  .torneo-table-wrap--stats::before {
    content: 'Desliza horizontalmente para ver toda la tabla →';
    display: block;
    font-size: 0.72rem;
    color: var(--muted);
    margin-bottom: 8px;
    line-height: 1.35;
  }

  .torneo-table th,
  .torneo-table td {
    padding: 6px 8px;
    font-size: 0.78rem;
  }

  .torneo-table--stats .torneo-stat-name {
    max-width: 5.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
  }

  .torneo-stand-name {
    display: inline-block;
    max-width: 6.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
  }

  .torneo-table--stats {
    min-width: 28rem;
  }

  .torneo-table--stand {
    min-width: 30rem;
  }

  .torneo-stat-extra > td {
    display: block;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
  }

  .torneo-stats-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .torneo-stats-footer .btn {
    width: 100%;
  }

  .torneo-jornadas-picker {
    flex-wrap: wrap;
  }

  .torneo-jornadas-picker select {
    width: 100%;
    max-width: none;
  }
}

.torneo-grupo-block {
  margin-bottom: 18px;
}

.torneo-grupo-block:last-child {
  margin-bottom: 0;
}

.torneo-grupo-pill {
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  background: var(--navy);
  color: #fff;
  letter-spacing: 0.03em;
}

.torneo-jornada-block {
  margin-bottom: 24px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.torneo-jornada-block:last-child {
  border-bottom: none;
}

.torneo-jornada-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.torneo-jornada-head-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  flex: 1;
  min-width: 0;
}

.torneo-jornada-tlogo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 10px;
  background: #f4f6fa;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.torneo-jornada-head-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.torneo-jornada-tname {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.torneo-jornada-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  font-weight: 900;
  font-size: 0.85rem;
  background: linear-gradient(145deg, var(--navy), var(--navy-2));
  color: var(--gold);
}

.torneo-jornada-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--muted);
}

.torneo-jornada-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.torneo-jornada-btn-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  min-width: 38px;
  line-height: 0;
}

.torneo-jornada-btn-ico svg {
  display: block;
  flex-shrink: 0;
}

.torneo-jornada-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
}

@media (min-width: 720px) {
  .torneo-jornada-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
  }
}

/* Descansa: ancho completo; mismo bloque compacto que los duelos */
.torneo-jornada-body .torneo-bye-card {
  grid-column: 1 / -1;
  padding: 10px 14px;
  gap: 10px;
  border-radius: 12px;
}

/* Partidos de jornada: tarjetas más compactas para caber 2 por fila */
.torneo-jornada-body .torneo-duel {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  box-shadow: 0 2px 10px rgba(12, 31, 60, 0.04);
}

.torneo-jornada-body .torneo-duel-teams {
  gap: 6px;
  margin-bottom: 8px;
}

.torneo-jornada-body .torneo-duel-side {
  gap: 6px;
}

.torneo-jornada-body .torneo-duel-av,
.torneo-jornada-body .torneo-duel-logo {
  width: 32px;
  height: 32px;
  font-size: 0.6rem;
}

.torneo-jornada-body .torneo-duel-n {
  font-size: 0.78rem;
  line-height: 1.15;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  word-break: break-word;
}

.torneo-jornada-body .torneo-duel-vs {
  font-size: 0.62rem;
}

.torneo-jornada-body .torneo-duel-controls {
  gap: 6px 8px;
}

.torneo-jornada-body .torneo-duel-controls .torneo-input--sm {
  padding: 4px 6px;
  font-size: 0.76rem;
  border-radius: 7px;
}

.torneo-jornada-body .torneo-duel-controls input[type="date"] {
  max-width: 9rem;
  min-width: 0;
}

.torneo-jornada-body .torneo-duel-controls .torneo-input[data-horario] {
  width: 4.25rem;
  max-width: 100%;
}

.torneo-jornada-body .torneo-duel-marks {
  gap: 4px;
}

.torneo-jornada-body .torneo-score {
  width: 2.5rem;
  padding: 4px 2px;
  font-size: 0.78rem;
}

.torneo-jornada-markers {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
}

.torneo-jornada-markers-title {
  margin: 0 0 10px;
  font-size: 0.86rem;
  color: var(--navy);
}

.torneo-marker-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 56px auto 56px minmax(120px, 1fr);
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.torneo-marker-row:last-child {
  margin-bottom: 0;
}

.torneo-marker-team {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
}

.torneo-marker-team--right {
  text-align: right;
}

.torneo-jornada-body .torneo-bye-logo {
  width: 36px;
  height: 36px;
}

.torneo-jornada-body .torneo-bye-name {
  font-size: 0.9rem;
}

.torneo-duel {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  box-shadow: 0 4px 16px rgba(12, 31, 60, 0.05);
}

.torneo-duel-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.torneo-duel-side {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.torneo-duel-side--away {
  justify-content: flex-end;
  text-align: right;
}

.torneo-duel-av {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(145deg, #e8ecf4, #fff);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 900;
  color: var(--navy);
  flex-shrink: 0;
}

.torneo-duel-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: #fff;
}

.torneo-duel-n {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--navy);
  line-height: 1.2;
  word-break: break-word;
}

.torneo-duel-vs {
  font-size: 0.72rem;
  font-weight: 900;
  color: var(--muted);
  letter-spacing: 0.12em;
  flex-shrink: 0;
}

.torneo-duel-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.torneo-duel-marks {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.torneo-score {
  width: 3.25rem;
  text-align: center;
  font-weight: 800;
}

.torneo-duel-dash {
  font-weight: 800;
  color: var(--muted);
}

.torneo-bye-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px dashed var(--border);
  background: #fafbfc;
}

.torneo-bye-ico {
  font-size: 1.75rem;
}

.torneo-bye-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: #fff;
}

.torneo-bye-lbl {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.torneo-bye-name {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy);
}

.torneo-flyer-hidden {
  position: absolute;
  left: -9999px;
  top: 0;
  width: 520px;
}

.torneo-flyer {
  background: linear-gradient(160deg, #0a1628 0%, #1a3a6e 55%, #0d2138 100%);
  color: #f0f4fc;
  padding: 28px 24px;
  border-radius: 16px;
  border: 2px solid rgba(201, 162, 39, 0.45);
  box-shadow: 0 12px 40px rgba(8, 20, 40, 0.45);
}

.torneo-flyer-logo {
  max-height: 56px;
  max-width: 200px;
  object-fit: contain;
  display: block;
  margin: 0 auto 16px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
}

.torneo-flyer-title {
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.torneo-flyer-sub {
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.88;
  margin: 8px 0 20px;
  color: rgba(240, 244, 252, 0.9);
}

.torneo-flyer-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.torneo-flyer-table td {
  padding: 8px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.torneo-flyer-table td:nth-child(2) {
  text-align: center;
  color: var(--gold);
  font-weight: 700;
}

/* ——— Torneo público (QR) ——— */
.torneo-public-body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #f0f4fa 0%, #fff 45%);
}

.torneo-pub-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.torneo-pub-hero {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
  padding: 24px;
  background: linear-gradient(135deg, #0c1f3c 0%, #153a6b 100%);
  border-radius: var(--radius);
  color: #fff;
  box-shadow: var(--shadow);
}

.torneo-pub-club-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  padding: 6px;
  flex-shrink: 0;
}

.torneo-pub-club-fallback {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: rgba(201, 162, 39, 0.25);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.torneo-pub-hero-text {
  flex: 1;
  min-width: 0;
}

.torneo-pub-club-name {
  margin: 0 0 4px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.85;
}

.torneo-pub-title-block {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  min-width: 0;
}

.torneo-pub-torneo-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  flex-shrink: 0;
}

.torneo-pub-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.torneo-pub-meta {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

.torneo-pub-section {
  margin-bottom: 16px;
}

.torneo-pub-h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  color: var(--navy);
}

.torneo-pub-accum {
  margin: -4px 0 14px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.torneo-pub-jornada-pick {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.torneo-pub-jornada-pick label {
  font-size: 0.82rem;
}

.torneo-pub-jornada-pick select,
#torneo-pub-result-search,
#torneo-pub-result-cancha,
#torneo-pub-result-fecha {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  border-radius: 10px;
  padding: 7px 10px;
  font: inherit;
}

.torneo-pub-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) minmax(170px, 1fr) minmax(150px, 1fr);
  gap: 8px;
  margin: 0 0 10px;
}

#torneo-pub-result-search {
  width: 100%;
}

@media (max-width: 760px) {
  .torneo-pub-filters {
    grid-template-columns: 1fr;
  }
}

.torneo-pub-next-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-bottom: 14px;
}

.torneo-pub-jbadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  font-weight: 900;
  font-size: 0.85rem;
  background: linear-gradient(145deg, var(--navy), var(--navy-2));
  color: var(--gold);
  flex-shrink: 0;
}

.torneo-pub-next-tlogo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 10px;
  background: #f4f6fa;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.torneo-pub-next-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.torneo-pub-next-tname {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.torneo-pub-h2--jornada-num {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--muted);
}

.torneo-pub-h3 {
  margin: 12px 0 8px;
  font-size: 0.95rem;
}

.torneo-pub-results,
.torneo-pub-next {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
}

.torneo-pub-results li,
.torneo-pub-next li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.torneo-pub-results li:last-child,
.torneo-pub-next li:last-child {
  border-bottom: none;
}

.torneo-pub-j {
  display: inline-block;
  min-width: 2.5rem;
  font-size: 0.75rem;
  color: var(--muted);
  margin-right: 6px;
}

.torneo-pub-table {
  font-size: 0.82rem;
}

/* Soporte técnico: grid 4 columnas × 2 filas (8 embeds) */
.soporte-embed-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: 1100px;
}

@media (max-width: 900px) {
  .soporte-embed-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .soporte-embed-grid {
    grid-template-columns: 1fr;
  }
}

.soporte-embed-cell {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 10px;
  background: #0e1628;
  border: 1px solid var(--border);
}

.soporte-embed-cell iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.soporte-embed-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 8px;
  text-align: center;
}

.super-soporte-yt-form .span-2 {
  grid-column: span 2;
}

@media (max-width: 640px) {
  .super-soporte-yt-form .span-2 {
    grid-column: span 1;
  }
}

.form-cancha-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  grid-column: 1 / -1;
}

.list-item-actions .btn-icon-only {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  padding: 8px 10px;
  line-height: 0;
}

.list-item-actions .btn-icon-only svg {
  display: block;
  flex-shrink: 0;
}

/* Lives (FFmpeg → YouTube/Facebook) */
.lives-card .lives-req {
  line-height: 1.45;
  margin-bottom: 16px;
}

.lives-source-row,
.lives-platform-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-bottom: 16px;
}

.live-device-preview {
  display: block;
  width: 100%;
  max-width: 480px;
  max-height: 270px;
  margin: 0 0 14px;
  border-radius: 12px;
  background: #0a1628;
  object-fit: cover;
}

.live-device-preview.hidden {
  display: none;
}

.lives-radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
}

.live-status-box {
  padding: 12px 14px;
  border-radius: 10px;
  background: #f4f6fa;
  border: 1px solid var(--border);
  margin-bottom: 16px;
  min-height: 3rem;
}

.live-status-box .live-plat {
  text-transform: capitalize;
}

.live-log-tail {
  margin: 10px 0 0;
  padding: 10px;
  font-size: 0.75rem;
  background: #0e1628;
  color: #c8d0e0;
  border-radius: 8px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.lives-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* Super admin — Pagos y Facturas */
.super-pagos-table-wrap {
  overflow-x: auto;
  margin-top: 8px;
}

.super-pagos-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.super-pagos-table th,
.super-pagos-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.super-pagos-table th {
  font-weight: 700;
  color: var(--navy);
  background: #f8fafc;
}

.super-pagos-th-actions {
  width: 11rem;
  text-align: center;
}

.super-pagos-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.super-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.super-icon-btn:hover {
  background: var(--gold-dim);
  border-color: var(--gold);
}

.super-icon-btn--danger:hover {
  background: #fde8e8;
  border-color: #c53030;
  color: #c53030;
}

.super-icon-btn--ok:hover {
  background: #e6ffed;
  border-color: #276749;
  color: #276749;
}

.super-icon-btn svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: currentColor;
}

.super-estatus {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
}

.super-estatus--activa {
  background: #e6ffed;
  color: #276749;
}

.super-estatus--suspendida {
  background: #fde8e8;
  color: #c53030;
}

.super-facturas-busqueda {
  margin-bottom: 16px;
}

.super-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.super-modal.hidden {
  display: none !important;
}

.super-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 31, 60, 0.45);
}

.super-modal-panel {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.super-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 2rem;
  height: 2rem;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.super-modal-title {
  margin: 0 0 8px;
  font-size: 1.15rem;
  color: var(--navy);
}
