:root {
  --sn-blue: #0b5fff;
  --sn-blue-dark: #0847c7;
  --sn-blue-deep: #062a75;
  --sn-sky: #e8f1ff;
  --sn-ink: #0f172a;
  --sn-muted: #64748b;
  --sn-card: #ffffff;
}

.app-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at top right, rgba(11, 95, 255, 0.16), transparent 42%),
    radial-gradient(circle at bottom left, rgba(8, 71, 199, 0.10), transparent 45%),
    linear-gradient(180deg, #f4f8ff 0%, var(--sn-sky) 100%);
  color: var(--sn-ink);
}

.app-main {
  flex: 1 0 auto;
}

.app-footer {
  flex-shrink: 0;
  margin-top: 2rem;
  padding: 1rem 0 1.35rem;
  border-top: 1px solid rgba(11, 95, 255, 0.10);
  background: rgba(255, 255, 255, 0.72);
}

.app-footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--sn-muted);
}

.app-footer-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.app-footer-links a {
  color: var(--sn-blue-deep);
  text-decoration: none;
  font-weight: 600;
}

.app-footer-links a:hover {
  text-decoration: underline;
}

.legal-page .legal-prose p,
.legal-page .legal-prose li {
  line-height: 1.55;
}

.legal-page .legal-prose h2.section-title {
  margin-top: 1.35rem;
}

.legal-page .legal-prose h2.section-title:first-child {
  margin-top: 0;
}

.app-nav {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(11, 95, 255, 0.10);
}

.app-nav .navbar-brand {
  color: var(--sn-blue-deep);
  letter-spacing: 0.02em;
}

.app-nav .navbar-brand-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

.navbar-brand-tournament {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  gap: 0.1rem;
  max-width: min(70vw, 22rem);
  text-decoration: none;
}

.navbar-tournament-name {
  font-size: 1.05rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.navbar-powered-by {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #8b97ab;
  white-space: nowrap;
}

.app-main {
  padding-top: 1.25rem;
  padding-bottom: 2.5rem;
  max-width: 760px;
}

.btn-sn-primary {
  background: var(--sn-blue);
  border-color: var(--sn-blue);
  color: #fff;
}

.btn-sn-primary:hover,
.btn-sn-primary:focus {
  background: var(--sn-blue-dark);
  border-color: var(--sn-blue-dark);
  color: #fff;
}

/* Páginas de login / registro: pantalla completa, sin navbar */
.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-page {
  width: 100%;
  max-width: 440px;
  padding: 1.25rem;
}

.auth-flash {
  margin-bottom: 1rem;
}

.auth-shell {
  display: flex;
  justify-content: center;
}

.auth-card {
  width: 100%;
  background: var(--sn-card);
  border-radius: 1.1rem;
  padding: 1.75rem 1.35rem;
  box-shadow: 0 14px 40px rgba(6, 42, 117, 0.12);
  border: 1px solid rgba(11, 95, 255, 0.08);
}

.auth-brand {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sn-blue);
  margin-bottom: 1.25rem;
}

.auth-title {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--sn-blue-deep);
  margin-bottom: 1.25rem;
}

.auth-subtitle {
  color: var(--sn-muted);
  margin-top: -0.75rem;
  margin-bottom: 1.25rem;
}

.auth-form .form-label {
  font-weight: 600;
  color: var(--sn-ink);
}

.auth-form .form-control-lg {
  min-height: 3.1rem;
  font-size: 1.05rem;
  border-radius: 0.7rem;
}

.auth-form .form-control:focus {
  border-color: var(--sn-blue);
  box-shadow: 0 0 0 0.2rem rgba(11, 95, 255, 0.18);
}

.auth-form .btn-lg {
  min-height: 3.15rem;
  font-weight: 600;
  border-radius: 0.7rem;
}

.auth-footer {
  margin: 1.35rem 0 0;
  text-align: center;
  color: var(--sn-muted);
  font-size: 0.98rem;
}

.auth-footer a {
  color: var(--sn-blue);
  font-weight: 700;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.auth-legal-links {
  text-align: center;
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
  color: var(--sn-muted);
}

.auth-legal-links a {
  color: var(--sn-blue-deep);
  font-weight: 600;
  text-decoration: none;
}

.auth-legal-links a:hover {
  text-decoration: underline;
}

.auth-inline-link {
  color: var(--sn-blue);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}

.auth-inline-link:hover {
  text-decoration: underline;
}

.flash-stack {
  margin-bottom: 1rem;
}

.home-hero {
  background: var(--sn-card);
  border-radius: 1rem;
  padding: 1.75rem 1.25rem;
  box-shadow: 0 10px 30px rgba(6, 42, 117, 0.10);
}

.home-hero h1 {
  color: var(--sn-blue-deep);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

/* Cuenta / perfil */
.account-page {
  padding-bottom: 1rem;
}

.account-header h1 {
  color: var(--sn-blue-deep);
  font-weight: 800;
  font-size: 1.75rem;
  margin-bottom: 0.35rem;
}

.account-lead {
  color: var(--sn-muted);
  margin-bottom: 1.25rem;
}

.account-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  overflow-x: auto;
}

.account-tab {
  flex: 1;
  text-align: center;
  padding: 0.7rem 0.85rem;
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.7);
  color: var(--sn-muted);
  text-decoration: none;
  font-weight: 600;
  border: 1px solid rgba(11, 95, 255, 0.10);
  white-space: nowrap;
}

.account-tab.active {
  background: var(--sn-blue);
  color: #fff;
  border-color: var(--sn-blue);
}

.card-block {
  background: var(--sn-card);
  border-radius: 1rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 10px 30px rgba(6, 42, 117, 0.08);
  border: 1px solid rgba(11, 95, 255, 0.08);
}

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--sn-blue-deep);
  margin-bottom: 0.25rem;
}

.section-hint {
  color: var(--sn-muted);
  font-size: 0.92rem;
  margin-bottom: 1rem;
}

.account-form .form-label {
  font-weight: 600;
}

.account-form .form-control-lg,
.account-form .form-select-lg {
  min-height: 3rem;
  border-radius: 0.7rem;
}

.account-progress .progress {
  height: 0.65rem;
  border-radius: 999px;
  background: #e8eefc;
}

.account-progress .progress-bar {
  background: var(--sn-blue);
}

.home-hero-compact {
  padding: 1.25rem 1.25rem 1rem;
  margin-bottom: 1rem;
}

.home-hero-compact h1 {
  font-size: 1.55rem;
  margin-bottom: 0.25rem;
}

.share-code-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(11, 95, 255, 0.10);
}

.share-code-label {
  display: block;
  font-size: 0.85rem;
  color: var(--sn-muted);
  font-weight: 600;
}

.share-code-value {
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.share-code-card .share-code-value {
  font-size: 1.15rem;
}

.home-role-chooser {
  margin-bottom: 1.25rem;
  padding: 1.15rem 1.15rem 1.25rem;
}

.home-role-chooser-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.home-role-chooser-lead {
  font-size: 0.92rem;
}

.home-role-grid {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 576px) {
  .home-role-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.home-role-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(11, 95, 255, 0.14);
  border-radius: 12px;
  background: rgba(11, 95, 255, 0.03);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

a.home-role-card:hover {
  border-color: rgba(11, 95, 255, 0.35);
  background: rgba(11, 95, 255, 0.07);
  color: inherit;
}

.home-role-card-static {
  background: #f7f8fa;
  border-color: rgba(0, 0, 0, 0.08);
}

.home-role-card-title {
  font-weight: 700;
  font-size: 0.98rem;
}

.home-role-card-hint {
  font-size: 0.86rem;
  color: var(--sn-muted);
  line-height: 1.35;
}

.org-checklist {
  padding: 0.9rem 1rem;
  border: 1px solid rgba(11, 95, 255, 0.12);
  border-radius: 12px;
  background: rgba(11, 95, 255, 0.03);
}

.org-checklist-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.65rem;
}

.org-checklist-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.org-checklist-item {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}

.org-checklist-mark {
  flex: 0 0 1.5rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: #e8ecf2;
  color: #445;
}

.org-checklist-item.is-done .org-checklist-mark {
  background: #d1fae5;
  color: #065f46;
}

.org-checklist-item.is-wait .org-checklist-mark {
  background: #fef3c7;
  color: #92400e;
}

.org-checklist-item.is-locked {
  opacity: 0.72;
}

.org-checklist-body {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.org-checklist-body a {
  font-weight: 600;
  text-decoration: none;
}

.org-checklist-body a:hover {
  text-decoration: underline;
}

.org-checklist-meta {
  font-size: 0.82rem;
  color: var(--sn-muted);
  line-height: 1.3;
}

.create-advanced {
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 0.75rem 1rem 1rem;
  background: #fafbfc;
}

.create-advanced-summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.98rem;
  list-style-position: outside;
}

.create-advanced-summary::-webkit-details-marker {
  color: var(--sn-muted);
}

.teams-section {
  margin-bottom: 1.5rem;
}

.tournaments-section {
  margin-top: 0.5rem;
}

.home-subsection-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--sn-blue-deep);
  margin: 0.85rem 0 0.55rem;
}

.home-section-head {
  margin-bottom: 0;
  align-items: center;
}

.home-section-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.home-section-title-wrap h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--sn-blue-deep);
}

.home-section-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.55rem;
  height: 1.55rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--sn-blue-deep);
  background: rgba(11, 95, 255, 0.1);
  border: 1px solid rgba(11, 95, 255, 0.12);
}

.home-finished-wrap {
  margin-top: 1rem;
}

.home-finished-toggle {
  border-color: rgba(15, 23, 42, 0.14);
  color: #475569;
}

.home-finished-list {
  margin-top: 0.75rem;
}

.home-finished-list[hidden] {
  display: none !important;
}

.home-area-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.35rem 0 0.85rem;
}

.home-area-divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(11, 95, 255, 0.22),
    transparent
  );
}

.home-area-divider-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sn-blue-deep);
}

.home-area-divider-icon {
  display: block;
  opacity: 0.85;
}

.teams-section.card-block.sn-section-collapse {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.teams-section.card-block.sn-section-collapse > .sn-section-body {
  margin-top: 0.9rem;
}

.teams-section.card-block.sn-section-collapse:not(.is-open) > .sn-section-body {
  margin-top: 0;
}

.search-city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.55rem 0.75rem;
  max-height: 14rem;
  overflow: auto;
  padding: 0.75rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(11, 95, 255, 0.1);
  background: rgba(232, 241, 255, 0.35);
}

.search-city-grid.is-disabled {
  opacity: 0.55;
}

.search-city-check {
  align-items: flex-start;
}

.sn-multi-select {
  position: relative;
}

.sn-multi-select-trigger {
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  width: 100%;
}

.sn-multi-select-label {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 0.25rem;
}

.sn-multi-select-panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid rgba(11, 95, 255, 0.14);
  border-radius: 0.85rem;
  box-shadow: 0 12px 28px rgba(6, 42, 117, 0.12);
  padding: 0.55rem;
}

.sn-multi-select-options {
  display: grid;
  gap: 0.15rem;
  max-height: 14rem;
  overflow: auto;
  padding-top: 0.15rem;
}

.sn-multi-select-option {
  padding: 0.45rem 0.55rem;
  border-radius: 0.55rem;
}

.sn-multi-select-option:hover {
  background: rgba(232, 241, 255, 0.65);
}

.sn-multi-select-divider {
  height: 1px;
  margin: 0.35rem 0.25rem;
  background: rgba(11, 95, 255, 0.1);
}

.sn-multi-select.is-all .sn-multi-select-options {
  opacity: 0.55;
}

@media (min-width: 576px) {
  .w-sm-auto {
    width: auto !important;
  }
}

.tournament-banner,
.tournament-banner-preview {
  width: 100%;
  min-height: 120px;
  border-radius: 1rem;
  background-size: cover;
  background-position: center;
  background-color: rgba(11, 95, 255, 0.12);
  border: 1px solid rgba(11, 95, 255, 0.10);
}

.tournament-banner {
  min-height: 140px;
}

/* Marca del torneo (aplicada en body.tournament-theme) */
body.tournament-theme.app-body {
  background: var(--tn-secondary, #e8f1ff);
}

body.tournament-theme .app-nav {
  background: var(--tn-navbar, rgba(255, 255, 255, 0.96)) !important;
  border-bottom-color: color-mix(in srgb, var(--tn-primary, #0b5fff) 18%, transparent);
}

body.tournament-theme.tn-nav-dark .app-nav .navbar-brand,
body.tournament-theme.tn-nav-dark .app-nav .nav-link {
  color: #fff;
}

body.tournament-theme.tn-nav-dark .app-nav .navbar-powered-by {
  color: rgba(255, 255, 255, 0.55);
}

body.tournament-theme.tn-nav-dark .app-nav .nav-link:hover,
body.tournament-theme.tn-nav-dark .app-nav .nav-link:focus {
  color: rgba(255, 255, 255, 0.85);
}

body.tournament-theme.tn-nav-light .app-nav .navbar-brand,
body.tournament-theme.tn-nav-light .app-nav .nav-link {
  color: #0f172a;
}

body.tournament-theme.tn-nav-light .app-nav .navbar-powered-by {
  color: #8b97ab;
}

body.tournament-theme h1,
body.tournament-theme .team-hero-title,
body.tournament-theme .account-header h1,
body.tournament-theme .section-title {
  color: var(--tn-primary, var(--sn-blue-deep));
}

body.tournament-theme .btn-sn-primary {
  background: var(--tn-primary, var(--sn-blue));
  border-color: var(--tn-primary, var(--sn-blue));
  color: #fff;
}

body.tournament-theme .btn-sn-primary:hover,
body.tournament-theme .btn-sn-primary:focus {
  background: color-mix(in srgb, var(--tn-primary, #0b5fff) 85%, #000);
  border-color: color-mix(in srgb, var(--tn-primary, #0b5fff) 85%, #000);
  color: #fff;
}

body.tournament-theme .team-code {
  color: var(--tn-primary, var(--sn-blue));
}

body.tournament-theme .auth-inline-link {
  color: var(--tn-primary, var(--sn-blue));
}

.tournament-team-admin-card {
  flex-wrap: wrap;
  align-items: flex-start;
}

.tournament-team-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
  width: 100%;
}

.receipt-preview {
  max-width: 100%;
  max-height: 280px;
  border-radius: 0.75rem;
  border: 1px solid rgba(11, 95, 255, 0.12);
  object-fit: contain;
  background: #fff;
}

.club-reg-admin {
  padding: 1rem 0;
  border-top: 1px solid rgba(11, 95, 255, 0.10);
}

.club-reg-admin:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.sn-tabs-nav {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(11, 95, 255, 0.12);
  padding-bottom: 0.35rem;
}

.sn-tab-btn {
  border: 0;
  background: transparent;
  color: #5a6a85;
  font-weight: 600;
  padding: 0.55rem 0.9rem;
  border-radius: 0.65rem 0.65rem 0 0;
  cursor: pointer;
}

.sn-tab-btn.is-active {
  color: var(--tn-primary, #0b5fff);
  background: rgba(11, 95, 255, 0.08);
}

.sn-tab-badge {
  display: inline-block;
  margin-left: 0.35rem;
  min-width: 1.25rem;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  background: #f59e0b;
  color: #fff;
  font-size: 0.75rem;
  line-height: 1.2;
  text-align: center;
}

.btn .sn-tab-badge {
  margin-left: 0.45rem;
  vertical-align: middle;
}

.team-card-static {
  cursor: default;
}

.team-card-pending {
  flex-wrap: wrap;
  gap: 0.75rem;
}

.team-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  width: 100%;
}

@media (min-width: 576px) {
  .team-card-pending {
    flex-wrap: nowrap;
  }
  .team-card-actions {
    width: auto;
    justify-content: flex-end;
  }
}

.role-check.is-disabled {
  opacity: 0.65;
}

.excel-export-box {
  background: rgba(11, 95, 255, 0.04);
  border: 1px solid rgba(11, 95, 255, 0.12);
  border-radius: 1rem;
  padding: 1rem 1.1rem;
}

.excel-export-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.excel-export-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
}

.sponsors-edit-row {
  padding: 0.9rem 1rem;
  border: 1px solid rgba(11, 95, 255, 0.12);
  border-radius: 0.9rem;
  background: rgba(11, 95, 255, 0.03);
  box-shadow: none;
}

.sponsors-edit-logo {
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.sponsors-edit-logo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--sn-blue-deep, #0b5fff);
  background: rgba(11, 95, 255, 0.1);
}

.sn-tab-panel {
  display: none;
}

.sn-tab-panel.is-active {
  display: block;
}

.tn-player-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tn-player-row,
.tn-player-card {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.85rem 0;
  border-top: 1px solid rgba(11, 95, 255, 0.08);
}

.tn-player-row:first-child,
.tn-player-card:first-child {
  border-top: 0;
  padding-top: 0;
}

.tn-player-main {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  flex: 1 1 220px;
  min-width: 0;
}

.tn-player-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 9.5rem;
  max-width: 14rem;
  flex: 1 1 10rem;
}

.tn-decision-note {
  margin: 0;
  font-size: 0.82rem;
  color: #5a6a85;
  background: rgba(11, 95, 255, 0.05);
  border-radius: 0.5rem;
  padding: 0.45rem 0.55rem;
  line-height: 1.35;
}

.form-label-sm {
  font-size: 0.8rem;
  font-weight: 600;
}

.tn-player-select {
  display: grid;
  gap: 0.5rem;
}

.tn-player-check {
  align-items: flex-start;
}

.profile-grid-compact {
  gap: 0.35rem 1rem;
}

.profile-grid-compact dt {
  font-size: 0.75rem;
}

.profile-grid-compact dd {
  font-size: 0.9rem;
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .tournament-team-actions {
    width: auto;
  }
}

.teams-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.teams-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--sn-blue-deep);
  margin: 0;
}

.teams-list {
  display: grid;
  gap: 0.75rem;
}

.team-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: var(--sn-card);
  border-radius: 1rem;
  padding: 1rem 1.1rem;
  box-shadow: 0 8px 24px rgba(6, 42, 117, 0.08);
  border: 1px solid rgba(11, 95, 255, 0.08);
}

.team-card-link {
  text-decoration: none;
  color: inherit;
}

.team-card-link:hover {
  border-color: rgba(11, 95, 255, 0.28);
  box-shadow: 0 10px 28px rgba(6, 42, 117, 0.14);
}

.team-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.members-list {
  display: grid;
  gap: 0.65rem;
}

.member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-top: 1px solid rgba(11, 95, 255, 0.08);
}

.member-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.member-name {
  font-weight: 700;
  color: var(--sn-ink);
}

.member-meta {
  color: var(--sn-muted);
  font-size: 0.9rem;
}

.team-card-main {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.team-avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.8rem;
  background: linear-gradient(135deg, var(--sn-blue), var(--sn-blue-dark));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.team-avatar-lg {
  width: 4.25rem;
  height: 4.25rem;
  font-size: 1.15rem;
  border-radius: 1rem;
}

.team-logo {
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 1rem;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(11, 95, 255, 0.12);
  background: #fff;
}

.team-logo-sm {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.8rem;
}

.team-logo-preview {
  width: 4.5rem;
  height: 4.5rem;
}

.tournament-teams-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem 0.75rem;
  justify-items: center;
}

@media (min-width: 576px) {
  .tournament-teams-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.15rem 1rem;
  }
}

.tournament-team-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  max-width: 6.5rem;
  text-align: center;
}

.tournament-team-logo {
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid color-mix(in srgb, var(--tn-primary, #0b5fff) 25%, #fff);
  background: #fff;
  box-shadow: 0 6px 16px rgba(6, 42, 117, 0.10);
}

.tournament-team-logo-fallback {
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1rem;
  color: var(--tn-primary, var(--sn-blue-deep));
  background: color-mix(in srgb, var(--tn-primary, #0b5fff) 12%, #fff);
}

.tournament-team-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--sn-ink);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.team-hero-card {
  margin-bottom: 1rem;
}

.team-hero-top {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.team-hero-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--sn-blue-deep);
  margin: 0 0 0.45rem;
  line-height: 1.2;
}

.team-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  color: var(--sn-muted);
  font-size: 0.95rem;
  align-items: center;
}

.team-hero-desc {
  margin: 1rem 0 0;
  color: var(--sn-ink);
}

.team-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.15rem;
  color: var(--sn-ink);
  word-break: break-word;
}

.team-meta {
  color: var(--sn-muted);
  font-size: 0.9rem;
}

.team-code {
  background: var(--sn-sky);
  color: var(--sn-blue-deep);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.3rem 0.55rem;
  border-radius: 0.5rem;
  flex-shrink: 0;
}

.teams-empty {
  text-align: center;
  color: var(--sn-muted);
}

.players-table {
  display: grid;
  gap: 0.35rem;
}

.players-head {
  grid-template-columns: 1.4fr 1fr 0.8fr;
  gap: 0.75rem;
  padding: 0.35rem 0.15rem;
  color: var(--sn-muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.player-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.15rem;
  padding: 0.85rem 0;
  border-top: 1px solid rgba(11, 95, 255, 0.08);
}

@media (min-width: 576px) {
  .player-row {
    grid-template-columns: 1.4fr 1fr 0.8fr;
    align-items: center;
    gap: 0.75rem;
  }
}

.player-name {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.player-mobile-meta {
  color: var(--sn-muted);
  font-size: 0.88rem;
}

.status-pill {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.status-on {
  background: #e7f8ef;
  color: #0f7a3c;
}

.status-off {
  background: #fdecec;
  color: #b42318;
}

.status-account {
  background: #e8f1ff;
  color: var(--sn-blue-deep);
}

.status-manual {
  background: #fff4e5;
  color: #9a6700;
}

.player-photo {
  width: 4rem;
  height: 4rem;
  border-radius: 0.85rem;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(11, 95, 255, 0.12);
  background: #fff;
}

.player-photo-sm {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.55rem;
}

.player-photo-fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--sn-blue), var(--sn-blue-dark));
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
}

.profile-cards {
  display: grid;
  gap: 0.85rem;
}

.profile-card {
  border: 1px solid rgba(11, 95, 255, 0.10);
  border-radius: 0.9rem;
  padding: 1rem;
  background: #fbfdff;
}

.profile-card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.profile-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.collapse-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.collapse-section-head .btn {
  flex-shrink: 0;
}

.collapse-section-head .flex-grow-1 .btn {
  white-space: normal;
  text-align: center;
  line-height: 1.25;
}

.collapse-section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}

.sn-section-collapse > .sn-section-body {
  margin-top: 0.85rem;
}

.sn-section-collapse:not(.is-open) > .sn-section-body {
  display: none;
}

.sn-section-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  border: 1px solid rgba(11, 95, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: #475569;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.sn-section-toggle:hover {
  border-color: var(--tn-primary, #0b5fff);
  color: var(--tn-primary, #0b5fff);
  background: #fff;
}

.sn-section-chevron {
  display: block;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.18s ease;
  margin-top: -0.15rem;
}

.sn-section-collapse:not(.is-open) .sn-section-chevron {
  transform: rotate(-135deg);
  margin-top: 0.15rem;
}

.sn-collapse-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  justify-content: space-between;
  align-items: flex-start;
}

.sn-collapse-body {
  border-top: 1px solid rgba(11, 95, 255, 0.10);
  margin-top: 1rem;
  padding-top: 0.25rem;
}

.sn-collapse.is-open .sn-collapse-toggle {
  border-color: var(--tn-primary, #0b5fff);
  color: var(--tn-primary, #0b5fff);
}

.tn-groups-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .tn-groups-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .tn-groups-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.tn-group-card {
  border: 1px solid rgba(11, 95, 255, 0.12);
  border-radius: 0.9rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.55);
}

.tn-group-card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: flex-start;
  justify-content: space-between;
}

.tn-group-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 0 0.15rem;
}

.tn-group-teams {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.tn-group-teams > li {
  display: block;
  font-weight: 600;
}

.tn-group-team-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.75rem;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.tn-group-team-main {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
}

.tn-group-team-actions {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  flex: 0 0 auto;
}

.tn-pos-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.75rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: rgba(11, 95, 255, 0.12);
  color: var(--tn-primary, #0b5fff);
  font-weight: 800;
  font-size: 0.9rem;
}

.tn-standings-detail {
  margin-top: 0.55rem;
  width: 100%;
}

.tn-standings-table {
  font-size: 0.9rem;
}

.tn-standings-table th,
.tn-standings-table td {
  white-space: nowrap;
}

.tn-rank-team {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  font-weight: 600;
}

.tiebreak-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.tiebreak-item {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(11, 95, 255, 0.12);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.55);
}

.tiebreak-moves {
  display: flex;
  gap: 0.35rem;
}

.tn-group-match-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.tn-group-match-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(11, 95, 255, 0.12);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.55);
}

.tn-group-match-row.is-played {
  border-color: rgba(11, 95, 255, 0.22);
}

.tn-group-match-teams {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.45rem;
  align-items: baseline;
}

.tn-group-match-score {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--tn-primary, #0b5fff);
  flex: 0 0 auto;
}

.tn-group-match-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  flex: 0 0 auto;
}

.tn-bracket-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  justify-content: space-between;
}

.tn-bracket-toolbar .form-select {
  min-width: 12rem;
}

.tn-ko-mode {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  cursor: pointer;
}

.tn-ko-mode input {
  margin-top: 0.35rem;
}

.tn-ko-summary {
  font-weight: 600;
  color: #3a4a66;
}

.tn-ko-matches {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.tn-ko-match {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(11, 95, 255, 0.12);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.55);
}

.tn-ko-match-num {
  font-weight: 800;
  color: var(--tn-primary, #0b5fff);
  min-width: 2rem;
}

.tn-ko-match-body {
  flex: 1;
  min-width: 0;
}

.tn-ko-match-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.tn-ko-when {
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: #5a6a85;
  font-weight: 600;
}

.ref-group-row {
  flex-direction: column;
  align-items: stretch !important;
  gap: 0.75rem;
}

.ref-group-row .sn-collapse-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0;
}

.ref-group-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.ref-group-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ref-group-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.55rem 0.85rem;
  border: 1px dashed rgba(11, 95, 255, 0.35);
  border-radius: 0.75rem;
  background: rgba(11, 95, 255, 0.06);
  cursor: grab;
  user-select: none;
  min-width: 7rem;
}

.ref-group-chip.is-dragging {
  opacity: 0.55;
}

.ref-match-slot.is-drop-hover {
  outline: 2px solid var(--tn-primary, #0b5fff);
  outline-offset: 1px;
}

.ref-on-match {
  margin-top: 0.2rem;
  padding: 0.12rem 0.35rem;
  border-radius: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #1e3a5f;
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ref-on-match.is-empty {
  font-weight: 600;
  color: #8a96a8;
  font-style: italic;
  background: transparent;
  padding: 0;
}

.ref-on-match[draggable="true"] {
  cursor: grab;
}

.cal-event.has-ref-group {
  font-weight: 600;
}

.cal-event.ref-match-slot.is-drop-hover {
  outline: 2px dashed #0b5fff;
  outline-offset: 1px;
  z-index: 3;
}

.tn-ko-vs {
  font-size: 0.85rem;
  font-weight: 700;
  color: #7a8699;
  text-transform: uppercase;
}

.tn-ko-side {
  font-weight: 700;
}

.tn-ko-slot-select {
  max-width: 10.5rem;
  min-width: 8rem;
}

.tn-ko-matches-readonly .tn-ko-match {
  background: transparent;
}

.profile-card-name {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 0 0.35rem;
  color: var(--sn-blue-deep);
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem 1rem;
  margin: 0;
}

@media (min-width: 576px) {
  .profile-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.profile-grid dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--sn-muted);
  font-weight: 700;
  margin-bottom: 0.1rem;
}

.profile-grid dd {
  margin: 0;
  color: var(--sn-ink);
  font-weight: 500;
  word-break: break-word;
}

.section-subtitle {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--sn-blue-deep);
  margin: 0;
}

.accounts-summary {
  list-style: none;
  padding: 0;
  margin: 0;
}

.accounts-summary li {
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(11, 95, 255, 0.08);
  font-size: 0.95rem;
}

.accounts-summary li:last-child {
  border-bottom: 0;
}

.export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  flex-shrink: 0;
}

.role-check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
}

.role-check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-weight: 600;
  color: var(--sn-ink);
  cursor: pointer;
}

.role-check input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--sn-blue);
}

.member-row-roles {
  flex-wrap: wrap;
  align-items: flex-start;
}

.role-edit-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  justify-content: space-between;
}

@media (min-width: 768px) {
  .role-edit-form {
    width: auto;
    max-width: 100%;
    justify-content: flex-end;
  }
}

@media (min-width: 576px) {
  .auth-card,
  .home-hero,
  .card-block {
    padding: 1.75rem;
  }
}

/* Programación */
.sched-grid {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .sched-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.sched-weekday-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.sched-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(11, 95, 255, 0.15);
  border-radius: 0.65rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.6);
  margin: 0;
  user-select: none;
}

.sched-chip input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--tn-primary, #0b5fff);
}

.sched-chip:has(input:checked) {
  border-color: var(--tn-primary, #0b5fff);
  background: color-mix(in srgb, var(--tn-primary, #0b5fff) 12%, #fff);
  color: var(--tn-primary, #0b5fff);
}

.sched-date-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  max-height: 14rem;
  overflow-y: auto;
  padding: 0.15rem 0.1rem;
}

.account-page .form-select:not([multiple]) {
  min-height: 2.75rem;
  padding: 0.55rem 2.25rem 0.55rem 0.85rem;
  border-radius: 0.7rem;
  line-height: 1.35;
  background-position: right 0.85rem center;
}

.sched-check-row {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  cursor: pointer;
  width: 100%;
  margin: 0;
}

.sched-check-row input {
  margin-top: 0.2rem;
}

.sched-loading {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1rem;
}

.sched-loading[hidden] {
  display: none !important;
}

.sched-loading-card {
  width: min(22rem, 100%);
  background: #fff;
  border-radius: 1rem;
  padding: 1.25rem 1.35rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.sched-progress {
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(11, 95, 255, 0.12);
  overflow: hidden;
}

.sched-progress-bar {
  height: 100%;
  width: 40%;
  border-radius: inherit;
  background: var(--tn-primary, #0b5fff);
  animation: sched-indeterminate 1.1s ease-in-out infinite;
}

@keyframes sched-indeterminate {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(280%); }
}

.sched-status-ok {
  color: #0f7a45;
  font-weight: 700;
}

.sched-status-warn {
  color: #a16207;
  font-weight: 700;
}

.sched-dot {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  margin-right: 0.25rem;
  vertical-align: middle;
}

.sched-dot.ok { background: #0f7a45; }
.sched-dot.quality { background: #6ee7a8; }
.sched-dot.request { background: #eab308; }

.sched-status-pill {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  white-space: nowrap;
}

.sched-status-pill.ok {
  background: rgba(15, 122, 69, 0.12);
  color: #0f7a45;
}

.sched-status-pill.quality {
  background: rgba(110, 231, 168, 0.25);
  color: #147a4a;
}

.sched-status-pill.request {
  background: rgba(234, 179, 8, 0.2);
  color: #92400e;
}

.sched-soft-msg {
  margin-top: 0.25rem;
  font-size: 0.82rem;
  color: #92400e;
}

.sheet-soft-issues {
  margin: 0 0 1rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.65rem;
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.35);
}

.sheet-soft-issues.is-quality {
  background: rgba(110, 231, 168, 0.14);
  border-color: rgba(20, 122, 74, 0.25);
}

.sheet-soft-issues-title {
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
  color: #92400e;
}

.sheet-soft-issues.is-quality .sheet-soft-issues-title {
  color: #147a4a;
}

.sheet-soft-issues-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.84rem;
  color: #3f3f46;
}

.sheet-soft-issues-list li + li {
  margin-top: 0.2rem;
}

.sched-match-row.status-request {
  border-left: 3px solid #eab308;
  padding-left: 0.5rem;
}

.team-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.cal-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.cal-toolbar-controls {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: min(100%, 14rem);
}

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.cal-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.cal-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}

.teams-calendar {
  border: 1px solid rgba(11, 95, 255, 0.12);
  border-radius: 0.75rem;
  background: #fff;
  overflow: auto;
  max-height: 70vh;
  -webkit-overflow-scrolling: touch;
}

.cal-grid {
  display: grid;
  min-width: max-content;
  position: relative;
}

.cal-corner {
  position: sticky;
  left: 0;
  top: 0;
  z-index: 4;
  background: #f7f9fc;
  border-right: 1px solid #e8edf5;
  border-bottom: 1px solid #e8edf5;
}

.cal-day-header {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f7f9fc;
  border-bottom: 1px solid #e8edf5;
  border-right: 1px solid #eef2f8;
  text-align: center;
  padding: 0.45rem 0.35rem;
  min-width: 140px;
}

.cal-day-header .dow {
  font-size: 0.72rem;
  color: #6a7a94;
  text-transform: uppercase;
}

.cal-day-header.is-today,
.cal-day-column.is-today {
  background: color-mix(in srgb, var(--tn-primary, #0b5fff) 8%, #fff);
}

.cal-day-header.is-focus {
  box-shadow: inset 0 -3px 0 var(--tn-primary, #0b5fff);
}

.cal-day-header.is-today .dom {
  color: var(--tn-primary, #0b5fff);
}

.cal-range-controls {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}

.cal-range-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.cal-range-row .form-control-sm {
  width: auto;
  min-width: 9.5rem;
}

.cal-hour-label {
  color: #6a7a94;
  font-size: 0.7rem;
  text-align: right;
  padding: 2px 6px 0 0;
  border-right: 1px solid #e8edf5;
}

.cal-slot {
  border-right: 1px solid #f3f6fb;
  border-bottom: 1px solid #f3f6fb;
}

.cal-day-column {
  position: relative;
  border-right: 1px solid #eef2f8;
}

.cal-event {
  position: absolute;
  left: 3px;
  right: 3px;
  border-radius: 0.4rem;
  border-left: 3px solid rgba(0, 0, 0, 0.2);
  padding: 4px 6px 4px 16px;
  font-size: 0.7rem;
  line-height: 1.25;
  overflow: hidden;
  cursor: grab;
  z-index: 1;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  touch-action: none;
}

.cal-event.is-dragging {
  opacity: 0.45;
  cursor: grabbing;
}

.cal-event.is-mine {
  outline: 2px solid var(--tn-primary, #0b5fff);
  outline-offset: 1px;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tn-primary, #0b5fff) 22%, transparent),
    0 2px 6px rgba(11, 95, 255, 0.18);
  z-index: 2;
  font-weight: 700;
}

.cal-event.is-played {
  color: #4b5563;
  opacity: 0.78;
  filter: grayscale(0.55);
  box-shadow: none;
  z-index: 1;
}

.cal-event.is-live {
  color: #7c2d12;
  font-weight: 800;
  outline: 2px solid #ea580c;
  outline-offset: 1px;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.22), 0 4px 12px rgba(194, 65, 12, 0.28);
  z-index: 4;
  animation: cal-live-pulse 1.6s ease-in-out infinite;
}

@keyframes cal-live-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.22), 0 4px 12px rgba(194, 65, 12, 0.28); }
  50% { box-shadow: 0 0 0 5px rgba(234, 88, 12, 0.35), 0 6px 16px rgba(194, 65, 12, 0.35); }
}

.cal-live-badge {
  position: absolute;
  top: 2px;
  right: 3px;
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #fff;
  background: #c2410c;
  border-radius: 0.3rem;
  padding: 0.12rem 0.3rem;
  line-height: 1.1;
  z-index: 3;
}

.cal-swatch-played {
  background: #c8cdd5;
  outline: 2px solid #6b7280;
}

.cal-swatch-live {
  background: #ffe8a3;
  outline: 2px solid #c2410c;
}

.sched-row-played td {
  background: #eef0f3;
  color: #4b5563;
}

.sched-row-live td {
  background: #fff4e0;
}

.sched-played-toggle-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.sched-row-empty td {
  color: #64748b;
  font-style: italic;
  padding: 0.85rem 0.75rem;
}

.sched-live-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #fff;
  background: #c2410c;
  border-radius: 0.35rem;
  padding: 0.15rem 0.4rem;
}

.sched-played-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #4b5563;
  background: #d1d5db;
  border-radius: 0.35rem;
  padding: 0.15rem 0.4rem;
}

.sched-live-info {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.sched-live-info[hidden] {
  display: none !important;
}

.sched-live-info-card {
  position: relative;
  width: min(28rem, 100%);
  background: #fff;
  border-radius: 1rem;
  padding: 1.15rem 1.25rem 1.25rem;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.22);
}

.sched-live-info-close {
  position: absolute;
  top: 0.55rem;
  right: 0.65rem;
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
}

.sched-live-info-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-right: 1.5rem;
}

.sched-live-info-grid {
  display: grid;
  gap: 0.55rem;
  margin: 0.85rem 0 0;
}

.sched-live-info-grid > div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid #eef2f8;
  padding-bottom: 0.35rem;
}

.sched-live-info-grid dt {
  margin: 0;
  color: #64748b;
  font-weight: 600;
}

.sched-live-info-grid dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
}

.sched-live-info-sheet {
  margin-top: 0.95rem;
  padding-top: 0.75rem;
  border-top: 1px solid #eef2f8;
}

.sched-live-streams-host:empty {
  display: none;
}

.sched-live-streams {
  margin-top: 0.95rem;
  padding-top: 0.75rem;
  border-top: 1px solid #eef2f8;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sched-live-streams-title {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tn-primary, #0b5fff);
}

.sched-stream-slot {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sched-stream-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
}

.sched-stream-edit {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sched-stream-empty {
  font-size: 0.82rem;
}

.cal-mine-badge {
  position: absolute;
  top: 2px;
  right: 3px;
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--tn-primary, #0b5fff);
  border-radius: 0.3rem;
  padding: 0.1rem 0.28rem;
  line-height: 1.1;
  z-index: 3;
}

.cal-swatch-mine,
.cal-legend-mine .cal-swatch {
  background: color-mix(in srgb, var(--tn-primary, #0b5fff) 35%, #fff);
  outline: 2px solid var(--tn-primary, #0b5fff);
}

.sched-row-mine td {
  background: color-mix(in srgb, var(--tn-primary, #0b5fff) 9%, #fff);
}

.sched-mine-label {
  color: var(--tn-primary, #0b5fff);
  font-weight: 800;
}

.cal-event-move {
  position: absolute;
  right: 3px;
  bottom: 3px;
  border: 0;
  border-radius: 0.35rem;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  line-height: 1.2;
  cursor: pointer;
  z-index: 2;
}

.cal-day-column.is-drop-target {
  background: color-mix(in srgb, var(--tn-primary, #0b5fff) 8%, transparent);
}

.sched-edit-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.sched-shift-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.sched-dirty-badge {
  font-size: 0.78rem;
  font-weight: 700;
  color: #92400e;
  background: rgba(234, 179, 8, 0.2);
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
}

.sched-conflict-banner {
  background: rgba(220, 38, 38, 0.1);
  color: #991b1b;
  border-radius: 0.65rem;
  padding: 0.65rem 0.85rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.sched-flash {
  border-radius: 0.65rem;
  padding: 0.55rem 0.85rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.sched-flash.ok {
  background: rgba(15, 122, 69, 0.12);
  color: #0f7a45;
}

.sched-flash.warn {
  background: rgba(234, 179, 8, 0.18);
  color: #92400e;
}

.sched-row-conflict td {
  background: rgba(220, 38, 38, 0.06);
}

.sched-sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0.75rem;
}

.sched-sheet[hidden] {
  display: none !important;
}

.sched-sheet-card {
  width: min(100%, 28rem);
  max-height: min(92vh, 40rem);
  overflow: auto;
  background: #fff;
  border-radius: 1rem 1rem 0.75rem 0.75rem;
  padding: 1rem 1.1rem 1.15rem;
  box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.18);
}

.sched-sheet-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .sched-sheet {
    align-items: center;
  }
  .sched-sheet-card {
    border-radius: 1rem;
  }
}

body.sched-sheet-open {
  overflow: hidden;
}

.cal-event .status-dot,
.cal-event .sched-dot {
  position: absolute;
  left: 4px;
  top: 6px;
}

.cal-event .time { font-weight: 700; opacity: 0.85; }
.cal-event .title {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-event .meta {
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: #6a7a94;
}

.cal-tooltip {
  position: fixed;
  z-index: 50;
  max-width: 280px;
  background: #1e293b;
  color: #fff;
  padding: 0.65rem 0.8rem;
  border-radius: 0.55rem;
  font-size: 0.82rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.cal-tooltip strong { display: block; margin-bottom: 0.25rem; }
.cal-tooltip .issues { margin-top: 0.35rem; color: #fde68a; }

.sched-table-wrap {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.sched-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 36rem;
  font-size: 0.9rem;
}

.sched-table th,
.sched-table td {
  text-align: left;
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid rgba(11, 95, 255, 0.08);
  vertical-align: top;
}

.sched-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6a7a94;
}

/* —— Arbitraje de partidos —— */
.ref-next-match {
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  background: color-mix(in srgb, var(--tn-primary, #0b5fff) 8%, #fff);
  border: 1px solid color-mix(in srgb, var(--tn-primary, #0b5fff) 22%, transparent);
}

.ref-next-match-code {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--tn-primary, #0b5fff);
  margin-bottom: 0.2rem;
}

.ref-next-match-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
}

.cal-event.is-ref-assigned,
.cal-event.arb-cal-match.is-mine {
  outline: 2px solid var(--tn-primary, #0b5fff);
  outline-offset: 1px;
  background: color-mix(in srgb, var(--tn-primary, #0b5fff) 14%, #fff);
  border-left-color: var(--tn-primary, #0b5fff);
  z-index: 2;
}

.arb-match-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}

.arb-match-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(11, 95, 255, 0.08);
}

.arb-match-row:last-child {
  border-bottom: 0;
}

.arb-match-row.is-mine {
  background: color-mix(in srgb, var(--tn-primary, #0b5fff) 6%, transparent);
  margin: 0 -0.5rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  border-radius: 0.5rem;
}

.arb-match-row.is-in-progress {
  box-shadow: inset 3px 0 0 var(--tn-primary, #0b5fff);
}

.arb-match-code {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--tn-primary, #0b5fff);
}

.arb-match-title {
  font-weight: 650;
  line-height: 1.25;
}

.arb-match-stub {
  text-align: center;
  padding: 2rem 1.25rem;
}

.arb-match-hero {
  text-align: center;
  padding: 1.5rem 1.25rem;
}

.arb-match-sides {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
}

.arb-match-side {
  flex: 1 1 8rem;
  max-width: 14rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.arb-match-logo {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: contain;
  border-radius: 0.85rem;
  background: #fff;
  border: 1px solid rgba(11, 95, 255, 0.12);
}

.arb-match-logo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--tn-primary, #0b5fff);
  background: color-mix(in srgb, var(--tn-primary, #0b5fff) 10%, #fff);
}

.arb-match-stub-home,
.arb-match-stub-away {
  font-size: clamp(1.15rem, 4vw, 1.65rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 0;
}

.arb-match-stub-vs {
  margin: 0;
  font-weight: 700;
  opacity: 0.55;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.85rem;
  flex: 0 0 auto;
}

.arb-team-card-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.arb-person-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.arb-person-row {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(11, 95, 255, 0.08);
}

.arb-person-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.arb-person-row:first-child {
  padding-top: 0;
}

.arb-person-role {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tn-primary, #0b5fff);
  margin-bottom: 0.15rem;
}

.arb-person-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.75rem;
  margin: 0.45rem 0 0;
}

.arb-person-meta dt {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6a7a94;
  margin: 0;
}

.arb-person-meta dd {
  margin: 0;
  font-size: 0.88rem;
}

@media (max-width: 575.98px) {
  .arb-match-row {
    flex-direction: column;
    align-items: stretch;
  }
  .arb-match-row .arb-whistle-btn {
    width: 100%;
  }
  .arb-person-meta {
    grid-template-columns: 1fr;
  }
}

.arb-live-hero {
  text-align: center;
}

.arb-live-scoreline {
  font-size: 1rem;
  line-height: 1.4;
}

.arb-live-scoreline strong {
  font-size: 1.35rem;
  margin: 0 0.25rem;
}

.arb-live-timer {
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--tn-primary, #0b5fff);
  margin: 0.35rem 0 0.15rem;
}

.arb-set-history {
  list-style: none;
  margin: 0;
  padding: 0;
}

.arb-set-history li {
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(11, 95, 255, 0.08);
}

.arb-set-history li:last-child {
  border-bottom: 0;
}

.arb-set-form-vs {
  font-size: 1.4rem;
  font-weight: 700;
  padding-bottom: 0.55rem;
}

.arb-summary-set {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(11, 95, 255, 0.08);
}

.arb-summary-set:last-of-type {
  border-bottom: 0;
}

/* Trayectoria en /cuenta/perfil */
.career-panel-head {
  margin-bottom: 1rem;
}

.career-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .career-stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.career-stat {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 1rem 0.9rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(11, 95, 255, 0.1);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.95) 0%, rgba(232, 241, 255, 0.55) 100%);
  overflow: hidden;
}

.career-stat::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--sn-blue);
  opacity: 0.85;
}

.career-stat-first::before { background: #c9a227; }
.career-stat-second::before { background: #7b8794; }
.career-stat-third::before { background: #b87333; }
.career-stat-total::before { background: var(--sn-blue); }

.career-stat-value {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1;
  color: var(--sn-blue-deep);
  letter-spacing: -0.02em;
}

.career-stat-label {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--sn-ink);
  margin-top: 0.35rem;
}

.career-stat-sub {
  font-size: 0.78rem;
  color: var(--sn-muted);
}

.career-tournaments .collapse-section-head {
  padding-top: 0.35rem;
  border-top: 1px solid rgba(11, 95, 255, 0.08);
}

.career-tournament-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.career-tournament-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.75rem;
  background: rgba(232, 241, 255, 0.45);
  border: 1px solid rgba(11, 95, 255, 0.08);
}

.career-tournament-name {
  font-weight: 600;
  color: var(--sn-ink);
  min-width: 0;
}

.career-place-pill {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.career-place-1 {
  color: #7a5a00;
  background: #fff4cc;
  border-color: rgba(201, 162, 39, 0.35);
}

.career-place-2 {
  color: #3f4b59;
  background: #eef1f4;
  border-color: rgba(123, 135, 148, 0.35);
}

.career-place-3 {
  color: #6b3f12;
  background: #f6e6d4;
  border-color: rgba(184, 115, 51, 0.35);
}

.career-place-played {
  color: var(--sn-blue-deep);
  background: rgba(11, 95, 255, 0.08);
  border-color: rgba(11, 95, 255, 0.15);
}
