/* TennisFinalsPro — nowoczesna tabela ligi / patch 2026-07 */

/* ===== Premium górne zakładki ligi ===== */
.league-top-tabs {
  position: relative;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px;
  margin: 12px 0 18px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(7, 24, 60, .98) 0%, rgba(10, 33, 82, .96) 48%, rgba(15, 55, 124, .94) 100%);
  border: 1px solid rgba(96, 165, 250, .24);
  box-shadow: 0 18px 42px rgba(15, 35, 82, .20), inset 0 1px 0 rgba(255,255,255,.08);
  overflow-x: auto;
  scrollbar-width: none;
}
.league-top-tabs::-webkit-scrollbar { display: none; }

.league-top-tab {
  min-width: 112px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px;
  background: rgba(255,255,255,.045);
  color: rgba(226, 235, 255, .82);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .01em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
  transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.league-top-tab:hover {
  transform: translateY(-1px);
  color: #fff;
  background: rgba(59, 130, 246, .18);
  border-color: rgba(96,165,250,.28);
}
.league-top-tab.active {
  color: #fff;
  background: linear-gradient(135deg, #1d4ed8 0%, #2287ff 58%, #21c7ee 100%);
  border-color: rgba(147,197,253,.45);
  box-shadow: 0 12px 30px rgba(37,99,235,.28), inset 0 1px 0 rgba(255,255,255,.25);
}
.league-top-tab--manage {
  color: #dffbff;
  background: rgba(20,184,166,.10);
  border-color: rgba(45,212,191,.20);
}
.league-top-tab--manage.active {
  background: linear-gradient(135deg, #0891b2 0%, #0ea5e9 55%, #38bdf8 100%);
}
.league-top-tab--owner {
  color: #fff3e6;
  background: rgba(251,146,60,.12);
  border-color: rgba(251,146,60,.32);
}
.league-top-tab--owner.active,
.league-top-tab--owner:hover {
  color: #fff;
  background: linear-gradient(135deg, #f97316 0%, #fb923c 54%, #facc15 100%);
  box-shadow: 0 14px 30px rgba(249,115,22,.28), inset 0 1px 0 rgba(255,255,255,.25);
}

/* ===== Tab z zarządzaniem ligą ===== */
.league-panel--manage {
  margin-bottom: 18px;
}
.league-manage-tab-intro {
  margin-bottom: 12px;
  padding: 18px 20px;
  border-radius: 22px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 20%, rgba(34,211,238,.28), transparent 28%),
    linear-gradient(135deg, #061a44 0%, #0b3c88 55%, #0ea5e9 100%);
  border: 1px solid rgba(96,165,250,.28);
  box-shadow: 0 18px 42px rgba(15,35,82,.16);
}
.league-manage-tab-intro span {
  display: inline-flex;
  margin-bottom: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.78);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.league-manage-tab-intro h2 {
  margin: 0 0 4px;
  color: #fff;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1;
  font-weight: 950;
}
.league-manage-tab-intro p {
  margin: 0;
  color: rgba(255,255,255,.78);
  font-size: 13px;
  font-weight: 700;
}
.league-manager-tab-host .league-admin-accordion {
  margin: 0;
}
.league-admin-accordion--as-tab > .league-admin-accordion__trigger {
  display: none !important;
}
.league-admin-accordion--as-tab .league-admin-accordion__content {
  margin: 0 !important;
}
.league-admin-accordion--as-tab .league-admin-panel {
  background: rgba(255,255,255,.96) !important;
  border: 1px solid #dbeafe !important;
  box-shadow: 0 18px 42px rgba(15,35,82,.08) !important;
  color: #0f2145;
}

/* ===== Sekcja tabel ===== */
.league-table-panel {
  position: relative;
}
.league-table-title-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin: 6px 0 12px;
}
.league-table-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(37,99,235,.08);
  color: #2563eb;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.league-table-title-head h2 {
  margin: 0;
  color: #071832;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -.04em;
}

#table .league-round-tabs,
#table .league-mini-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
  overflow: visible;
}
#table .league-round-tab,
#table .league-mini-tab {
  min-height: 40px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid #dbe8fb;
  background: rgba(255,255,255,.9);
  color: #12274f;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(15,35,82,.05);
}
#table .league-round-tab:hover,
#table .league-mini-tab:hover {
  transform: translateY(-1px);
  border-color: #bfdbfe;
  color: #1d4ed8;
  background: #fff;
}
#table .league-round-tab.active {
  color: #fff;
  background: linear-gradient(135deg, #1d4ed8 0%, #2387ff 100%);
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(37,99,235,.24);
}
#table .league-mini-tab.active {
  color: #fff;
  background: linear-gradient(135deg, #071b45 0%, #113e91 55%, #0ea5e9 100%);
  border-color: rgba(96,165,250,.35);
  box-shadow: 0 12px 28px rgba(15,35,82,.22);
}
#table .league-mini-tab.active::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 8px;
  background: #22d3ee;
  box-shadow: 0 0 0 5px rgba(34,211,238,.12);
}

.league-round-summary-card {
  width: fit-content;
  max-width: 100%;
  margin: -54px 0 16px auto;
  padding: 13px 16px !important;
  border-radius: 18px !important;
  background: rgba(255,255,255,.92) !important;
  border: 1px solid #dbeafe !important;
  box-shadow: 0 14px 32px rgba(15,35,82,.07) !important;
}
.league-round-summary-card strong {
  color: #0f2d68 !important;
  font-size: 13px !important;
}
.league-round-summary-card .league-round-meta {
  color: #486383;
  font-weight: 800;
}

/* ===== Główna karta tabeli ===== */
.league-group-panel {
  display: none;
}
.league-group-panel.active {
  display: block;
}
.league-standings-card {
  position: relative;
  overflow: hidden;
  padding: 0 !important;
  margin-top: 14px;
  border-radius: 24px !important;
  background:
    linear-gradient(180deg, #071a42 0, #0b2b68 82px, #ffffff 82px, #ffffff 100%) !important;
  border: 1px solid rgba(96,165,250,.28) !important;
  box-shadow: 0 24px 60px rgba(15,35,82,.13) !important;
}
.league-standings-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 82px;
  background:
    radial-gradient(circle at 18% 40%, rgba(34,211,238,.26), transparent 26%),
    radial-gradient(circle at 82% 0%, rgba(59,130,246,.32), transparent 32%);
  pointer-events: none;
}
.league-standings-card__head {
  position: relative;
  z-index: 2;
  min-height: 82px;
  padding: 18px 22px !important;
  margin: 0 !important;
  color: #fff;
}
.league-standings-card__head h3 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 !important;
  color: #fff !important;
  font-size: 22px !important;
  font-weight: 950 !important;
  letter-spacing: -.02em;
}
.league-standings-card__head h3::before {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #22d3ee;
  box-shadow: 0 0 0 7px rgba(34,211,238,.12);
}
.league-standings-card__head span {
  min-height: 30px !important;
  padding: 0 12px !important;
  border-radius: 999px !important;
  background: rgba(37,99,235,.22) !important;
  border: 1px solid rgba(147,197,253,.24) !important;
  color: #bfdbfe !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}
.league-standings-card__logo {
  position: absolute;
  z-index: 2;
  top: 14px;
  left: 50%;
  width: 52px;
  height: 52px;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 10px 28px rgba(0,0,0,.10);
  backdrop-filter: blur(10px);
}
.league-standings-card__logo img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.18));
}

.league-table-wrap {
  position: relative;
  z-index: 1;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 0 0 24px 24px;
  background: #fff;
}
.league-standings-table {
  width: 100%;
  min-width: 920px;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  color: #0a1c3d;
}
.league-standings-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 16px 14px;
  background: linear-gradient(180deg, #102a63 0%, #071b45 100%);
  color: rgba(255,255,255,.84);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .07em;
  font-weight: 950;
  border-bottom: 1px solid rgba(96,165,250,.22);
  text-align: center;
  white-space: nowrap;
}
.league-standings-table thead th:nth-child(2) {
  text-align: left;
}
.league-standings-table tbody td {
  padding: 15px 14px;
  font-size: 14px;
  font-weight: 750;
  color: #102348;
  border-bottom: 1px solid #e6edf8;
  background: rgba(255,255,255,.98);
  white-space: nowrap;
  vertical-align: middle;
  text-align: center;
}
.league-standings-table tbody tr:nth-child(even) td {
  background: #f8fbff;
}
.league-standings-table tbody tr:hover td {
  background: #eef6ff;
}
.league-standings-table tbody tr:last-child td {
  border-bottom: 0;
}
.league-standings-table tbody td:nth-child(2) {
  text-align: left;
  min-width: 230px;
}
.league-rank {
  width: 58px;
  color: #64748b !important;
  font-weight: 950 !important;
}
.league-player-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}
.league-player-inline strong,
.league-player-inline strong a {
  color: #0b4fe8;
  font-size: 14px;
  font-weight: 950;
  text-decoration: none;
}
.league-player-inline strong a:hover {
  text-decoration: underline;
}
.league-player-sub {
  margin-top: 3px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}
.league-points {
  min-width: 74px;
}
.league-points-badge {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
  border: 1px solid #dbeafe;
  color: #075cff;
  font-size: 19px;
  line-height: 1;
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(37,99,235,.08), inset 0 1px 0 rgba(255,255,255,.95);
}
.league-diff-chip {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 44px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 950;
}
.league-diff-chip.is-pos {
  color: #057a37;
  background: #e9fcef;
  border: 1px solid #bbf7d0;
}
.league-diff-chip.is-neg {
  color: #e11d48;
  background: #fff1f2;
  border: 1px solid #fecdd3;
}
.league-diff-chip.is-neutral {
  color: #475569;
  background: #f2f6fb;
  border: 1px solid #e5edf7;
}
#table .league-form-dots {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
}
#table .league-form-dot {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  border: 1px solid transparent;
}
#table .league-form-dot--win {
  color: #087a36;
  background: #dcfce7;
  border-color: #bbf7d0;
}
#table .league-form-dot--loss {
  color: #e11d48;
  background: #ffe4e6;
  border-color: #fecdd3;
}
#table .league-form-dot--empty {
  color: #64748b;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.league-empty-group-card {
  padding: 22px;
  border-radius: 18px;
  color: #49627e;
  background: #f8fbff;
  border: 1px dashed #cbd5e1;
  font-weight: 800;
  text-align: center;
}

/* ===== Mobile / tablet ===== */
@media (max-width: 900px) {
  .league-top-tabs {
    padding: 8px;
    gap: 7px;
    border-radius: 18px;
  }
  .league-top-tab {
    min-width: auto;
    min-height: 42px;
    padding: 0 14px;
    font-size: 12px;
    border-radius: 13px;
  }
  .league-round-summary-card {
    width: 100%;
    margin: 0 0 14px;
  }
  .league-standings-card__logo {
    display: none;
  }
  .league-standings-table {
    min-width: 860px;
  }
}
@media (max-width: 640px) {
  .league-table-title-head h2 {
    font-size: 24px;
  }
  #table .league-round-tab,
  #table .league-mini-tab {
    min-height: 36px;
    padding: 0 14px;
    font-size: 12px;
  }
  .league-standings-card {
    border-radius: 18px !important;
  }
  .league-standings-card__head {
    min-height: 72px;
    padding: 16px !important;
  }
  .league-standings-card::before {
    height: 72px;
  }
  .league-standings-card__head h3 {
    font-size: 18px !important;
  }
  .league-standings-card__head span {
    min-height: 26px !important;
    font-size: 10px !important;
  }
  .league-standings-table thead th {
    padding: 13px 11px;
    font-size: 10px;
  }
  .league-standings-table tbody td {
    padding: 13px 11px;
    font-size: 13px;
  }
  .league-player-inline strong,
  .league-player-inline strong a {
    font-size: 13px;
  }
  .league-top-tab--owner {
    margin-left: 0;
  }
}

/* ===== TFP FINAL: układ Tabela -> Runda -> Zakładki -> Grupy ===== */
body[data-page="league-view"] .league-hero {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
}

body[data-page="league-view"] .league-shell {
  padding-top: clamp(14px, 2vw, 28px) !important;
}

.league-table-page-head {
  position: relative;
  margin: 0 0 12px;
  padding: 0 0 4px;
}

.league-table-page-head__top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.league-table-page-head h1 {
  margin: 0;
  color: #071832;
  font-size: clamp(28px, 4vw, 42px);
  line-height: .95;
  font-weight: 950;
  letter-spacing: -.045em;
}

.league-round-tabs--page {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 0 12px !important;
  overflow: visible !important;
}

.league-round-tabs--page .league-round-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid #dbeafe;
  background: rgba(255,255,255,.92);
  color: #102348;
  font-size: 13px;
  font-weight: 950;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(15,35,82,.06);
}

.league-round-tabs--page .league-round-tab.active {
  color: #fff;
  background: linear-gradient(135deg, #1d4ed8 0%, #0ea5e9 100%);
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(37,99,235,.26);
}

.league-round-summary-card--top {
  width: auto !important;
  min-width: 230px;
  margin: 0 !important;
  padding: 14px 18px !important;
  border-radius: 18px !important;
  background: rgba(255,255,255,.94) !important;
  border: 1px solid #dbeafe !important;
  box-shadow: 0 16px 38px rgba(15,35,82,.09) !important;
}

.league-round-summary-card--top strong {
  display: block;
  margin-bottom: 4px;
  color: #071832 !important;
  font-size: 14px !important;
  font-weight: 950;
}

.league-round-summary-card--top .league-round-meta {
  color: #516b8f;
  font-size: 12px;
  font-weight: 850;
}

body[data-page="league-view"] .league-top-tabs {
  order: initial;
  margin: 8px 0 14px !important;
  padding: 9px;
  border-radius: 20px;
}

body[data-page="league-view"] .league-panels {
  margin-top: 0;
}

body[data-page="league-view"] .league-table-title-head,
body[data-page="league-view"] .league-table-eyebrow {
  display: none !important;
}

/* Grupy mają być dopiero pod głównymi zakładkami i bardziej czytelne */
#table .league-mini-tabs[data-group-tabs="table"] {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 4px 0 14px !important;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(219,234,254,.9);
  box-shadow: 0 10px 28px rgba(15,35,82,.05);
}

#table .league-mini-tab {
  min-height: 34px !important;
  padding: 0 16px !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: #21385c !important;
  border: 1px solid #d5e4f7 !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  box-shadow: 0 7px 18px rgba(15,35,82,.05) !important;
}

#table .league-mini-tab.active {
  color: #fff !important;
  background: linear-gradient(135deg, #06173b 0%, #0d347e 72%, #0f58c7 100%) !important;
  border-color: rgba(96,165,250,.30) !important;
  box-shadow: 0 12px 26px rgba(7,24,60,.22) !important;
}

#table .league-mini-tab.active::before {
  background: var(--group-color, #22d3ee) !important;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--group-color, #22d3ee) 22%, transparent) !important;
}

/* Ciemniejszy, czytelniejszy nagłówek grupy */
.league-standings-card {
  margin-top: 0 !important;
  border-radius: 24px !important;
  background:
    linear-gradient(180deg, #06173b 0, #071d49 88px, #ffffff 88px, #ffffff 100%) !important;
  border: 1px solid rgba(96,165,250,.30) !important;
  box-shadow: 0 26px 64px rgba(15,35,82,.14) !important;
}

.league-standings-card::before {
  height: 88px !important;
  background:
    radial-gradient(circle at 16% 48%, color-mix(in srgb, var(--group-color, #22d3ee) 24%, transparent), transparent 27%),
    linear-gradient(135deg, #071832 0%, #0d347e 58%, #075fb9 100%) !important;
  opacity: 1 !important;
}

.league-standings-card__head {
  min-height: 88px !important;
  padding: 20px 24px !important;
}

.league-standings-card__head h3 {
  color: #ffffff !important;
  text-shadow: 0 2px 12px rgba(0,0,0,.24);
  font-size: clamp(18px, 2.2vw, 24px) !important;
}

.league-standings-card__head h3::before {
  background: var(--group-color, #22d3ee) !important;
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--group-color, #22d3ee) 20%, transparent) !important;
}

.league-standings-card__head span {
  background: rgba(255,255,255,.10) !important;
  border-color: rgba(255,255,255,.18) !important;
  color: rgba(255,255,255,.92) !important;
}

.league-standings-card__logo {
  top: 12px !important;
  width: 64px !important;
  height: 64px !important;
  border-radius: 22px !important;
  background: rgba(255,255,255,.94) !important;
  border: 1px solid rgba(255,255,255,.92) !important;
  box-shadow: 0 12px 30px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.95) !important;
}

.league-standings-card__logo img {
  width: 44px !important;
  height: 44px !important;
}

.league-standings-table thead th {
  background: linear-gradient(180deg, #0e2d69 0%, #061b45 100%) !important;
  color: rgba(255,255,255,.88) !important;
}

.league-standings-table tbody td {
  color: #0b1d3d !important;
}

.league-standings-table tbody td:nth-child(2) {
  min-width: 210px;
}

.league-player-inline strong,
.league-player-inline strong a {
  color: #075cff !important;
}

/* Fix zakładki Zarządzaj ligą po przeniesieniu panelu */
body[data-page="league-view"] .league-panel--manage.active,
body[data-page="league-view"] #manage.active {
  display: block !important;
}

body[data-page="league-view"] .league-admin-accordion--as-tab {
  position: static !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  clip: auto !important;
  clip-path: none !important;
}

body[data-page="league-view"] .league-admin-accordion--as-tab .league-admin-accordion__trigger {
  display: none !important;
}

body[data-page="league-view"] .league-admin-accordion--as-tab .league-admin-accordion__content {
  display: block !important;
  height: auto !important;
  overflow: visible !important;
}

@media (max-width: 900px) {
  .league-table-page-head__top {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .league-round-summary-card--top {
    width: 100% !important;
    min-width: 0;
  }

  .league-top-tabs {
    gap: 7px !important;
    padding: 8px !important;
    border-radius: 18px !important;
  }

  .league-top-tab {
    min-height: 40px !important;
    min-width: auto !important;
    padding: 0 13px !important;
    font-size: 12px !important;
  }

  .league-standings-card__logo {
    display: grid !important;
    width: 54px !important;
    height: 54px !important;
    top: 14px !important;
  }

  .league-standings-card__logo img {
    width: 36px !important;
    height: 36px !important;
  }

  .league-standings-card__head {
    padding-right: 88px !important;
  }
}

@media (max-width: 640px) {
  body[data-page="league-view"] .league-shell {
    padding-top: 10px !important;
  }

  .league-table-page-head h1 {
    font-size: 32px;
  }

  .league-round-tabs--page .league-round-tab {
    min-height: 36px;
    padding: 0 15px;
    font-size: 12px;
  }

  #table .league-mini-tabs[data-group-tabs="table"] {
    gap: 8px;
    padding: 9px;
  }

  #table .league-mini-tab {
    min-height: 34px !important;
    padding: 0 13px !important;
    font-size: 12px !important;
  }

  .league-standings-card {
    border-radius: 20px !important;
    background:
      linear-gradient(180deg, #06173b 0, #071d49 86px, #ffffff 86px, #ffffff 100%) !important;
  }

  .league-standings-card::before {
    height: 86px !important;
  }

  .league-standings-card__head {
    min-height: 86px !important;
    padding: 18px 82px 16px 16px !important;
  }

  .league-standings-card__head h3 {
    font-size: 20px !important;
  }

  .league-standings-card__head span {
    position: absolute;
    right: 14px;
    bottom: 13px;
    min-height: 24px !important;
    padding: 0 9px !important;
    font-size: 10px !important;
  }

  .league-standings-card__logo {
    left: auto !important;
    right: 18px !important;
    transform: none !important;
    top: 14px !important;
    display: grid !important;
    width: 52px !important;
    height: 52px !important;
  }

  .league-table-wrap {
    border-radius: 0 0 20px 20px !important;
  }
}

/* ===== HOTFIX 2026-07-11: mobile logo nie nachodzi na licznik zawodników ===== */
@media (max-width: 640px) {
  .league-standings-card,
  .league-standings-card::before {
    background-position: center top !important;
  }

  .league-standings-card {
    background:
      linear-gradient(180deg, #06173b 0, #071d49 108px, #ffffff 108px, #ffffff 100%) !important;
  }

  .league-standings-card::before {
    height: 108px !important;
  }

  .league-standings-card__head {
    min-height: 108px !important;
    padding: 18px 86px 16px 16px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    gap: 9px !important;
  }

  .league-standings-card__head h3 {
    max-width: calc(100% - 76px) !important;
    margin: 0 !important;
    line-height: 1.08 !important;
  }

  .league-standings-card__head span {
    position: static !important;
    right: auto !important;
    bottom: auto !important;
    min-height: 26px !important;
    padding: 0 11px !important;
    font-size: 10px !important;
    color: rgba(255,255,255,.94) !important;
    background: rgba(255,255,255,.13) !important;
    border-color: rgba(255,255,255,.22) !important;
  }

  .league-standings-card__logo {
    left: auto !important;
    right: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 54px !important;
    height: 54px !important;
    border-radius: 18px !important;
  }

  .league-standings-card__logo img {
    width: 38px !important;
    height: 38px !important;
  }
}

/* ===== TFP HOTFIX FINAL: logo na środku banera grupy, bez wchodzenia w tabelę ===== */
@media (max-width: 640px) {
  .league-standings-card {
    background:
      linear-gradient(180deg, #06173b 0, #071d49 92px, #ffffff 92px, #ffffff 100%) !important;
  }

  .league-standings-card::before {
    height: 92px !important;
    background:
      radial-gradient(circle at 14% 46%, color-mix(in srgb, var(--group-color, #22d3ee) 22%, transparent), transparent 30%),
      radial-gradient(circle at 50% 0%, rgba(59,130,246,.30), transparent 36%),
      linear-gradient(135deg, #06173b 0%, #0b2d70 62%, #0b63c8 100%) !important;
  }

  .league-standings-card__head {
    position: relative !important;
    min-height: 92px !important;
    padding: 16px 14px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr) !important;
    grid-template-areas: "title logo count" !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .league-standings-card__head h3 {
    grid-area: title !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    font-size: 19px !important;
    line-height: 1.05 !important;
    white-space: normal !important;
  }

  .league-standings-card__head h3::before {
    width: 9px !important;
    height: 9px !important;
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--group-color, #22d3ee) 18%, transparent) !important;
  }

  .league-standings-card__logo {
    grid-area: logo !important;
    position: static !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    justify-self: center !important;
    width: 52px !important;
    height: 52px !important;
    border-radius: 18px !important;
    z-index: 4 !important;
  }

  .league-standings-card__logo img {
    width: 37px !important;
    height: 37px !important;
  }

  .league-standings-card__head span {
    grid-area: count !important;
    position: static !important;
    justify-self: end !important;
    min-height: 28px !important;
    padding: 0 10px !important;
    font-size: 10px !important;
    white-space: nowrap !important;
    color: rgba(255,255,255,.94) !important;
    background: rgba(255,255,255,.13) !important;
    border-color: rgba(255,255,255,.24) !important;
  }

  .league-table-wrap {
    margin-top: 0 !important;
    border-radius: 0 0 20px 20px !important;
  }
}

@media (max-width: 380px) {
  .league-standings-card__head {
    grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr) !important;
    gap: 6px !important;
  }

  .league-standings-card__logo {
    width: 46px !important;
    height: 46px !important;
    border-radius: 16px !important;
  }

  .league-standings-card__logo img {
    width: 33px !important;
    height: 33px !important;
  }

  .league-standings-card__head h3 {
    font-size: 17px !important;
  }

  .league-standings-card__head span {
    padding: 0 8px !important;
    font-size: 9px !important;
  }
}

/* ===== TFP HOTFIX REAL FINAL: logo NIE wypada z banera na mobile ===== */
@media (max-width: 640px) {
  .league-standings-card {
    overflow: hidden !important;
    background:
      linear-gradient(180deg, #06173b 0, #071d49 78px, #ffffff 78px, #ffffff 100%) !important;
  }

  .league-standings-card::before {
    height: 78px !important;
    background:
      radial-gradient(circle at 16% 50%, color-mix(in srgb, var(--group-color, #22d3ee) 22%, transparent), transparent 30%),
      radial-gradient(circle at 50% 0%, rgba(59,130,246,.28), transparent 40%),
      linear-gradient(135deg, #06173b 0%, #0b2d70 64%, #0b63c8 100%) !important;
  }

  .league-standings-card__head {
    position: relative !important;
    z-index: 3 !important;
    min-height: 78px !important;
    height: 78px !important;
    padding: 14px 14px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
  }

  .league-standings-card__head h3 {
    flex: 0 1 calc(50% - 36px) !important;
    max-width: calc(50% - 36px) !important;
    min-width: 0 !important;
    margin: 0 !important;
    font-size: 19px !important;
    line-height: 1.05 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .league-standings-card__head h3::before {
    flex: 0 0 auto !important;
    width: 9px !important;
    height: 9px !important;
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--group-color, #22d3ee) 18%, transparent) !important;
  }

  .league-standings-card__head span {
    position: static !important;
    flex: 0 1 calc(50% - 36px) !important;
    max-width: calc(50% - 36px) !important;
    min-width: 0 !important;
    justify-content: center !important;
    min-height: 26px !important;
    padding: 0 10px !important;
    font-size: 10px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    color: rgba(255,255,255,.94) !important;
    background: rgba(255,255,255,.13) !important;
    border-color: rgba(255,255,255,.24) !important;
  }

  .league-standings-card__logo {
    position: absolute !important;
    z-index: 6 !important;
    top: 14px !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translateX(-50%) !important;
    display: grid !important;
    place-items: center !important;
    justify-self: auto !important;
    width: 50px !important;
    height: 50px !important;
    border-radius: 18px !important;
    background: rgba(255,255,255,.94) !important;
    border: 1px solid rgba(255,255,255,.92) !important;
    box-shadow: 0 12px 28px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.95) !important;
  }

  .league-standings-card__logo img {
    width: 36px !important;
    height: 36px !important;
    object-fit: contain !important;
  }

  .league-table-wrap {
    margin-top: 0 !important;
    border-radius: 0 0 20px 20px !important;
  }
}

@media (max-width: 380px) {
  .league-standings-card {
    background:
      linear-gradient(180deg, #06173b 0, #071d49 74px, #ffffff 74px, #ffffff 100%) !important;
  }

  .league-standings-card::before {
    height: 74px !important;
  }

  .league-standings-card__head {
    min-height: 74px !important;
    height: 74px !important;
    padding: 12px 12px !important;
  }

  .league-standings-card__head h3 {
    font-size: 17px !important;
    flex-basis: calc(50% - 31px) !important;
    max-width: calc(50% - 31px) !important;
  }

  .league-standings-card__head span {
    flex-basis: calc(50% - 31px) !important;
    max-width: calc(50% - 31px) !important;
    min-height: 24px !important;
    padding: 0 8px !important;
    font-size: 9px !important;
  }

  .league-standings-card__logo {
    top: 13px !important;
    width: 46px !important;
    height: 46px !important;
    border-radius: 16px !important;
  }

  .league-standings-card__logo img {
    width: 33px !important;
    height: 33px !important;
  }
}

/* ===== TFP COMPACT 2026-07-11: mniejszy nagłówek Tabela + rundy ===== */
body[data-page="league-view"] .league-table-page-head {
  margin: 0 0 8px !important;
  padding: 0 !important;
}

body[data-page="league-view"] .league-table-page-head__top {
  align-items: center !important;
  gap: 12px !important;
  margin-bottom: 8px !important;
}

body[data-page="league-view"] .league-table-page-head h1 {
  margin: 0 !important;
  font-size: clamp(20px, 2.25vw, 28px) !important;
  line-height: 1.05 !important;
  letter-spacing: -0.03em !important;
}

body[data-page="league-view"] .league-round-summary-card--top {
  min-width: 210px !important;
  padding: 10px 13px !important;
  border-radius: 14px !important;
  box-shadow: 0 10px 24px rgba(15,35,82,.07) !important;
}

body[data-page="league-view"] .league-round-summary-card--top strong {
  margin-bottom: 2px !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
}

body[data-page="league-view"] .league-round-summary-card--top .league-round-meta {
  font-size: 10.5px !important;
  line-height: 1.25 !important;
}

body[data-page="league-view"] .league-round-tabs--page {
  gap: 7px !important;
  margin: 0 0 8px !important;
}

body[data-page="league-view"] .league-round-tabs--page .league-round-tab {
  min-height: 30px !important;
  padding: 0 12px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  box-shadow: 0 6px 16px rgba(15,35,82,.05) !important;
}

body[data-page="league-view"] .league-top-tabs {
  margin: 6px 0 10px !important;
}

body[data-page="league-view"] #table .league-mini-tabs[data-group-tabs="table"] {
  margin: 2px 0 10px !important;
  padding: 8px !important;
}

body[data-page="league-view"] #table .league-mini-tab {
  min-height: 30px !important;
  padding: 0 12px !important;
  font-size: 11px !important;
}

@media (max-width: 900px) {
  body[data-page="league-view"] .league-table-page-head__top {
    gap: 7px !important;
    margin-bottom: 7px !important;
  }

  body[data-page="league-view"] .league-table-page-head h1 {
    font-size: 24px !important;
  }

  body[data-page="league-view"] .league-round-summary-card--top {
    padding: 9px 11px !important;
    border-radius: 13px !important;
  }
}

@media (max-width: 640px) {
  body[data-page="league-view"] .league-shell {
    padding-top: 8px !important;
  }

  body[data-page="league-view"] .league-table-page-head h1 {
    font-size: 24px !important;
  }

  body[data-page="league-view"] .league-round-summary-card--top strong {
    font-size: 11px !important;
  }

  body[data-page="league-view"] .league-round-summary-card--top .league-round-meta {
    font-size: 10px !important;
  }

  body[data-page="league-view"] .league-round-tabs--page .league-round-tab {
    min-height: 28px !important;
    padding: 0 10px !important;
    font-size: 10.5px !important;
  }

  body[data-page="league-view"] #table .league-mini-tabs[data-group-tabs="table"] {
    gap: 6px !important;
    padding: 7px !important;
    border-radius: 14px !important;
  }

  body[data-page="league-view"] #table .league-mini-tab {
    min-height: 28px !important;
    padding: 0 10px !important;
    font-size: 10.5px !important;
  }
}

/* ===== TFP HOTFIX 2026-07-11: usuń granatowy baner tabeli, logo w kompaktowym wierszu ===== */
body[data-page="league-view"] .league-standings-card {
  overflow: hidden !important;
  margin-top: 8px !important;
  border-radius: 22px !important;
  background: #ffffff !important;
  border: 1px solid rgba(191, 219, 254, .92) !important;
  box-shadow: 0 18px 44px rgba(15, 35, 82, .10) !important;
}

body[data-page="league-view"] .league-standings-card::before {
  display: none !important;
  content: none !important;
}

body[data-page="league-view"] .league-standings-card__head {
  position: relative !important;
  z-index: 3 !important;
  min-height: 58px !important;
  height: 58px !important;
  margin: 0 !important;
  padding: 10px 18px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  color: #071832 !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(14, 165, 233, .10), transparent 42%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%) !important;
  border-bottom: 1px solid #dbeafe !important;
}

body[data-page="league-view"] .league-standings-card__head h3 {
  flex: 0 1 calc(50% - 40px) !important;
  max-width: calc(50% - 40px) !important;
  min-width: 0 !important;
  margin: 0 !important;
  color: #071832 !important;
  text-shadow: none !important;
  font-size: clamp(17px, 1.65vw, 21px) !important;
  line-height: 1.05 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-page="league-view"] .league-standings-card__head h3::before {
  flex: 0 0 auto !important;
  width: 10px !important;
  height: 10px !important;
  background: var(--group-color, #22d3ee) !important;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--group-color, #22d3ee) 16%, transparent) !important;
}

body[data-page="league-view"] .league-standings-card__head span {
  position: static !important;
  flex: 0 1 calc(50% - 40px) !important;
  max-width: calc(50% - 40px) !important;
  min-width: 0 !important;
  min-height: 30px !important;
  padding: 0 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  justify-self: auto !important;
  border-radius: 999px !important;
  color: #0b4fe8 !important;
  background: #eff6ff !important;
  border: 1px solid #dbeafe !important;
  font-size: 11px !important;
  font-weight: 950 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9) !important;
}

body[data-page="league-view"] .league-standings-card__logo {
  position: absolute !important;
  z-index: 6 !important;
  top: 8px !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translateX(-50%) !important;
  display: grid !important;
  place-items: center !important;
  width: 42px !important;
  height: 42px !important;
  border-radius: 14px !important;
  background: rgba(255,255,255,.96) !important;
  border: 1px solid #dbeafe !important;
  box-shadow: 0 10px 22px rgba(15,35,82,.12), inset 0 1px 0 rgba(255,255,255,.95) !important;
  backdrop-filter: none !important;
}

body[data-page="league-view"] .league-standings-card__logo img {
  width: 30px !important;
  height: 30px !important;
  object-fit: contain !important;
  filter: drop-shadow(0 4px 7px rgba(15,35,82,.14)) !important;
}

body[data-page="league-view"] .league-table-wrap {
  margin-top: 0 !important;
  border-radius: 0 0 22px 22px !important;
  background: #fff !important;
}

body[data-page="league-view"] .league-standings-table thead th {
  top: 0 !important;
}

@media (max-width: 900px) {
  body[data-page="league-view"] .league-standings-card__head {
    min-height: 54px !important;
    height: 54px !important;
    padding: 9px 12px !important;
    gap: 10px !important;
  }

  body[data-page="league-view"] .league-standings-card__head h3 {
    flex-basis: calc(50% - 34px) !important;
    max-width: calc(50% - 34px) !important;
    font-size: 17px !important;
  }

  body[data-page="league-view"] .league-standings-card__head span {
    flex-basis: calc(50% - 34px) !important;
    max-width: calc(50% - 34px) !important;
    min-height: 27px !important;
    padding: 0 9px !important;
    font-size: 10px !important;
  }

  body[data-page="league-view"] .league-standings-card__logo {
    top: 8px !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 13px !important;
  }

  body[data-page="league-view"] .league-standings-card__logo img {
    width: 28px !important;
    height: 28px !important;
  }
}

@media (max-width: 380px) {
  body[data-page="league-view"] .league-standings-card__head {
    min-height: 52px !important;
    height: 52px !important;
    padding: 8px 10px !important;
  }

  body[data-page="league-view"] .league-standings-card__head h3 {
    flex-basis: calc(50% - 31px) !important;
    max-width: calc(50% - 31px) !important;
    font-size: 16px !important;
  }

  body[data-page="league-view"] .league-standings-card__head span {
    flex-basis: calc(50% - 31px) !important;
    max-width: calc(50% - 31px) !important;
    min-height: 25px !important;
    padding: 0 7px !important;
    font-size: 9px !important;
  }

  body[data-page="league-view"] .league-standings-card__logo {
    top: 8px !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 12px !important;
  }

  body[data-page="league-view"] .league-standings-card__logo img {
    width: 26px !important;
    height: 26px !important;
  }
}

/* ===== TFP HOTFIX: logo wyżej na środku, nie w tabeli ===== */
body[data-page="league-view"] .league-table-page-head__top {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 18px !important;
}

body[data-page="league-view"] .league-table-page-head__title {
  min-width: 0 !important;
  justify-self: start !important;
}

body[data-page="league-view"] .league-table-page-logo {
  justify-self: center !important;
  align-self: center !important;
  width: 58px !important;
  height: 58px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 20px !important;
  background: rgba(255, 255, 255, .96) !important;
  border: 1px solid #dbeafe !important;
  box-shadow: 0 16px 34px rgba(15, 35, 82, .12), inset 0 1px 0 rgba(255,255,255,.96) !important;
}

body[data-page="league-view"] .league-table-page-logo img {
  width: 42px !important;
  height: 42px !important;
  object-fit: contain !important;
  filter: drop-shadow(0 5px 8px rgba(15, 35, 82, .16)) !important;
}

/* Jeżeli na serwerze został stary HTML z logo w tabeli, ukryj je w karcie tabeli. */
body[data-page="league-view"] .league-standings-card > .league-standings-card__logo {
  display: none !important;
}

/* Po wyjęciu logo z tabeli wiersz grupy nie musi robić miejsca na środek. */
body[data-page="league-view"] .league-standings-card__head h3 {
  flex: 1 1 auto !important;
  max-width: none !important;
}

body[data-page="league-view"] .league-standings-card__head span {
  flex: 0 0 auto !important;
  max-width: none !important;
}

@media (max-width: 900px) {
  body[data-page="league-view"] .league-table-page-head__top {
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "title summary"
      "logo logo" !important;
    align-items: center !important;
    gap: 8px 12px !important;
  }

  body[data-page="league-view"] .league-table-page-head__title {
    grid-area: title !important;
  }

  body[data-page="league-view"] .league-round-summary-card--top {
    grid-area: summary !important;
    width: auto !important;
    justify-self: end !important;
  }

  body[data-page="league-view"] .league-table-page-logo {
    grid-area: logo !important;
    width: 50px !important;
    height: 50px !important;
    border-radius: 17px !important;
    margin: 2px auto 0 !important;
  }

  body[data-page="league-view"] .league-table-page-logo img {
    width: 36px !important;
    height: 36px !important;
  }
}

@media (max-width: 640px) {
  body[data-page="league-view"] .league-table-page-head__top {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "title"
      "logo"
      "summary" !important;
    justify-items: start !important;
  }

  body[data-page="league-view"] .league-table-page-logo {
    justify-self: center !important;
    margin: 0 auto 2px !important;
    width: 46px !important;
    height: 46px !important;
    border-radius: 16px !important;
  }

  body[data-page="league-view"] .league-table-page-logo img {
    width: 33px !important;
    height: 33px !important;
  }

  body[data-page="league-view"] .league-round-summary-card--top {
    justify-self: stretch !important;
    width: 100% !important;
  }

  body[data-page="league-view"] .league-standings-card__head {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 52px !important;
    height: 52px !important;
    padding: 10px 12px !important;
  }

  body[data-page="league-view"] .league-standings-card__head h3 {
    flex: 1 1 auto !important;
    max-width: calc(100% - 112px) !important;
    font-size: 18px !important;
  }

  body[data-page="league-view"] .league-standings-card__head span {
    flex: 0 0 auto !important;
    max-width: 106px !important;
    min-height: 26px !important;
  }
}


/* ===== TFP HOTFIX 2026-07-11: nazwa ligi u góry + logo nie zjeżdża na mobile ===== */
body[data-page="league-view"] .league-table-page-head__top {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
  grid-template-areas: "title logo summary" !important;
  align-items: center !important;
  gap: 14px !important;
  margin-bottom: 8px !important;
}

body[data-page="league-view"] .league-table-page-head__title {
  grid-area: title !important;
  min-width: 0 !important;
  justify-self: start !important;
}

body[data-page="league-view"] .league-table-page-head h1 {
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: clamp(22px, 2.4vw, 31px) !important;
  line-height: 1.05 !important;
  color: #071832 !important;
}

body[data-page="league-view"] .league-table-page-logo {
  grid-area: logo !important;
  justify-self: center !important;
  align-self: center !important;
  margin: 0 !important;
  width: 48px !important;
  height: 48px !important;
  border-radius: 16px !important;
  display: grid !important;
  place-items: center !important;
  background: rgba(255,255,255,.97) !important;
  border: 1px solid #dbeafe !important;
  box-shadow: 0 12px 28px rgba(15,35,82,.12), inset 0 1px 0 rgba(255,255,255,.95) !important;
}

body[data-page="league-view"] .league-table-page-logo img {
  width: 35px !important;
  height: 35px !important;
  object-fit: contain !important;
  filter: drop-shadow(0 4px 7px rgba(15,35,82,.14)) !important;
}

body[data-page="league-view"] .league-round-summary-card--top {
  grid-area: summary !important;
  justify-self: end !important;
  width: auto !important;
  min-width: 235px !important;
}

/* Logo nie może wracać do karty tabeli. */
body[data-page="league-view"] .league-standings-card > .league-standings-card__logo {
  display: none !important;
}

@media (max-width: 900px) {
  body[data-page="league-view"] .league-table-page-head__top {
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "title logo"
      "summary summary" !important;
    align-items: center !important;
    gap: 8px 10px !important;
  }

  body[data-page="league-view"] .league-table-page-head h1 {
    font-size: 24px !important;
    white-space: nowrap !important;
  }

  body[data-page="league-view"] .league-table-page-logo {
    width: 42px !important;
    height: 42px !important;
    border-radius: 14px !important;
    justify-self: end !important;
  }

  body[data-page="league-view"] .league-table-page-logo img {
    width: 30px !important;
    height: 30px !important;
  }

  body[data-page="league-view"] .league-round-summary-card--top {
    justify-self: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
  }
}

@media (max-width: 640px) {
  body[data-page="league-view"] .league-table-page-head {
    margin-bottom: 8px !important;
  }

  body[data-page="league-view"] .league-table-page-head__top {
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "title logo"
      "summary summary" !important;
    justify-items: stretch !important;
    gap: 7px 10px !important;
  }

  body[data-page="league-view"] .league-table-page-head__title {
    align-self: center !important;
  }

  body[data-page="league-view"] .league-table-page-head h1 {
    font-size: 22px !important;
    letter-spacing: -.035em !important;
  }

  body[data-page="league-view"] .league-table-page-logo {
    width: 38px !important;
    height: 38px !important;
    border-radius: 13px !important;
    margin: 0 !important;
    justify-self: end !important;
  }

  body[data-page="league-view"] .league-table-page-logo img {
    width: 27px !important;
    height: 27px !important;
  }

  body[data-page="league-view"] .league-round-summary-card--top {
    margin: 0 !important;
  }
}


/* Mobile navigation polish: league tabs stay compact and readable. */
@media (max-width: 700px) {
  body[data-page="league-view"] .league-top-tabs {
    position: relative;
    gap: 5px !important;
    padding: 5px !important;
    border-radius: 13px !important;
    scroll-padding-inline: 5px;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }

  body[data-page="league-view"] .league-top-tab {
    min-width: auto !important;
    min-height: 30px !important;
    padding: 0 10px !important;
    border-radius: 9px !important;
    font-size: 9px !important;
    line-height: 1 !important;
    white-space: nowrap;
  }

  body[data-page="league-view"] .league-round-tabs--page {
    gap: 6px !important;
    padding-bottom: 2px;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  body[data-page="league-view"] .league-round-tabs--page::-webkit-scrollbar { display: none; }

  body[data-page="league-view"] .league-round-tabs--page .league-round-tab {
    flex: 0 0 auto;
    min-height: 28px !important;
    padding: 0 11px !important;
    border-radius: 999px !important;
    font-size: 9px !important;
  }
}

/* =========================================================
   Nazwiska w tabeli: czarne domyślnie, niebieskie tylko po hover
   ========================================================= */
body[data-page="league-view"] .league-standings-table .league-player-inline strong,
body[data-page="league-view"] .league-standings-table .league-player-inline strong span,
body[data-page="league-view"] .league-standings-table .league-player-inline strong a,
body[data-page="league-view"] .league-standings-table .league-player-inline strong a:visited {
  color: #0b172a !important;
}

body[data-page="league-view"] .league-standings-table .league-player-inline strong a {
  transition: color .16s ease, text-decoration-color .16s ease;
  text-decoration-color: transparent;
}

body[data-page="league-view"] .league-standings-table .league-player-inline strong a:hover,
body[data-page="league-view"] .league-standings-table .league-player-inline strong a:focus-visible {
  color: #075cff !important;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  text-decoration-color: currentColor;
}

/* =========================================================
   Zawodnicy w tabeli: zwykłe nazwiska czarne, profile wyróżnione
   ========================================================= */
body[data-page="league-view"] .league-standings-table .league-player-inline strong {
  color: #111827 !important;
}

body[data-page="league-view"] .league-standings-table .league-player-inline strong > span,
body[data-page="league-view"] .league-standings-table .league-player-inline strong:not(:has(a)) {
  color: #111827 !important;
}

body[data-page="league-view"] .league-standings-table .league-player-inline strong > a,
body[data-page="league-view"] .league-standings-table .league-player-inline strong > a:visited {
  color: #075cff !important;
  text-decoration: none !important;
  text-decoration-color: transparent !important;
  transition: color .16s ease, text-decoration-color .16s ease;
}



/* Final: profile links change colour only — no underline */
body[data-page="league-view"] .league-standings-table .league-player-inline strong a,
body[data-page="league-view"] .league-standings-table .league-player-inline strong a:visited,
body[data-page="league-view"] .league-standings-table .league-player-inline strong a:hover,
body[data-page="league-view"] .league-standings-table .league-player-inline strong a:focus,
body[data-page="league-view"] .league-standings-table .league-player-inline strong a:focus-visible,
body[data-page="league-view"] .league-standings-table .league-player-inline strong a:active {
  text-decoration: none !important;
  text-decoration-line: none !important;
  text-decoration-color: transparent !important;
}

/* =========================================================
   TFP PATCH: spokojniejsze nazwiska w tabeli ligi
   - czarny, lżejszy tekst
   - profil z kontem: hover wyłącznie kolorem
   - bez obwódki i bez podświetlania całego wiersza
   - nazwa grupy nie jest powtarzana pod każdym zawodnikiem
   ========================================================= */
body[data-page="league-view"] #table .league-standings-table .league-player-inline strong,
body[data-page="league-view"] #table .league-standings-table .league-player-inline strong > span,
body[data-page="league-view"] #table .league-standings-table .league-player-inline strong > a,
body[data-page="league-view"] #table .league-standings-table .league-player-inline .tfp-player-link {
  color: #111827 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: -0.008em !important;
  line-height: 1.3 !important;
  text-decoration: none !important;
}

body[data-page="league-view"] #table .league-standings-table .league-player-inline a.tfp-player-link,
body[data-page="league-view"] #table .league-standings-table .league-player-inline strong > a {
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  transition: color .16s ease !important;
}

body[data-page="league-view"] #table .league-standings-table .league-player-inline a.tfp-player-link:hover,
body[data-page="league-view"] #table .league-standings-table .league-player-inline a.tfp-player-link:focus-visible,
body[data-page="league-view"] #table .league-standings-table .league-player-inline strong > a:hover,
body[data-page="league-view"] #table .league-standings-table .league-player-inline strong > a:focus-visible {
  color: #3b82f6 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  text-decoration: none !important;
}

body[data-page="league-view"] #table .league-player-sub {
  display: none !important;
}

body[data-page="league-view"] #table .league-standings-table tbody tr:hover td,
body[data-page="league-view"] #table .league-standings-table tbody tr:hover td:first-child {
  background: inherit !important;
  box-shadow: none !important;
}

/* ======================================================================
   TFP PATCH 2026-08 — większe logo ligi, spójne z nagłówkiem turnieju.
   Dotyczy wyłącznie planszy z logo pomiędzy nazwą ligi a podsumowaniem rundy.
   ====================================================================== */
@media (min-width: 901px) {
  body[data-page="league-view"] .league-table-page-logo {
    width: clamp(180px, 14vw, 220px) !important;
    height: 86px !important;
    min-width: 180px !important;
    padding: 7px 12px !important;
    border-radius: 18px !important;
    overflow: hidden !important;
  }

  body[data-page="league-view"] .league-table-page-logo img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center !important;
    transform: scale(1.22) !important;
    transform-origin: center !important;
    filter: none !important;
  }
}

@media (min-width: 1200px) {
  body[data-page="league-view"] .league-table-page-logo {
    width: 220px !important;
    height: 90px !important;
    min-width: 220px !important;
  }

  body[data-page="league-view"] .league-table-page-logo img {
    transform: scale(1.28) !important;
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  body[data-page="league-view"] .league-table-page-logo {
    width: 145px !important;
    height: 64px !important;
    min-width: 145px !important;
    padding: 6px 10px !important;
    border-radius: 16px !important;
    overflow: hidden !important;
  }

  body[data-page="league-view"] .league-table-page-logo img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center !important;
    transform: scale(1.16) !important;
    filter: none !important;
  }
}

@media (max-width: 640px) {
  body[data-page="league-view"] .league-table-page-logo {
    width: 104px !important;
    height: 48px !important;
    min-width: 104px !important;
    padding: 5px 8px !important;
    border-radius: 14px !important;
    overflow: hidden !important;
  }

  body[data-page="league-view"] .league-table-page-logo img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center !important;
    transform: scale(1.08) !important;
    filter: none !important;
  }
}

/* ======================================================================
   TFP FINAL — tabela ligi: typografia 1:1 jak w tabeli turnieju
   ====================================================================== */

/* Wszystkie zwykłe komórki mają tę samą wagę co w turnieju. */
body[data-page="league-view"] #table .league-standings-table tbody td {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #0b1d3d !important;
  letter-spacing: normal !important;
}

/* Nazwiska — dokładnie jak w turnieju. */
body[data-page="league-view"] #table .league-standings-table .league-player-inline strong,
body[data-page="league-view"] #table .league-standings-table .league-player-inline strong > span,
body[data-page="league-view"] #table .league-standings-table .league-player-inline strong > a,
body[data-page="league-view"] #table .league-standings-table .league-player-inline .tfp-player-link,
body[data-page="league-view"] #table .league-standings-table .league-player-inline .tfp-pair-inline {
  color: #111827 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: -0.008em !important;
  line-height: 1.3 !important;
  text-decoration: none !important;
}

/* Profil z kontem — tylko zmiana koloru, bez ramki/tła/podkreślenia. */
body[data-page="league-view"] #table .league-standings-table .league-player-inline a.tfp-player-link,
body[data-page="league-view"] #table .league-standings-table .league-player-inline .tfp-pair-inline a,
body[data-page="league-view"] #table .league-standings-table .league-player-inline strong > a {
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  color: #111827 !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  transition: color .16s ease !important;
}

body[data-page="league-view"] #table .league-standings-table .league-player-inline a.tfp-player-link:hover,
body[data-page="league-view"] #table .league-standings-table .league-player-inline a.tfp-player-link:focus-visible,
body[data-page="league-view"] #table .league-standings-table .league-player-inline .tfp-pair-inline a:hover,
body[data-page="league-view"] #table .league-standings-table .league-player-inline .tfp-pair-inline a:focus-visible,
body[data-page="league-view"] #table .league-standings-table .league-player-inline strong > a:hover,
body[data-page="league-view"] #table .league-standings-table .league-player-inline strong > a:focus-visible {
  color: #3b82f6 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  text-decoration: none !important;
}

/* Numer pozycji — ta sama subtelna grubość jak w turnieju. */
body[data-page="league-view"] #table .league-rank {
  font-weight: 650 !important;
}

/* Nazwa grupy jest w nagłówku karty — nie powtarzamy jej pod nazwiskiem. */
body[data-page="league-view"] #table .league-player-sub {
  display: none !important;
}

/* Bez hovera całego wiersza — dokładnie jak po ostatniej poprawce turnieju. */
body[data-page="league-view"] #table .league-standings-table tbody tr:hover td,
body[data-page="league-view"] #table .league-standings-table tbody tr:hover td:first-child {
  background: inherit !important;
  box-shadow: none !important;
}

/* Zakładki grup i nagłówek karty — te same wagi co w turnieju. */
body[data-page="league-view"] #table .league-mini-tab {
  font-weight: 650 !important;
}
body[data-page="league-view"] #table .league-mini-tab.active {
  font-weight: 700 !important;
}
body[data-page="league-view"] #table .league-standings-card .league-standings-card__head h3 {
  font-weight: 700 !important;
}
body[data-page="league-view"] #table .league-standings-card .league-standings-card__head span {
  font-weight: 600 !important;
}

/* ======================================================================
   TFP FIX 2026-08 — logo ligi bez przycinania (kwadratowe / pionowe / szerokie)
   Zachowuje dużą planszę, ale usuwa sztuczne skalowanie obrazu.
   ====================================================================== */
body[data-page="league-view"] .league-table-page-logo {
  overflow: hidden !important;
}

body[data-page="league-view"] .league-table-page-logo img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  transform: none !important;
  margin: 0 auto !important;
}

@media (min-width: 901px) {
  body[data-page="league-view"] .league-table-page-logo {
    padding: 8px 14px !important;
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  body[data-page="league-view"] .league-table-page-logo {
    padding: 7px 10px !important;
  }
}

@media (max-width: 640px) {
  body[data-page="league-view"] .league-table-page-logo {
    padding: 5px 8px !important;
  }
}

/* ======================================================================
   TFP FINAL LOGO FIX 2026-08 — kwadratowe logo ligi w całości
   Plansza jest kwadratowa, obraz nigdy nie jest rozciągany ani przycinany.
   ====================================================================== */
@media (min-width: 901px) {
  body[data-page="league-view"] .league-table-page-logo {
    width: 96px !important;
    height: 96px !important;
    min-width: 96px !important;
    padding: 10px !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  body[data-page="league-view"] .league-table-page-logo img {
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: 76px !important;
    max-height: 76px !important;
    object-fit: contain !important;
    object-position: center !important;
    transform: none !important;
    margin: auto !important;
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  body[data-page="league-view"] .league-table-page-logo {
    width: 82px !important;
    height: 82px !important;
    min-width: 82px !important;
    padding: 9px !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  body[data-page="league-view"] .league-table-page-logo img {
    width: auto !important;
    height: auto !important;
    max-width: 64px !important;
    max-height: 64px !important;
    object-fit: contain !important;
    transform: none !important;
    margin: auto !important;
  }
}

@media (max-width: 640px) {
  body[data-page="league-view"] .league-table-page-logo {
    width: 66px !important;
    height: 66px !important;
    min-width: 66px !important;
    padding: 8px !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  body[data-page="league-view"] .league-table-page-logo img {
    width: auto !important;
    height: auto !important;
    max-width: 50px !important;
    max-height: 50px !important;
    object-fit: contain !important;
    transform: none !important;
    margin: auto !important;
  }
}
