/* TennisFinalsPro — shared competition visual language
   One final UI stylesheet for LEAGUE and TOURNAMENT.
   The league rules are the canonical design. Tournament receives the exact same
   declarations with a stronger tournament-page scope so legacy tournament skins
   cannot visually diverge from the league table/matches UI. */

/* TennisFinalsPro League — V16 FINAL TABLE LANGUAGE
   Loaded LAST. Purpose: make every league view use the same visual language as Table.
   No layout/business logic changes. */

body[data-page="league-view"] {
  --tfp16-navy:#082f49;
  --tfp16-navy-2:#0b3a59;
  --tfp16-blue:#1477d4;
  --tfp16-text:#10233d;
  --tfp16-muted:#66788c;
  --tfp16-line:#d7e1eb;
  --tfp16-soft:#f5f8fb;
  --tfp16-white:#fff;
}

/* ===== PAGE ===== */
body[data-page="league-view"] .league-page,
body[data-page="league-view"] .league-shell,
body[data-page="league-view"] .league-panels {
  background-image:none !important;
}
body[data-page="league-view"] .league-page { background:#f7f9fc !important; }
body[data-page="league-view"] .league-shell { background:transparent !important; }

/* ===== NO DECORATIVE UNDERLINES / TRIANGLES / GLOWS ON NAV ===== */
body[data-page="league-view"] .league-top-tab::before,
body[data-page="league-view"] .league-top-tab::after,
body[data-page="league-view"] .league-round-tab::before,
body[data-page="league-view"] .league-round-tab::after,
body[data-page="league-view"] .league-match-status-tab::before,
body[data-page="league-view"] .league-match-status-tab::after,
body[data-page="league-view"] .tfp-manager-tab::before,
body[data-page="league-view"] .tfp-manager-tab::after {
  content:none !important;
  display:none !important;
  border:0 !important;
  box-shadow:none !important;
}

/* ===== MAIN TABS ===== */
body[data-page="league-view"] .league-top-tabs {
  display:flex !important;
  align-items:center !important;
  gap:4px !important;
  min-height:38px !important;
  margin:6px 0 12px !important;
  padding:3px !important;
  border:1px solid var(--tfp16-line) !important;
  border-radius:3px !important;
  background:#fff !important;
  background-image:none !important;
  box-shadow:none !important;
  overflow-x:auto !important;
  overflow-y:hidden !important;
  scrollbar-width:none !important;
}
body[data-page="league-view"] .league-top-tabs::-webkit-scrollbar { display:none !important; }
body[data-page="league-view"] .league-top-tab {
  flex:0 0 auto !important;
  min-width:0 !important;
  min-height:31px !important;
  height:31px !important;
  padding:0 13px !important;
  margin:0 !important;
  border:1px solid transparent !important;
  border-radius:3px !important;
  background:#fff !important;
  background-image:none !important;
  color:#263e56 !important;
  box-shadow:none !important;
  clip-path:none !important;
  transform:none !important;
  font-size:9px !important;
  line-height:29px !important;
  font-weight:750 !important;
  letter-spacing:0 !important;
  text-decoration:none !important;
  white-space:nowrap !important;
}
body[data-page="league-view"] .league-top-tab:hover {
  border-color:#bdcad6 !important;
  background:#f6f8fa !important;
  color:var(--tfp16-navy) !important;
}
body[data-page="league-view"] .league-top-tab.active {
  border-color:var(--tfp16-navy) !important;
  background:var(--tfp16-navy) !important;
  background-image:none !important;
  color:#fff !important;
  box-shadow:none !important;
}
body[data-page="league-view"] .league-top-tab--manage {
  border-color:#cbd7e2 !important;
  background:#fff !important;
  color:var(--tfp16-navy) !important;
}
body[data-page="league-view"] .league-top-tab--manage.active {
  border-color:var(--tfp16-navy) !important;
  background:var(--tfp16-navy) !important;
  color:#fff !important;
}
body[data-page="league-view"] .league-top-tab--owner {
  border-color:#e7d3ad !important;
  background:#fffaf1 !important;
  color:#89520a !important;
}

/* ===== ROUNDS — RECTANGLES, NO WHITE PILL BAR ===== */
body[data-page="league-view"] .league-round-tabs,
body[data-page="league-view"] .league-round-tabs--page,
body[data-page="league-view"] #table .league-round-tabs,
body[data-page="league-view"] #matches .league-round-tabs,
body[data-page="league-view"] #results .league-round-tabs {
  display:flex !important;
  flex-wrap:nowrap !important;
  align-items:center !important;
  gap:6px !important;
  width:auto !important;
  min-height:0 !important;
  margin:8px 0 11px !important;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  background-image:none !important;
  box-shadow:none !important;
  overflow-x:auto !important;
  overflow-y:hidden !important;
  scrollbar-width:none !important;
}
body[data-page="league-view"] .league-round-tabs::-webkit-scrollbar,
body[data-page="league-view"] .league-round-tabs--page::-webkit-scrollbar { display:none !important; }
body[data-page="league-view"] .league-round-tab,
body[data-page="league-view"] .league-round-tabs--page .league-round-tab,
body[data-page="league-view"] #table .league-round-tab,
body[data-page="league-view"] #matches .league-round-tab,
body[data-page="league-view"] #results .league-round-tab {
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  flex:0 0 auto !important;
  min-width:0 !important;
  min-height:30px !important;
  height:30px !important;
  margin:0 !important;
  padding:0 13px !important;
  border:1px solid #cbd7e2 !important;
  border-radius:3px !important;
  background:#fff !important;
  background-image:none !important;
  color:#29435d !important;
  box-shadow:none !important;
  clip-path:none !important;
  transform:none !important;
  font-size:9.5px !important;
  line-height:28px !important;
  font-weight:800 !important;
  text-decoration:none !important;
  white-space:nowrap !important;
}
body[data-page="league-view"] .league-round-tab.active,
body[data-page="league-view"] .league-round-tabs--page .league-round-tab.active,
body[data-page="league-view"] #table .league-round-tab.active,
body[data-page="league-view"] #matches .league-round-tab.active,
body[data-page="league-view"] #results .league-round-tab.active {
  border-color:var(--tfp16-navy) !important;
  background:var(--tfp16-navy) !important;
  background-image:none !important;
  color:#fff !important;
  box-shadow:none !important;
}

/* ===== GROUPS — EXACT SAME LANGUAGE AS ROUNDS ===== */
body[data-page="league-view"] .league-mini-tabs,
body[data-page="league-view"] #table .league-mini-tabs[data-group-tabs="table"],
body[data-page="league-view"] #matches .league-mini-tabs[data-group-tabs="matches"],
body[data-page="league-view"] #results .league-mini-tabs[data-group-tabs="results"] {
  display:flex !important;
  flex-wrap:nowrap !important;
  align-items:center !important;
  gap:6px !important;
  width:auto !important;
  min-height:0 !important;
  margin:8px 0 11px !important;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  background-image:none !important;
  box-shadow:none !important;
  overflow-x:auto !important;
  overflow-y:hidden !important;
  scrollbar-width:none !important;
}
body[data-page="league-view"] .league-mini-tabs::-webkit-scrollbar { display:none !important; }
body[data-page="league-view"] .league-mini-tab,
body[data-page="league-view"] #table .league-mini-tab,
body[data-page="league-view"] #matches .league-mini-tabs[data-group-tabs="matches"] .league-mini-tab,
body[data-page="league-view"] #results .league-mini-tab {
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  flex:0 0 auto !important;
  min-width:0 !important;
  min-height:30px !important;
  height:30px !important;
  margin:0 !important;
  padding:0 13px !important;
  border:1px solid #cbd7e2 !important;
  border-radius:3px !important;
  background:#fff !important;
  background-image:none !important;
  color:#29435d !important;
  box-shadow:none !important;
  clip-path:none !important;
  transform:none !important;
  font-size:9.5px !important;
  line-height:28px !important;
  font-weight:800 !important;
  text-decoration:none !important;
  white-space:nowrap !important;
}
body[data-page="league-view"] .league-mini-tab::after { content:none !important; display:none !important; }
body[data-page="league-view"] .league-mini-tab.active,
body[data-page="league-view"] #table .league-mini-tab.active,
body[data-page="league-view"] #matches .league-mini-tabs[data-group-tabs="matches"] .league-mini-tab.active,
body[data-page="league-view"] #results .league-mini-tab.active {
  border-color:var(--tfp16-navy) !important;
  background:var(--tfp16-navy) !important;
  background-image:none !important;
  color:#fff !important;
  box-shadow:none !important;
}
/* Keep only the tiny table-language status dot on active group, never a triangle/underline. */
body[data-page="league-view"] .league-mini-tab.active::before {
  content:'' !important;
  display:block !important;
  flex:0 0 5px !important;
  width:5px !important;
  height:5px !important;
  margin:0 5px 0 0 !important;
  border:0 !important;
  border-radius:50% !important;
  background:#b7ef35 !important;
  box-shadow:none !important;
  clip-path:none !important;
  transform:none !important;
}

/* ===== MATCH FILTERS — SAME STYLE, NO GREEN/ORANGE PILL STATES ===== */
body[data-page="league-view"] #matches .league-match-status-tabs,
body[data-page="league-view"] .league-match-status-tabs {
  display:flex !important;
  flex-wrap:nowrap !important;
  align-items:center !important;
  gap:5px !important;
  min-height:0 !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  overflow-x:auto !important;
  scrollbar-width:none !important;
}
body[data-page="league-view"] .league-match-status-tabs::-webkit-scrollbar { display:none !important; }
body[data-page="league-view"] #matches .league-match-status-tab,
body[data-page="league-view"] .league-match-status-tab {
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:5px !important;
  flex:0 0 auto !important;
  min-height:28px !important;
  height:28px !important;
  padding:0 9px !important;
  border:1px solid #cbd7e2 !important;
  border-radius:3px !important;
  background:#fff !important;
  background-image:none !important;
  color:#29435d !important;
  box-shadow:none !important;
  transform:none !important;
  font-size:8.5px !important;
  line-height:26px !important;
  font-weight:800 !important;
  white-space:nowrap !important;
}
body[data-page="league-view"] #matches .league-match-status-tab.active,
body[data-page="league-view"] #matches .league-match-status-tab[data-match-filter="played"].active,
body[data-page="league-view"] #matches .league-match-status-tab[data-match-filter="pending"].active,
body[data-page="league-view"] .league-match-status-tab.active {
  border-color:var(--tfp16-navy) !important;
  background:var(--tfp16-navy) !important;
  background-image:none !important;
  color:#fff !important;
  box-shadow:none !important;
}
body[data-page="league-view"] .league-match-status-tab span {
  min-width:18px !important;
  height:18px !important;
  padding:0 4px !important;
  border:1px solid #d5e0ea !important;
  border-radius:3px !important;
  background:#f3f6f9 !important;
  color:#35526e !important;
  line-height:16px !important;
  box-shadow:none !important;
}
body[data-page="league-view"] .league-match-status-tab.active span {
  border-color:rgba(255,255,255,.35) !important;
  background:rgba(255,255,255,.12) !important;
  color:#fff !important;
}
body[data-page="league-view"] .tfp-live-filter-dot { display:none !important; }

/* ===== MATCH TOOLBAR / SEARCH ===== */
body[data-page="league-view"] #matches .league-matches-toolbar {
  display:grid !important;
  grid-template-columns:minmax(0,1fr) 235px !important;
  align-items:end !important;
  gap:12px !important;
  margin:0 0 10px !important;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}
body[data-page="league-view"] #matches .league-matches-toolbar__filters {
  display:grid !important;
  gap:7px !important;
  min-width:0 !important;
}
body[data-page="league-view"] #matches .league-search-box {
  width:235px !important;
  max-width:100% !important;
  margin:0 !important;
  align-self:end !important;
}
body[data-page="league-view"] #matches .league-search-box input,
body[data-page="league-view"] #matches input[type="text"],
body[data-page="league-view"] #matches input[type="number"],
body[data-page="league-view"] #matches select,
body[data-page="league-view"] #manage input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
body[data-page="league-view"] #manage select,
body[data-page="league-view"] #manage textarea {
  border:1.5px solid var(--tfp16-navy) !important;
  border-radius:4px !important;
  background:#fff !important;
  background-image:none !important;
  color:var(--tfp16-text) !important;
  box-shadow:none !important;
  outline:none !important;
}
body[data-page="league-view"] #matches .league-search-box input {
  width:100% !important;
  height:36px !important;
  min-height:36px !important;
  padding:0 11px !important;
  font-size:10px !important;
  font-weight:700 !important;
}
body[data-page="league-view"] #matches .league-search-box input:focus,
body[data-page="league-view"] #matches input[type="text"]:focus,
body[data-page="league-view"] #matches input[type="number"]:focus,
body[data-page="league-view"] #matches select:focus,
body[data-page="league-view"] #manage input:focus,
body[data-page="league-view"] #manage select:focus,
body[data-page="league-view"] #manage textarea:focus {
  border-color:var(--tfp16-blue) !important;
  box-shadow:0 0 0 2px rgba(20,119,212,.12) !important;
}

/* ===== GROUP HEADERS / TABLES — RECTANGULAR, NO WHITE CORNERS ===== */
body[data-page="league-view"] .league-standings-card,
body[data-page="league-view"] .league-table-card,
body[data-page="league-view"] .league-results-card,
body[data-page="league-view"] #matches .league-card {
  border:1px solid var(--tfp16-line) !important;
  border-radius:0 !important;
  background:#fff !important;
  background-image:none !important;
  box-shadow:none !important;
  overflow:hidden !important;
}
body[data-page="league-view"] .league-standings-card::before,
body[data-page="league-view"] .league-standings-card::after,
body[data-page="league-view"] .league-table-card::before,
body[data-page="league-view"] .league-table-card::after,
body[data-page="league-view"] #matches .league-card::before,
body[data-page="league-view"] #matches .league-card::after {
  content:none !important;
  display:none !important;
}
body[data-page="league-view"] .league-standings-card__head,
body[data-page="league-view"] .league-card__head,
body[data-page="league-view"] #matches .league-card__head,
body[data-page="league-view"] .league-results-card__head {
  border:0 !important;
  border-radius:0 !important;
  background:var(--tfp16-navy) !important;
  background-image:none !important;
  color:#fff !important;
  box-shadow:none !important;
}
body[data-page="league-view"] .league-standings-card__head h3,
body[data-page="league-view"] .league-card__head h3,
body[data-page="league-view"] #matches .league-card__head h3,
body[data-page="league-view"] .league-results-card__head h3,
body[data-page="league-view"] .league-standings-card__head span,
body[data-page="league-view"] .league-card__head span {
  color:#fff !important;
}
body[data-page="league-view"] .league-table-wrap,
body[data-page="league-view"] .league-results-scroll,
body[data-page="league-view"] table.league-table,
body[data-page="league-view"] .league-standings-table,
body[data-page="league-view"] .league-results-matrix,
body[data-page="league-view"] table.league-table thead,
body[data-page="league-view"] table.league-table thead tr,
body[data-page="league-view"] table.league-table thead th,
body[data-page="league-view"] .league-standings-table thead,
body[data-page="league-view"] .league-standings-table thead tr,
body[data-page="league-view"] .league-standings-table thead th {
  border-radius:0 !important;
  clip-path:none !important;
  mask:none !important;
}
body[data-page="league-view"] .league-table thead th,
body[data-page="league-view"] .league-standings-table thead th,
body[data-page="league-view"] .league-results-matrix thead th {
  background:var(--tfp16-navy) !important;
  background-image:none !important;
  color:#fff !important;
}

/* ===== MATCH CARDS — CALM, TABLE-LIKE ===== */
body[data-page="league-view"] #matches .league-matches-grid {
  gap:10px !important;
  padding:10px !important;
  background:#fff !important;
}
body[data-page="league-view"] #matches .league-match-card,
body[data-page="league-view"] #matches .league-match-card.is-played {
  border:1px solid #d6e0e9 !important;
  border-top:1px solid #d6e0e9 !important;
  border-radius:4px !important;
  background:#fff !important;
  background-image:none !important;
  box-shadow:none !important;
  overflow:hidden !important;
}
body[data-page="league-view"] #matches .league-match-card::before,
body[data-page="league-view"] #matches .league-match-card::after {
  content:none !important;
  display:none !important;
}
body[data-page="league-view"] #matches .league-match-top {
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:6px !important;
  flex-wrap:nowrap !important;
}
body[data-page="league-view"] #matches .league-match-badges,
body[data-page="league-view"] #matches .league-match-panel-links {
  display:flex !important;
  align-items:center !important;
  gap:4px !important;
  flex-wrap:nowrap !important;
  min-width:0 !important;
}
body[data-page="league-view"] #matches .league-match-score:empty { display:none !important; }
body[data-page="league-view"] #matches .league-badge,
body[data-page="league-view"] #matches .league-badge.ok,
body[data-page="league-view"] #matches .league-badge.pending,
body[data-page="league-view"] #matches .league-panel-link {
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:20px !important;
  height:20px !important;
  padding:0 6px !important;
  border:1px solid #cad6e1 !important;
  border-radius:3px !important;
  background:#f7f9fb !important;
  background-image:none !important;
  color:#29435d !important;
  box-shadow:none !important;
  font-size:7.5px !important;
  line-height:18px !important;
  font-weight:800 !important;
  text-decoration:none !important;
}
body[data-page="league-view"] #matches .league-panel-link--coach,
body[data-page="league-view"] #matches .league-panel-link--referee {
  border-color:#cad6e1 !important;
  background:#f7f9fb !important;
  color:#29435d !important;
}
body[data-page="league-view"] #matches .league-set-box input,
body[data-page="league-view"] #matches .league-set-inputs input {
  border:1.5px solid var(--tfp16-navy) !important;
  border-radius:4px !important;
  background:#fff !important;
  color:var(--tfp16-text) !important;
  box-shadow:none !important;
}
body[data-page="league-view"] #matches .league-match-form button[type="submit"],
body[data-page="league-view"] #matches .league-match-save,
body[data-page="league-view"] #matches .league-save-btn {
  border:1px solid var(--tfp16-navy) !important;
  border-radius:4px !important;
  background:var(--tfp16-navy) !important;
  background-image:none !important;
  color:#fff !important;
  box-shadow:none !important;
}

/* ===== STATS / INFO / GENERAL / MANAGER — SAME CARD LANGUAGE ===== */
body[data-page="league-view"] #stats [class*="card"],
body[data-page="league-view"] #info [class*="card"],
body[data-page="league-view"] #general [class*="card"],
body[data-page="league-view"] #manage [class*="card"],
body[data-page="league-view"] .tfp-manager__panel,
body[data-page="league-view"] .tfp-manager-panel {
  border-radius:4px !important;
  border-color:var(--tfp16-line) !important;
  background-image:none !important;
  box-shadow:none !important;
}
body[data-page="league-view"] .tfp-manager-tabs {
  display:flex !important;
  flex-wrap:nowrap !important;
  gap:4px !important;
  padding:3px !important;
  border:1px solid var(--tfp16-line) !important;
  border-radius:3px !important;
  background:#fff !important;
  box-shadow:none !important;
  overflow-x:auto !important;
  scrollbar-width:none !important;
}
body[data-page="league-view"] .tfp-manager-tabs::-webkit-scrollbar { display:none !important; }
body[data-page="league-view"] .tfp-manager-tab {
  min-height:29px !important;
  height:29px !important;
  padding:0 10px !important;
  border:1px solid transparent !important;
  border-radius:3px !important;
  background:#fff !important;
  color:#29435d !important;
  box-shadow:none !important;
  font-size:8.5px !important;
  line-height:27px !important;
  font-weight:800 !important;
  white-space:nowrap !important;
}
body[data-page="league-view"] .tfp-manager-tab.active {
  border-color:var(--tfp16-navy) !important;
  background:var(--tfp16-navy) !important;
  color:#fff !important;
}

/* ===== MOBILE — SAME DESIGN, NEVER PILLS ===== */
@media (max-width:700px) {
  body[data-page="league-view"] .league-shell {
    width:100% !important;
    padding-left:8px !important;
    padding-right:8px !important;
  }
  body[data-page="league-view"] .league-top-tabs,
  body[data-page="league-view"] .league-round-tabs,
  body[data-page="league-view"] .league-round-tabs--page,
  body[data-page="league-view"] .league-mini-tabs,
  body[data-page="league-view"] .league-match-status-tabs,
  body[data-page="league-view"] .tfp-manager-tabs {
    flex-wrap:nowrap !important;
    overflow-x:auto !important;
    border-radius:0 !important;
    -webkit-overflow-scrolling:touch !important;
  }
  body[data-page="league-view"] .league-top-tab {
    min-height:30px !important;
    height:30px !important;
    padding:0 9px !important;
    border-radius:3px !important;
    font-size:8px !important;
  }
  body[data-page="league-view"] .league-round-tab,
  body[data-page="league-view"] .league-round-tabs--page .league-round-tab,
  body[data-page="league-view"] .league-mini-tab,
  body[data-page="league-view"] #table .league-mini-tab,
  body[data-page="league-view"] #matches .league-mini-tabs[data-group-tabs="matches"] .league-mini-tab,
  body[data-page="league-view"] #results .league-mini-tab {
    min-height:25px !important;
    height:25px !important;
    padding:0 8px !important;
    border-radius:3px !important;
    font-size:7.8px !important;
    line-height:23px !important;
  }
  body[data-page="league-view"] #matches .league-match-status-tab {
    min-height:27px !important;
    height:27px !important;
    padding:0 8px !important;
    border-radius:3px !important;
    font-size:7.8px !important;
  }
  body[data-page="league-view"] #matches .league-matches-toolbar {
    grid-template-columns:1fr !important;
    gap:7px !important;
  }
  body[data-page="league-view"] #matches .league-search-box {
    width:100% !important;
  }
  body[data-page="league-view"] #matches .league-search-box input {
    height:34px !important;
    min-height:34px !important;
    border-radius:4px !important;
  }
  body[data-page="league-view"] #matches .league-match-top {
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:4px !important;
    flex-wrap:nowrap !important;
  }
  body[data-page="league-view"] #matches .league-match-badges,
  body[data-page="league-view"] #matches .league-match-panel-links {
    flex-wrap:nowrap !important;
    gap:3px !important;
  }
  body[data-page="league-view"] #matches .league-badge,
  body[data-page="league-view"] #matches .league-panel-link {
    height:19px !important;
    min-height:19px !important;
    padding:0 4px !important;
    border-radius:3px !important;
    font-size:6.8px !important;
    line-height:17px !important;
  }
  body[data-page="league-view"] #matches .league-set-box input,
  body[data-page="league-view"] #matches .league-set-inputs input {
    border-radius:4px !important;
  }
}

/* =========================================================
   v19 — MOBILE MATCH TOP ROW FIX
   Runda/status + Sędzia/Trener w jednej linii bez nachodzenia.
   ========================================================= */
@media (max-width:700px) {
  body[data-page="league-view"] #matches .league-match-top {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto !important;
    align-items:center !important;
    gap:3px !important;
    width:100% !important;
    min-width:0 !important;
  }

  body[data-page="league-view"] #matches .league-match-badges {
    display:flex !important;
    align-items:center !important;
    gap:2px !important;
    min-width:0 !important;
    overflow:hidden !important;
    flex-wrap:nowrap !important;
  }

  body[data-page="league-view"] #matches .league-match-panel-links {
    display:flex !important;
    align-items:center !important;
    justify-content:flex-end !important;
    gap:2px !important;
    width:auto !important;
    min-width:0 !important;
    margin-left:0 !important;
    flex:0 0 auto !important;
    flex-wrap:nowrap !important;
  }

  body[data-page="league-view"] #matches .league-match-panel-links .league-panel-link {
    width:auto !important;
    min-width:0 !important;
    max-width:none !important;
    height:17px !important;
    min-height:17px !important;
    padding:0 3px !important;
    border-radius:2px !important;
    font-size:6px !important;
    line-height:15px !important;
    letter-spacing:0 !important;
    white-space:nowrap !important;
    flex:0 0 auto !important;
  }

  body[data-page="league-view"] #matches .league-match-badges .league-badge {
    width:auto !important;
    min-width:0 !important;
    height:17px !important;
    min-height:17px !important;
    padding:0 3px !important;
    border-radius:2px !important;
    font-size:6px !important;
    line-height:15px !important;
    white-space:nowrap !important;
    flex:0 1 auto !important;
  }
}

/* =========================================================
   v20 — PREMIUM LIFE TUNING
   Keep the strict Table language, add controlled sport-status colour.
   No business/layout changes.
   ========================================================= */

body[data-page="league-view"] {
  --tfp20-green:#0f9f67;
  --tfp20-green-dark:#08764b;
  --tfp20-green-soft:#eaf8f1;
  --tfp20-red:#dc3545;
  --tfp20-red-dark:#b42333;
  --tfp20-red-soft:#fff0f2;
  --tfp20-amber:#e59616;
  --tfp20-amber-dark:#aa6500;
  --tfp20-amber-soft:#fff7e6;
  --tfp20-cyan:#0891b2;
  --tfp20-cyan-soft:#e8f8fb;
  --tfp20-coach:#d97706;
  --tfp20-coach-soft:#fff4df;
  --tfp20-manage:#0f766e;
  --tfp20-manage-soft:#e9f8f5;
}

/* Desktop: rounds/groups should have presence, but remain rectangular. */
@media (min-width:701px) {
  body[data-page="league-view"] .league-round-tab,
  body[data-page="league-view"] .league-round-tabs--page .league-round-tab,
  body[data-page="league-view"] #table .league-round-tab,
  body[data-page="league-view"] #matches .league-round-tab,
  body[data-page="league-view"] #results .league-round-tab {
    min-height:36px !important;
    height:36px !important;
    padding:0 20px !important;
    border-radius:5px !important;
    font-size:11.5px !important;
    line-height:34px !important;
    font-weight:850 !important;
  }

  body[data-page="league-view"] .league-mini-tab,
  body[data-page="league-view"] #table .league-mini-tab,
  body[data-page="league-view"] #matches .league-mini-tabs[data-group-tabs="matches"] .league-mini-tab,
  body[data-page="league-view"] #results .league-mini-tab {
    min-height:36px !important;
    height:36px !important;
    padding:0 20px !important;
    border-radius:5px !important;
    font-size:11.5px !important;
    line-height:34px !important;
    font-weight:850 !important;
  }

  body[data-page="league-view"] .league-round-tabs,
  body[data-page="league-view"] .league-round-tabs--page,
  body[data-page="league-view"] .league-mini-tabs {
    gap:8px !important;
  }
}

/* Group identity: every group gets its own subtle colour dot from --group-color. */
body[data-page="league-view"] .league-mini-tab::before,
body[data-page="league-view"] .league-mini-tab.active::before {
  content:'' !important;
  display:block !important;
  flex:0 0 7px !important;
  width:7px !important;
  height:7px !important;
  margin:0 7px 0 0 !important;
  border:0 !important;
  border-radius:50% !important;
  background:var(--group-color, #22c55e) !important;
  box-shadow:0 0 0 2px rgba(255,255,255,.75) !important;
  clip-path:none !important;
  transform:none !important;
}
body[data-page="league-view"] .league-mini-tab:not(.active)::before {
  box-shadow:0 0 0 2px #eef3f7 !important;
}

/* Manage League gets a distinct premium mint treatment. */
body[data-page="league-view"] .league-top-tab--manage {
  border-color:#9bd9cf !important;
  background:var(--tfp20-manage-soft) !important;
  color:var(--tfp20-manage) !important;
}
body[data-page="league-view"] .league-top-tab--manage:hover {
  border-color:#5ec2b4 !important;
  background:#def5f0 !important;
  color:#0b625b !important;
}
body[data-page="league-view"] .league-top-tab--manage.active {
  border-color:var(--tfp20-manage) !important;
  background:var(--tfp20-manage) !important;
  color:#fff !important;
}

/* Match filters: semantic colour without turning the toolbar into a rainbow. */
body[data-page="league-view"] #matches .league-match-status-tab[data-match-filter="all"] {
  border-color:#b8c8d6 !important;
  background:#fff !important;
  color:var(--tfp16-navy) !important;
}
body[data-page="league-view"] #matches .league-match-status-tab[data-match-filter="all"].active {
  border-color:var(--tfp16-navy) !important;
  background:var(--tfp16-navy) !important;
  color:#fff !important;
}

body[data-page="league-view"] #matches .league-match-status-tab[data-match-filter="played"] {
  border-color:#b8e5cf !important;
  background:var(--tfp20-green-soft) !important;
  color:var(--tfp20-green-dark) !important;
}
body[data-page="league-view"] #matches .league-match-status-tab[data-match-filter="played"]::before {
  content:'' !important;
  display:block !important;
  width:7px !important;
  height:7px !important;
  border-radius:50% !important;
  background:var(--tfp20-green) !important;
}
body[data-page="league-view"] #matches .league-match-status-tab[data-match-filter="played"].active {
  border-color:var(--tfp20-green) !important;
  background:var(--tfp20-green) !important;
  color:#fff !important;
}
body[data-page="league-view"] #matches .league-match-status-tab[data-match-filter="played"].active::before {
  background:#fff !important;
}

body[data-page="league-view"] #matches .league-match-status-tab[data-match-filter="pending"] {
  border-color:#ead8b2 !important;
  background:var(--tfp20-amber-soft) !important;
  color:var(--tfp20-amber-dark) !important;
}
body[data-page="league-view"] #matches .league-match-status-tab[data-match-filter="pending"]::before {
  content:'' !important;
  display:block !important;
  width:7px !important;
  height:7px !important;
  border-radius:50% !important;
  background:var(--tfp20-amber) !important;
}
body[data-page="league-view"] #matches .league-match-status-tab[data-match-filter="pending"].active {
  border-color:var(--tfp20-amber) !important;
  background:var(--tfp20-amber) !important;
  color:#fff !important;
}
body[data-page="league-view"] #matches .league-match-status-tab[data-match-filter="pending"].active::before {
  background:#fff !important;
}

body[data-page="league-view"] #matches .league-match-status-tab[data-match-filter="live"] {
  border-color:#ffc6cd !important;
  background:var(--tfp20-red-soft) !important;
  color:var(--tfp20-red-dark) !important;
}
body[data-page="league-view"] #matches .league-match-status-tab[data-match-filter="live"].active {
  border-color:var(--tfp20-red) !important;
  background:var(--tfp20-red) !important;
  color:#fff !important;
}
body[data-page="league-view"] #matches .league-match-status-tab[data-match-filter="live"] .tfp-live-filter-dot {
  display:block !important;
  width:7px !important;
  height:7px !important;
  border-radius:50% !important;
  background:var(--tfp20-red) !important;
  box-shadow:0 0 0 3px rgba(220,53,69,.1) !important;
}
body[data-page="league-view"] #matches .league-match-status-tab[data-match-filter="live"].active .tfp-live-filter-dot {
  background:#fff !important;
  box-shadow:none !important;
}

/* Preserve readable filter counters inside their coloured states. */
body[data-page="league-view"] #matches .league-match-status-tab[data-match-filter="played"] span {
  border-color:#b8e5cf !important;
  background:#fff !important;
  color:var(--tfp20-green-dark) !important;
}
body[data-page="league-view"] #matches .league-match-status-tab[data-match-filter="pending"] span {
  border-color:#ead8b2 !important;
  background:#fff !important;
  color:var(--tfp20-amber-dark) !important;
}
body[data-page="league-view"] #matches .league-match-status-tab[data-match-filter="live"] span:not(.tfp-live-filter-dot) {
  border-color:#ffc6cd !important;
  background:#fff !important;
  color:var(--tfp20-red-dark) !important;
}
body[data-page="league-view"] #matches .league-match-status-tab.active span:not(.tfp-live-filter-dot) {
  border-color:rgba(255,255,255,.32) !important;
  background:rgba(255,255,255,.14) !important;
  color:#fff !important;
}

/* Status badges inside match cards: subtle, semantic. */
body[data-page="league-view"] #matches .league-badge.ok {
  border-color:#b8e5cf !important;
  background:var(--tfp20-green-soft) !important;
  color:var(--tfp20-green-dark) !important;
}
body[data-page="league-view"] #matches .league-badge.pending {
  border-color:#ead8b2 !important;
  background:var(--tfp20-amber-soft) !important;
  color:var(--tfp20-amber-dark) !important;
}

/* Referee / Coach: slightly larger and gently coloured. */
body[data-page="league-view"] #matches .league-panel-link--referee {
  min-height:23px !important;
  height:23px !important;
  padding:0 8px !important;
  border-color:#a9dfe8 !important;
  background:var(--tfp20-cyan-soft) !important;
  color:#08758d !important;
  font-size:8px !important;
  line-height:21px !important;
  font-weight:850 !important;
}
body[data-page="league-view"] #matches .league-panel-link--coach {
  min-height:23px !important;
  height:23px !important;
  padding:0 8px !important;
  border-color:#f0d29b !important;
  background:var(--tfp20-coach-soft) !important;
  color:#ad6200 !important;
  font-size:8px !important;
  line-height:21px !important;
  font-weight:850 !important;
}

/* Action buttons: green save, red cancel, navy edit. */
body[data-page="league-view"] #matches .league-match-form button[type="submit"]:not(.league-cancel-btn),
body[data-page="league-view"] #matches .league-match-save,
body[data-page="league-view"] #matches .league-save-btn {
  border-color:var(--tfp20-green-dark) !important;
  background:var(--tfp20-green) !important;
  background-image:none !important;
  color:#fff !important;
  box-shadow:0 5px 12px rgba(15,159,103,.12) !important;
}
body[data-page="league-view"] #matches .league-match-form button[type="submit"]:not(.league-cancel-btn):hover,
body[data-page="league-view"] #matches .league-match-save:hover,
body[data-page="league-view"] #matches .league-save-btn:hover {
  border-color:var(--tfp20-green-dark) !important;
  background:var(--tfp20-green-dark) !important;
  transform:translateY(-1px) !important;
}
body[data-page="league-view"] #matches .league-cancel-btn,
body[data-page="league-view"] #matches .league-cancel-btn--compact {
  border:1px solid #f1a8b0 !important;
  border-radius:4px !important;
  background:var(--tfp20-red-soft) !important;
  background-image:none !important;
  color:var(--tfp20-red) !important;
  box-shadow:none !important;
  font-weight:850 !important;
}
body[data-page="league-view"] #matches .league-cancel-btn:hover,
body[data-page="league-view"] #matches .league-cancel-btn--compact:hover {
  border-color:var(--tfp20-red) !important;
  background:var(--tfp20-red) !important;
  color:#fff !important;
}
body[data-page="league-view"] #matches .league-edit-result-btn {
  border:1px solid #c6d5e2 !important;
  border-radius:4px !important;
  background:#eef4f8 !important;
  color:var(--tfp16-navy) !important;
  box-shadow:none !important;
  font-weight:850 !important;
}

/* Small premium lift, without decorative stripes or gradients. */
body[data-page="league-view"] #matches .league-match-card {
  transition:border-color .15s ease, box-shadow .15s ease, transform .15s ease !important;
}
body[data-page="league-view"] #matches .league-match-card:hover {
  border-color:#b8c8d6 !important;
  box-shadow:0 7px 18px rgba(8,47,73,.06) !important;
  transform:translateY(-1px) !important;
}

/* Mobile: keep the same colour system but protect the one-line top row. */
@media (max-width:700px) {
  body[data-page="league-view"] #matches .league-match-panel-links .league-panel-link--referee,
  body[data-page="league-view"] #matches .league-match-panel-links .league-panel-link--coach {
    width:auto !important;
    min-width:0 !important;
    height:18px !important;
    min-height:18px !important;
    padding:0 4px !important;
    border-radius:3px !important;
    font-size:6.4px !important;
    line-height:16px !important;
  }
}

/* =========================================================
   v21 — DESKTOP NAV + LEAGUE IDENTITY POLISH
   Larger centered desktop navigation and a stronger league title/logo area.
   Mobile stays compact. No layout/business-logic changes.
   ========================================================= */
@media (min-width:901px) {
  /* Give the league identity a little more breathing room. */
  body[data-page="league-view"] .league-table-page-head {
    margin:0 0 12px !important;
    padding-top:4px !important;
  }

  body[data-page="league-view"] .league-table-page-head__top {
    grid-template-columns:minmax(0,1.2fr) 68px minmax(260px,.8fr) !important;
    grid-template-areas:"title logo summary" !important;
    min-height:68px !important;
    gap:18px !important;
    margin-bottom:12px !important;
  }

  /* No logo? Do not reserve a dead middle column. */
  body[data-page="league-view"] .league-table-page-head__top:not(:has(.league-table-page-logo)) {
    grid-template-columns:minmax(0,1fr) auto !important;
    grid-template-areas:"title summary" !important;
  }

  body[data-page="league-view"] .league-table-page-head__title {
    min-width:0 !important;
    padding-right:10px !important;
  }

  body[data-page="league-view"] .league-table-page-head h1 {
    margin:0 !important;
    max-width:100% !important;
    font-size:clamp(30px,2.25vw,37px) !important;
    line-height:1.02 !important;
    font-weight:900 !important;
    letter-spacing:-.035em !important;
    color:#071d35 !important;
  }

  body[data-page="league-view"] .league-table-page-logo {
    width:62px !important;
    height:62px !important;
    border-radius:12px !important;
    border:1px solid #cbd8e5 !important;
    background:#fff !important;
    box-shadow:0 8px 22px rgba(8,47,73,.08) !important;
  }

  body[data-page="league-view"] .league-table-page-logo img {
    width:46px !important;
    height:46px !important;
    object-fit:contain !important;
  }

  body[data-page="league-view"] .league-round-summary-card--top {
    min-width:255px !important;
    padding:12px 15px !important;
    border-radius:7px !important;
    border:1px solid #d6e0e9 !important;
    background:#fff !important;
    box-shadow:0 7px 18px rgba(8,47,73,.055) !important;
  }

  body[data-page="league-view"] .league-round-summary-card--top strong {
    font-size:12.5px !important;
  }

  body[data-page="league-view"] .league-round-summary-card--top .league-round-meta {
    font-size:10.5px !important;
  }

  /* Rounds: a little larger, still crisp rectangles. */
  body[data-page="league-view"] .league-round-tab,
  body[data-page="league-view"] .league-round-tabs--page .league-round-tab,
  body[data-page="league-view"] #table .league-round-tab,
  body[data-page="league-view"] #matches .league-round-tab,
  body[data-page="league-view"] #results .league-round-tab {
    min-height:39px !important;
    height:39px !important;
    padding:0 23px !important;
    border-radius:5px !important;
    font-size:12px !important;
    line-height:37px !important;
    font-weight:850 !important;
  }

  body[data-page="league-view"] .league-round-tabs,
  body[data-page="league-view"] .league-round-tabs--page {
    gap:9px !important;
    margin-bottom:12px !important;
  }

  /* Main league navigation: larger and visually centered on desktop. */
  body[data-page="league-view"] .league-top-tabs {
    justify-content:center !important;
    align-items:center !important;
    gap:7px !important;
    min-height:50px !important;
    padding:5px 8px !important;
    margin:7px 0 15px !important;
    border-radius:5px !important;
    border:1px solid #d8e2ec !important;
    background:#fff !important;
    box-shadow:0 5px 14px rgba(8,47,73,.035) !important;
  }

  body[data-page="league-view"] .league-top-tab {
    min-height:39px !important;
    height:39px !important;
    padding:0 18px !important;
    border-radius:5px !important;
    font-size:10.75px !important;
    line-height:37px !important;
    font-weight:800 !important;
  }

  body[data-page="league-view"] .league-top-tab--manage {
    padding-left:20px !important;
    padding-right:20px !important;
    border-color:#8fd3c8 !important;
    background:#e8f7f4 !important;
    color:#0b7068 !important;
    box-shadow:inset 0 0 0 1px rgba(15,118,110,.035) !important;
  }

  body[data-page="league-view"] .league-top-tab--manage:hover {
    border-color:#4fb7a7 !important;
    background:#dcf3ee !important;
  }

  body[data-page="league-view"] .league-top-tab--manage.active {
    border-color:#0f766e !important;
    background:#0f766e !important;
    color:#fff !important;
  }

  body[data-page="league-view"] .league-top-tab--owner {
    padding-left:18px !important;
    padding-right:18px !important;
  }

  /* Groups: match the visual weight of the larger rounds. */
  body[data-page="league-view"] .league-mini-tab,
  body[data-page="league-view"] #table .league-mini-tab,
  body[data-page="league-view"] #matches .league-mini-tabs[data-group-tabs="matches"] .league-mini-tab,
  body[data-page="league-view"] #results .league-mini-tab {
    min-height:38px !important;
    height:38px !important;
    padding:0 21px !important;
    border-radius:5px !important;
    font-size:11.5px !important;
    line-height:36px !important;
    font-weight:850 !important;
  }

  body[data-page="league-view"] .league-mini-tabs {
    gap:8px !important;
  }
}

/* ===== V23: MAIN NAV LEFT ===== */
@media (min-width: 769px) {
  body[data-page="league-view"] .league-top-tabs {
    justify-content:flex-start !important;
  }
}


/* ===== TOURNAMENT PARITY: exact league visual language ===== */
/* TennisFinalsPro League — V16 FINAL TABLE LANGUAGE
   Loaded LAST. Purpose: make every league view use the same visual language as Table.
   No layout/business logic changes. */

body[data-page="tournament-view"] .tournament-page {
  --tfp16-navy:#082f49;
  --tfp16-navy-2:#0b3a59;
  --tfp16-blue:#1477d4;
  --tfp16-text:#10233d;
  --tfp16-muted:#66788c;
  --tfp16-line:#d7e1eb;
  --tfp16-soft:#f5f8fb;
  --tfp16-white:#fff;
}

/* ===== PAGE ===== */
body[data-page="tournament-view"] .tournament-page,
body[data-page="tournament-view"] .tournament-page .league-shell,
body[data-page="tournament-view"] .tournament-page .league-panels {
  background-image:none !important;
}
body[data-page="tournament-view"] .tournament-page { background:#f7f9fc !important; }
body[data-page="tournament-view"] .tournament-page .league-shell { background:transparent !important; }

/* ===== NO DECORATIVE UNDERLINES / TRIANGLES / GLOWS ON NAV ===== */
body[data-page="tournament-view"] .tournament-page .league-top-tab::before,
body[data-page="tournament-view"] .tournament-page .league-top-tab::after,
body[data-page="tournament-view"] .tournament-page .league-round-tab::before,
body[data-page="tournament-view"] .tournament-page .league-round-tab::after,
body[data-page="tournament-view"] .tournament-page .league-match-status-tab::before,
body[data-page="tournament-view"] .tournament-page .league-match-status-tab::after,
body[data-page="tournament-view"] .tournament-page .tfp-manager-tab::before,
body[data-page="tournament-view"] .tournament-page .tfp-manager-tab::after {
  content:none !important;
  display:none !important;
  border:0 !important;
  box-shadow:none !important;
}

/* ===== MAIN TABS ===== */
body[data-page="tournament-view"] .tournament-page .league-top-tabs {
  display:flex !important;
  align-items:center !important;
  gap:4px !important;
  min-height:38px !important;
  margin:6px 0 12px !important;
  padding:3px !important;
  border:1px solid var(--tfp16-line) !important;
  border-radius:3px !important;
  background:#fff !important;
  background-image:none !important;
  box-shadow:none !important;
  overflow-x:auto !important;
  overflow-y:hidden !important;
  scrollbar-width:none !important;
}
body[data-page="tournament-view"] .tournament-page .league-top-tabs::-webkit-scrollbar { display:none !important; }
body[data-page="tournament-view"] .tournament-page .league-top-tab {
  flex:0 0 auto !important;
  min-width:0 !important;
  min-height:31px !important;
  height:31px !important;
  padding:0 13px !important;
  margin:0 !important;
  border:1px solid transparent !important;
  border-radius:3px !important;
  background:#fff !important;
  background-image:none !important;
  color:#263e56 !important;
  box-shadow:none !important;
  clip-path:none !important;
  transform:none !important;
  font-size:9px !important;
  line-height:29px !important;
  font-weight:750 !important;
  letter-spacing:0 !important;
  text-decoration:none !important;
  white-space:nowrap !important;
}
body[data-page="tournament-view"] .tournament-page .league-top-tab:hover {
  border-color:#bdcad6 !important;
  background:#f6f8fa !important;
  color:var(--tfp16-navy) !important;
}
body[data-page="tournament-view"] .tournament-page .league-top-tab.active {
  border-color:var(--tfp16-navy) !important;
  background:var(--tfp16-navy) !important;
  background-image:none !important;
  color:#fff !important;
  box-shadow:none !important;
}
body[data-page="tournament-view"] .tournament-page .league-top-tab--manage {
  border-color:#cbd7e2 !important;
  background:#fff !important;
  color:var(--tfp16-navy) !important;
}
body[data-page="tournament-view"] .tournament-page .league-top-tab--manage.active {
  border-color:var(--tfp16-navy) !important;
  background:var(--tfp16-navy) !important;
  color:#fff !important;
}
body[data-page="tournament-view"] .tournament-page .league-top-tab--owner {
  border-color:#e7d3ad !important;
  background:#fffaf1 !important;
  color:#89520a !important;
}

/* ===== ROUNDS — RECTANGLES, NO WHITE PILL BAR ===== */
body[data-page="tournament-view"] .tournament-page .league-round-tabs,
body[data-page="tournament-view"] .tournament-page .league-round-tabs--page,
body[data-page="tournament-view"] .tournament-page #table .league-round-tabs,
body[data-page="tournament-view"] .tournament-page #matches .league-round-tabs,
body[data-page="tournament-view"] .tournament-page #results .league-round-tabs {
  display:flex !important;
  flex-wrap:nowrap !important;
  align-items:center !important;
  gap:6px !important;
  width:auto !important;
  min-height:0 !important;
  margin:8px 0 11px !important;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  background-image:none !important;
  box-shadow:none !important;
  overflow-x:auto !important;
  overflow-y:hidden !important;
  scrollbar-width:none !important;
}
body[data-page="tournament-view"] .tournament-page .league-round-tabs::-webkit-scrollbar,
body[data-page="tournament-view"] .tournament-page .league-round-tabs--page::-webkit-scrollbar { display:none !important; }
body[data-page="tournament-view"] .tournament-page .league-round-tab,
body[data-page="tournament-view"] .tournament-page .league-round-tabs--page .league-round-tab,
body[data-page="tournament-view"] .tournament-page #table .league-round-tab,
body[data-page="tournament-view"] .tournament-page #matches .league-round-tab,
body[data-page="tournament-view"] .tournament-page #results .league-round-tab {
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  flex:0 0 auto !important;
  min-width:0 !important;
  min-height:30px !important;
  height:30px !important;
  margin:0 !important;
  padding:0 13px !important;
  border:1px solid #cbd7e2 !important;
  border-radius:3px !important;
  background:#fff !important;
  background-image:none !important;
  color:#29435d !important;
  box-shadow:none !important;
  clip-path:none !important;
  transform:none !important;
  font-size:9.5px !important;
  line-height:28px !important;
  font-weight:800 !important;
  text-decoration:none !important;
  white-space:nowrap !important;
}
body[data-page="tournament-view"] .tournament-page .league-round-tab.active,
body[data-page="tournament-view"] .tournament-page .league-round-tabs--page .league-round-tab.active,
body[data-page="tournament-view"] .tournament-page #table .league-round-tab.active,
body[data-page="tournament-view"] .tournament-page #matches .league-round-tab.active,
body[data-page="tournament-view"] .tournament-page #results .league-round-tab.active {
  border-color:var(--tfp16-navy) !important;
  background:var(--tfp16-navy) !important;
  background-image:none !important;
  color:#fff !important;
  box-shadow:none !important;
}

/* ===== GROUPS — EXACT SAME LANGUAGE AS ROUNDS ===== */
body[data-page="tournament-view"] .tournament-page .league-mini-tabs,
body[data-page="tournament-view"] .tournament-page #table .league-mini-tabs[data-group-tabs="table"],
body[data-page="tournament-view"] .tournament-page #matches .league-mini-tabs[data-group-tabs="matches"],
body[data-page="tournament-view"] .tournament-page #results .league-mini-tabs[data-group-tabs="results"] {
  display:flex !important;
  flex-wrap:nowrap !important;
  align-items:center !important;
  gap:6px !important;
  width:auto !important;
  min-height:0 !important;
  margin:8px 0 11px !important;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  background-image:none !important;
  box-shadow:none !important;
  overflow-x:auto !important;
  overflow-y:hidden !important;
  scrollbar-width:none !important;
}
body[data-page="tournament-view"] .tournament-page .league-mini-tabs::-webkit-scrollbar { display:none !important; }
body[data-page="tournament-view"] .tournament-page .league-mini-tab,
body[data-page="tournament-view"] .tournament-page #table .league-mini-tab,
body[data-page="tournament-view"] .tournament-page #matches .league-mini-tabs[data-group-tabs="matches"] .league-mini-tab,
body[data-page="tournament-view"] .tournament-page #results .league-mini-tab {
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  flex:0 0 auto !important;
  min-width:0 !important;
  min-height:30px !important;
  height:30px !important;
  margin:0 !important;
  padding:0 13px !important;
  border:1px solid #cbd7e2 !important;
  border-radius:3px !important;
  background:#fff !important;
  background-image:none !important;
  color:#29435d !important;
  box-shadow:none !important;
  clip-path:none !important;
  transform:none !important;
  font-size:9.5px !important;
  line-height:28px !important;
  font-weight:800 !important;
  text-decoration:none !important;
  white-space:nowrap !important;
}
body[data-page="tournament-view"] .tournament-page .league-mini-tab::after { content:none !important; display:none !important; }
body[data-page="tournament-view"] .tournament-page .league-mini-tab.active,
body[data-page="tournament-view"] .tournament-page #table .league-mini-tab.active,
body[data-page="tournament-view"] .tournament-page #matches .league-mini-tabs[data-group-tabs="matches"] .league-mini-tab.active,
body[data-page="tournament-view"] .tournament-page #results .league-mini-tab.active {
  border-color:var(--tfp16-navy) !important;
  background:var(--tfp16-navy) !important;
  background-image:none !important;
  color:#fff !important;
  box-shadow:none !important;
}
/* Keep only the tiny table-language status dot on active group, never a triangle/underline. */
body[data-page="tournament-view"] .tournament-page .league-mini-tab.active::before {
  content:'' !important;
  display:block !important;
  flex:0 0 5px !important;
  width:5px !important;
  height:5px !important;
  margin:0 5px 0 0 !important;
  border:0 !important;
  border-radius:50% !important;
  background:#b7ef35 !important;
  box-shadow:none !important;
  clip-path:none !important;
  transform:none !important;
}

/* ===== MATCH FILTERS — SAME STYLE, NO GREEN/ORANGE PILL STATES ===== */
body[data-page="tournament-view"] .tournament-page #matches .league-match-status-tabs,
body[data-page="tournament-view"] .tournament-page .league-match-status-tabs {
  display:flex !important;
  flex-wrap:nowrap !important;
  align-items:center !important;
  gap:5px !important;
  min-height:0 !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  overflow-x:auto !important;
  scrollbar-width:none !important;
}
body[data-page="tournament-view"] .tournament-page .league-match-status-tabs::-webkit-scrollbar { display:none !important; }
body[data-page="tournament-view"] .tournament-page #matches .league-match-status-tab,
body[data-page="tournament-view"] .tournament-page .league-match-status-tab {
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:5px !important;
  flex:0 0 auto !important;
  min-height:28px !important;
  height:28px !important;
  padding:0 9px !important;
  border:1px solid #cbd7e2 !important;
  border-radius:3px !important;
  background:#fff !important;
  background-image:none !important;
  color:#29435d !important;
  box-shadow:none !important;
  transform:none !important;
  font-size:8.5px !important;
  line-height:26px !important;
  font-weight:800 !important;
  white-space:nowrap !important;
}
body[data-page="tournament-view"] .tournament-page #matches .league-match-status-tab.active,
body[data-page="tournament-view"] .tournament-page #matches .league-match-status-tab[data-match-filter="played"].active,
body[data-page="tournament-view"] .tournament-page #matches .league-match-status-tab[data-match-filter="pending"].active,
body[data-page="tournament-view"] .tournament-page .league-match-status-tab.active {
  border-color:var(--tfp16-navy) !important;
  background:var(--tfp16-navy) !important;
  background-image:none !important;
  color:#fff !important;
  box-shadow:none !important;
}
body[data-page="tournament-view"] .tournament-page .league-match-status-tab span {
  min-width:18px !important;
  height:18px !important;
  padding:0 4px !important;
  border:1px solid #d5e0ea !important;
  border-radius:3px !important;
  background:#f3f6f9 !important;
  color:#35526e !important;
  line-height:16px !important;
  box-shadow:none !important;
}
body[data-page="tournament-view"] .tournament-page .league-match-status-tab.active span {
  border-color:rgba(255,255,255,.35) !important;
  background:rgba(255,255,255,.12) !important;
  color:#fff !important;
}
body[data-page="tournament-view"] .tournament-page .tfp-live-filter-dot { display:none !important; }

/* ===== MATCH TOOLBAR / SEARCH ===== */
body[data-page="tournament-view"] .tournament-page #matches .league-matches-toolbar {
  display:grid !important;
  grid-template-columns:minmax(0,1fr) 235px !important;
  align-items:end !important;
  gap:12px !important;
  margin:0 0 10px !important;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}
body[data-page="tournament-view"] .tournament-page #matches .league-matches-toolbar__filters {
  display:grid !important;
  gap:7px !important;
  min-width:0 !important;
}
body[data-page="tournament-view"] .tournament-page #matches .league-search-box {
  width:235px !important;
  max-width:100% !important;
  margin:0 !important;
  align-self:end !important;
}
body[data-page="tournament-view"] .tournament-page #matches .league-search-box input,
body[data-page="tournament-view"] .tournament-page #matches input[type="text"],
body[data-page="tournament-view"] .tournament-page #matches input[type="number"],
body[data-page="tournament-view"] .tournament-page #matches select,
body[data-page="tournament-view"] .tournament-page #manage input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
body[data-page="tournament-view"] .tournament-page #manage select,
body[data-page="tournament-view"] .tournament-page #manage textarea {
  border:1.5px solid var(--tfp16-navy) !important;
  border-radius:4px !important;
  background:#fff !important;
  background-image:none !important;
  color:var(--tfp16-text) !important;
  box-shadow:none !important;
  outline:none !important;
}
body[data-page="tournament-view"] .tournament-page #matches .league-search-box input {
  width:100% !important;
  height:36px !important;
  min-height:36px !important;
  padding:0 11px !important;
  font-size:10px !important;
  font-weight:700 !important;
}
body[data-page="tournament-view"] .tournament-page #matches .league-search-box input:focus,
body[data-page="tournament-view"] .tournament-page #matches input[type="text"]:focus,
body[data-page="tournament-view"] .tournament-page #matches input[type="number"]:focus,
body[data-page="tournament-view"] .tournament-page #matches select:focus,
body[data-page="tournament-view"] .tournament-page #manage input:focus,
body[data-page="tournament-view"] .tournament-page #manage select:focus,
body[data-page="tournament-view"] .tournament-page #manage textarea:focus {
  border-color:var(--tfp16-blue) !important;
  box-shadow:0 0 0 2px rgba(20,119,212,.12) !important;
}

/* ===== GROUP HEADERS / TABLES — RECTANGULAR, NO WHITE CORNERS ===== */
body[data-page="tournament-view"] .tournament-page .league-standings-card,
body[data-page="tournament-view"] .tournament-page .league-table-card,
body[data-page="tournament-view"] .tournament-page .league-results-card,
body[data-page="tournament-view"] .tournament-page #matches .league-card {
  border:1px solid var(--tfp16-line) !important;
  border-radius:0 !important;
  background:#fff !important;
  background-image:none !important;
  box-shadow:none !important;
  overflow:hidden !important;
}
body[data-page="tournament-view"] .tournament-page .league-standings-card::before,
body[data-page="tournament-view"] .tournament-page .league-standings-card::after,
body[data-page="tournament-view"] .tournament-page .league-table-card::before,
body[data-page="tournament-view"] .tournament-page .league-table-card::after,
body[data-page="tournament-view"] .tournament-page #matches .league-card::before,
body[data-page="tournament-view"] .tournament-page #matches .league-card::after {
  content:none !important;
  display:none !important;
}
body[data-page="tournament-view"] .tournament-page .league-standings-card__head,
body[data-page="tournament-view"] .tournament-page .league-card__head,
body[data-page="tournament-view"] .tournament-page #matches .league-card__head,
body[data-page="tournament-view"] .tournament-page .league-results-card__head {
  border:0 !important;
  border-radius:0 !important;
  background:var(--tfp16-navy) !important;
  background-image:none !important;
  color:#fff !important;
  box-shadow:none !important;
}
body[data-page="tournament-view"] .tournament-page .league-standings-card__head h3,
body[data-page="tournament-view"] .tournament-page .league-card__head h3,
body[data-page="tournament-view"] .tournament-page #matches .league-card__head h3,
body[data-page="tournament-view"] .tournament-page .league-results-card__head h3,
body[data-page="tournament-view"] .tournament-page .league-standings-card__head span,
body[data-page="tournament-view"] .tournament-page .league-card__head span {
  color:#fff !important;
}
body[data-page="tournament-view"] .tournament-page .league-standings-card__head > span {
  min-height:30px !important;
  padding:0 12px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !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;
  box-shadow:none !important;
}
body[data-page="tournament-view"] .tournament-page .league-standings-card__head > span a {
  color:inherit !important;
  text-decoration:none !important;
}
body[data-page="tournament-view"] .tournament-page .league-table-wrap,
body[data-page="tournament-view"] .tournament-page .league-results-scroll,
body[data-page="tournament-view"] .tournament-page table.league-table,
body[data-page="tournament-view"] .tournament-page .league-standings-table,
body[data-page="tournament-view"] .tournament-page .league-results-matrix,
body[data-page="tournament-view"] .tournament-page table.league-table thead,
body[data-page="tournament-view"] .tournament-page table.league-table thead tr,
body[data-page="tournament-view"] .tournament-page table.league-table thead th,
body[data-page="tournament-view"] .tournament-page .league-standings-table thead,
body[data-page="tournament-view"] .tournament-page .league-standings-table thead tr,
body[data-page="tournament-view"] .tournament-page .league-standings-table thead th {
  border-radius:0 !important;
  clip-path:none !important;
  mask:none !important;
}
body[data-page="tournament-view"] .tournament-page .league-table thead th,
body[data-page="tournament-view"] .tournament-page .league-standings-table thead th,
body[data-page="tournament-view"] .tournament-page .league-results-matrix thead th {
  background:var(--tfp16-navy) !important;
  background-image:none !important;
  color:#fff !important;
}

/* ===== MATCH CARDS — CALM, TABLE-LIKE ===== */
body[data-page="tournament-view"] .tournament-page #matches .league-matches-grid {
  gap:10px !important;
  padding:10px !important;
  background:#fff !important;
}
body[data-page="tournament-view"] .tournament-page #matches .league-match-card,
body[data-page="tournament-view"] .tournament-page #matches .league-match-card.is-played {
  border:1px solid #d6e0e9 !important;
  border-top:1px solid #d6e0e9 !important;
  border-radius:4px !important;
  background:#fff !important;
  background-image:none !important;
  box-shadow:none !important;
  overflow:hidden !important;
}
body[data-page="tournament-view"] .tournament-page #matches .league-match-card::before,
body[data-page="tournament-view"] .tournament-page #matches .league-match-card::after {
  content:none !important;
  display:none !important;
}
body[data-page="tournament-view"] .tournament-page #matches .league-match-top {
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:6px !important;
  flex-wrap:nowrap !important;
}
body[data-page="tournament-view"] .tournament-page #matches .league-match-badges,
body[data-page="tournament-view"] .tournament-page #matches .league-match-panel-links {
  display:flex !important;
  align-items:center !important;
  gap:4px !important;
  flex-wrap:nowrap !important;
  min-width:0 !important;
}
body[data-page="tournament-view"] .tournament-page #matches .league-match-score:empty { display:none !important; }
body[data-page="tournament-view"] .tournament-page #matches .league-badge,
body[data-page="tournament-view"] .tournament-page #matches .league-badge.ok,
body[data-page="tournament-view"] .tournament-page #matches .league-badge.pending,
body[data-page="tournament-view"] .tournament-page #matches .league-panel-link {
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:20px !important;
  height:20px !important;
  padding:0 6px !important;
  border:1px solid #cad6e1 !important;
  border-radius:3px !important;
  background:#f7f9fb !important;
  background-image:none !important;
  color:#29435d !important;
  box-shadow:none !important;
  font-size:7.5px !important;
  line-height:18px !important;
  font-weight:800 !important;
  text-decoration:none !important;
}
body[data-page="tournament-view"] .tournament-page #matches .league-panel-link--coach,
body[data-page="tournament-view"] .tournament-page #matches .league-panel-link--referee {
  border-color:#cad6e1 !important;
  background:#f7f9fb !important;
  color:#29435d !important;
}
body[data-page="tournament-view"] .tournament-page #matches .league-set-box input,
body[data-page="tournament-view"] .tournament-page #matches .league-set-inputs input {
  border:1.5px solid var(--tfp16-navy) !important;
  border-radius:4px !important;
  background:#fff !important;
  color:var(--tfp16-text) !important;
  box-shadow:none !important;
}
body[data-page="tournament-view"] .tournament-page #matches .league-match-form button[type="submit"],
body[data-page="tournament-view"] .tournament-page #matches .league-match-save,
body[data-page="tournament-view"] .tournament-page #matches .league-save-btn {
  border:1px solid var(--tfp16-navy) !important;
  border-radius:4px !important;
  background:var(--tfp16-navy) !important;
  background-image:none !important;
  color:#fff !important;
  box-shadow:none !important;
}

/* ===== STATS / INFO / GENERAL / MANAGER — SAME CARD LANGUAGE ===== */
body[data-page="tournament-view"] .tournament-page #stats [class*="card"],
body[data-page="tournament-view"] .tournament-page #info [class*="card"],
body[data-page="tournament-view"] .tournament-page #general [class*="card"],
body[data-page="tournament-view"] .tournament-page #manage [class*="card"],
body[data-page="tournament-view"] .tournament-page .tfp-manager__panel,
body[data-page="tournament-view"] .tournament-page .tfp-manager-panel {
  border-radius:4px !important;
  border-color:var(--tfp16-line) !important;
  background-image:none !important;
  box-shadow:none !important;
}
body[data-page="tournament-view"] .tournament-page .tfp-manager-tabs {
  display:flex !important;
  flex-wrap:nowrap !important;
  gap:4px !important;
  padding:3px !important;
  border:1px solid var(--tfp16-line) !important;
  border-radius:3px !important;
  background:#fff !important;
  box-shadow:none !important;
  overflow-x:auto !important;
  scrollbar-width:none !important;
}
body[data-page="tournament-view"] .tournament-page .tfp-manager-tabs::-webkit-scrollbar { display:none !important; }
body[data-page="tournament-view"] .tournament-page .tfp-manager-tab {
  min-height:29px !important;
  height:29px !important;
  padding:0 10px !important;
  border:1px solid transparent !important;
  border-radius:3px !important;
  background:#fff !important;
  color:#29435d !important;
  box-shadow:none !important;
  font-size:8.5px !important;
  line-height:27px !important;
  font-weight:800 !important;
  white-space:nowrap !important;
}
body[data-page="tournament-view"] .tournament-page .tfp-manager-tab.active {
  border-color:var(--tfp16-navy) !important;
  background:var(--tfp16-navy) !important;
  color:#fff !important;
}

/* ===== MOBILE — SAME DESIGN, NEVER PILLS ===== */
@media (max-width:700px) {
  body[data-page="tournament-view"] .tournament-page .league-shell {
    width:100% !important;
    padding-left:8px !important;
    padding-right:8px !important;
  }
  body[data-page="tournament-view"] .tournament-page .league-top-tabs,
  body[data-page="tournament-view"] .tournament-page .league-round-tabs,
  body[data-page="tournament-view"] .tournament-page .league-round-tabs--page,
  body[data-page="tournament-view"] .tournament-page .league-mini-tabs,
  body[data-page="tournament-view"] .tournament-page .league-match-status-tabs,
  body[data-page="tournament-view"] .tournament-page .tfp-manager-tabs {
    flex-wrap:nowrap !important;
    overflow-x:auto !important;
    border-radius:0 !important;
    -webkit-overflow-scrolling:touch !important;
  }
  body[data-page="tournament-view"] .tournament-page .league-top-tab {
    min-height:30px !important;
    height:30px !important;
    padding:0 9px !important;
    border-radius:3px !important;
    font-size:8px !important;
  }
  body[data-page="tournament-view"] .tournament-page .league-round-tab,
  body[data-page="tournament-view"] .tournament-page .league-round-tabs--page .league-round-tab,
  body[data-page="tournament-view"] .tournament-page .league-mini-tab,
  body[data-page="tournament-view"] .tournament-page #table .league-mini-tab,
  body[data-page="tournament-view"] .tournament-page #matches .league-mini-tabs[data-group-tabs="matches"] .league-mini-tab,
  body[data-page="tournament-view"] .tournament-page #results .league-mini-tab {
    min-height:25px !important;
    height:25px !important;
    padding:0 8px !important;
    border-radius:3px !important;
    font-size:7.8px !important;
    line-height:23px !important;
  }
  body[data-page="tournament-view"] .tournament-page #matches .league-match-status-tab {
    min-height:27px !important;
    height:27px !important;
    padding:0 8px !important;
    border-radius:3px !important;
    font-size:7.8px !important;
  }
  body[data-page="tournament-view"] .tournament-page #matches .league-matches-toolbar {
    grid-template-columns:1fr !important;
    gap:7px !important;
  }
  body[data-page="tournament-view"] .tournament-page #matches .league-search-box {
    width:100% !important;
  }
  body[data-page="tournament-view"] .tournament-page #matches .league-search-box input {
    height:34px !important;
    min-height:34px !important;
    border-radius:4px !important;
  }
  body[data-page="tournament-view"] .tournament-page #matches .league-match-top {
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:4px !important;
    flex-wrap:nowrap !important;
  }
  body[data-page="tournament-view"] .tournament-page #matches .league-match-badges,
  body[data-page="tournament-view"] .tournament-page #matches .league-match-panel-links {
    flex-wrap:nowrap !important;
    gap:3px !important;
  }
  body[data-page="tournament-view"] .tournament-page #matches .league-badge,
  body[data-page="tournament-view"] .tournament-page #matches .league-panel-link {
    height:19px !important;
    min-height:19px !important;
    padding:0 4px !important;
    border-radius:3px !important;
    font-size:6.8px !important;
    line-height:17px !important;
  }
  body[data-page="tournament-view"] .tournament-page #matches .league-set-box input,
  body[data-page="tournament-view"] .tournament-page #matches .league-set-inputs input {
    border-radius:4px !important;
  }
}

/* =========================================================
   v19 — MOBILE MATCH TOP ROW FIX
   Runda/status + Sędzia/Trener w jednej linii bez nachodzenia.
   ========================================================= */
@media (max-width:700px) {
  body[data-page="tournament-view"] .tournament-page #matches .league-match-top {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto !important;
    align-items:center !important;
    gap:3px !important;
    width:100% !important;
    min-width:0 !important;
  }

  body[data-page="tournament-view"] .tournament-page #matches .league-match-badges {
    display:flex !important;
    align-items:center !important;
    gap:2px !important;
    min-width:0 !important;
    overflow:hidden !important;
    flex-wrap:nowrap !important;
  }

  body[data-page="tournament-view"] .tournament-page #matches .league-match-panel-links {
    display:flex !important;
    align-items:center !important;
    justify-content:flex-end !important;
    gap:2px !important;
    width:auto !important;
    min-width:0 !important;
    margin-left:0 !important;
    flex:0 0 auto !important;
    flex-wrap:nowrap !important;
  }

  body[data-page="tournament-view"] .tournament-page #matches .league-match-panel-links .league-panel-link {
    width:auto !important;
    min-width:0 !important;
    max-width:none !important;
    height:17px !important;
    min-height:17px !important;
    padding:0 3px !important;
    border-radius:2px !important;
    font-size:6px !important;
    line-height:15px !important;
    letter-spacing:0 !important;
    white-space:nowrap !important;
    flex:0 0 auto !important;
  }

  body[data-page="tournament-view"] .tournament-page #matches .league-match-badges .league-badge {
    width:auto !important;
    min-width:0 !important;
    height:17px !important;
    min-height:17px !important;
    padding:0 3px !important;
    border-radius:2px !important;
    font-size:6px !important;
    line-height:15px !important;
    white-space:nowrap !important;
    flex:0 1 auto !important;
  }
}

/* =========================================================
   v20 — PREMIUM LIFE TUNING
   Keep the strict Table language, add controlled sport-status colour.
   No business/layout changes.
   ========================================================= */

body[data-page="tournament-view"] .tournament-page {
  --tfp20-green:#0f9f67;
  --tfp20-green-dark:#08764b;
  --tfp20-green-soft:#eaf8f1;
  --tfp20-red:#dc3545;
  --tfp20-red-dark:#b42333;
  --tfp20-red-soft:#fff0f2;
  --tfp20-amber:#e59616;
  --tfp20-amber-dark:#aa6500;
  --tfp20-amber-soft:#fff7e6;
  --tfp20-cyan:#0891b2;
  --tfp20-cyan-soft:#e8f8fb;
  --tfp20-coach:#d97706;
  --tfp20-coach-soft:#fff4df;
  --tfp20-manage:#0f766e;
  --tfp20-manage-soft:#e9f8f5;
}

/* Desktop: rounds/groups should have presence, but remain rectangular. */
@media (min-width:701px) {
  body[data-page="tournament-view"] .tournament-page .league-round-tab,
  body[data-page="tournament-view"] .tournament-page .league-round-tabs--page .league-round-tab,
  body[data-page="tournament-view"] .tournament-page #table .league-round-tab,
  body[data-page="tournament-view"] .tournament-page #matches .league-round-tab,
  body[data-page="tournament-view"] .tournament-page #results .league-round-tab {
    min-height:36px !important;
    height:36px !important;
    padding:0 20px !important;
    border-radius:5px !important;
    font-size:11.5px !important;
    line-height:34px !important;
    font-weight:850 !important;
  }

  body[data-page="tournament-view"] .tournament-page .league-mini-tab,
  body[data-page="tournament-view"] .tournament-page #table .league-mini-tab,
  body[data-page="tournament-view"] .tournament-page #matches .league-mini-tabs[data-group-tabs="matches"] .league-mini-tab,
  body[data-page="tournament-view"] .tournament-page #results .league-mini-tab {
    min-height:36px !important;
    height:36px !important;
    padding:0 20px !important;
    border-radius:5px !important;
    font-size:11.5px !important;
    line-height:34px !important;
    font-weight:850 !important;
  }

  body[data-page="tournament-view"] .tournament-page .league-round-tabs,
  body[data-page="tournament-view"] .tournament-page .league-round-tabs--page,
  body[data-page="tournament-view"] .tournament-page .league-mini-tabs {
    gap:8px !important;
  }
}

/* Group identity: every group gets its own subtle colour dot from --group-color. */
body[data-page="tournament-view"] .tournament-page .league-mini-tab::before,
body[data-page="tournament-view"] .tournament-page .league-mini-tab.active::before {
  content:'' !important;
  display:block !important;
  flex:0 0 7px !important;
  width:7px !important;
  height:7px !important;
  margin:0 7px 0 0 !important;
  border:0 !important;
  border-radius:50% !important;
  background:var(--group-color, #22c55e) !important;
  box-shadow:0 0 0 2px rgba(255,255,255,.75) !important;
  clip-path:none !important;
  transform:none !important;
}
body[data-page="tournament-view"] .tournament-page .league-mini-tab:not(.active)::before {
  box-shadow:0 0 0 2px #eef3f7 !important;
}

/* Manage League gets a distinct premium mint treatment. */
body[data-page="tournament-view"] .tournament-page .league-top-tab--manage {
  border-color:#9bd9cf !important;
  background:var(--tfp20-manage-soft) !important;
  color:var(--tfp20-manage) !important;
}
body[data-page="tournament-view"] .tournament-page .league-top-tab--manage:hover {
  border-color:#5ec2b4 !important;
  background:#def5f0 !important;
  color:#0b625b !important;
}
body[data-page="tournament-view"] .tournament-page .league-top-tab--manage.active {
  border-color:var(--tfp20-manage) !important;
  background:var(--tfp20-manage) !important;
  color:#fff !important;
}

/* Match filters: semantic colour without turning the toolbar into a rainbow. */
body[data-page="tournament-view"] .tournament-page #matches .league-match-status-tab[data-match-filter="all"] {
  border-color:#b8c8d6 !important;
  background:#fff !important;
  color:var(--tfp16-navy) !important;
}
body[data-page="tournament-view"] .tournament-page #matches .league-match-status-tab[data-match-filter="all"].active {
  border-color:var(--tfp16-navy) !important;
  background:var(--tfp16-navy) !important;
  color:#fff !important;
}

body[data-page="tournament-view"] .tournament-page #matches .league-match-status-tab[data-match-filter="played"] {
  border-color:#b8e5cf !important;
  background:var(--tfp20-green-soft) !important;
  color:var(--tfp20-green-dark) !important;
}
body[data-page="tournament-view"] .tournament-page #matches .league-match-status-tab[data-match-filter="played"]::before {
  content:'' !important;
  display:block !important;
  width:7px !important;
  height:7px !important;
  border-radius:50% !important;
  background:var(--tfp20-green) !important;
}
body[data-page="tournament-view"] .tournament-page #matches .league-match-status-tab[data-match-filter="played"].active {
  border-color:var(--tfp20-green) !important;
  background:var(--tfp20-green) !important;
  color:#fff !important;
}
body[data-page="tournament-view"] .tournament-page #matches .league-match-status-tab[data-match-filter="played"].active::before {
  background:#fff !important;
}

body[data-page="tournament-view"] .tournament-page #matches .league-match-status-tab[data-match-filter="pending"] {
  border-color:#ead8b2 !important;
  background:var(--tfp20-amber-soft) !important;
  color:var(--tfp20-amber-dark) !important;
}
body[data-page="tournament-view"] .tournament-page #matches .league-match-status-tab[data-match-filter="pending"]::before {
  content:'' !important;
  display:block !important;
  width:7px !important;
  height:7px !important;
  border-radius:50% !important;
  background:var(--tfp20-amber) !important;
}
body[data-page="tournament-view"] .tournament-page #matches .league-match-status-tab[data-match-filter="pending"].active {
  border-color:var(--tfp20-amber) !important;
  background:var(--tfp20-amber) !important;
  color:#fff !important;
}
body[data-page="tournament-view"] .tournament-page #matches .league-match-status-tab[data-match-filter="pending"].active::before {
  background:#fff !important;
}

body[data-page="tournament-view"] .tournament-page #matches .league-match-status-tab[data-match-filter="live"] {
  border-color:#ffc6cd !important;
  background:var(--tfp20-red-soft) !important;
  color:var(--tfp20-red-dark) !important;
}
body[data-page="tournament-view"] .tournament-page #matches .league-match-status-tab[data-match-filter="live"].active {
  border-color:var(--tfp20-red) !important;
  background:var(--tfp20-red) !important;
  color:#fff !important;
}
body[data-page="tournament-view"] .tournament-page #matches .league-match-status-tab[data-match-filter="live"] .tfp-live-filter-dot {
  display:block !important;
  width:7px !important;
  height:7px !important;
  border-radius:50% !important;
  background:var(--tfp20-red) !important;
  box-shadow:0 0 0 3px rgba(220,53,69,.1) !important;
}
body[data-page="tournament-view"] .tournament-page #matches .league-match-status-tab[data-match-filter="live"].active .tfp-live-filter-dot {
  background:#fff !important;
  box-shadow:none !important;
}

/* Preserve readable filter counters inside their coloured states. */
body[data-page="tournament-view"] .tournament-page #matches .league-match-status-tab[data-match-filter="played"] span {
  border-color:#b8e5cf !important;
  background:#fff !important;
  color:var(--tfp20-green-dark) !important;
}
body[data-page="tournament-view"] .tournament-page #matches .league-match-status-tab[data-match-filter="pending"] span {
  border-color:#ead8b2 !important;
  background:#fff !important;
  color:var(--tfp20-amber-dark) !important;
}
body[data-page="tournament-view"] .tournament-page #matches .league-match-status-tab[data-match-filter="live"] span:not(.tfp-live-filter-dot) {
  border-color:#ffc6cd !important;
  background:#fff !important;
  color:var(--tfp20-red-dark) !important;
}
body[data-page="tournament-view"] .tournament-page #matches .league-match-status-tab.active span:not(.tfp-live-filter-dot) {
  border-color:rgba(255,255,255,.32) !important;
  background:rgba(255,255,255,.14) !important;
  color:#fff !important;
}

/* Status badges inside match cards: subtle, semantic. */
body[data-page="tournament-view"] .tournament-page #matches .league-badge.ok {
  border-color:#b8e5cf !important;
  background:var(--tfp20-green-soft) !important;
  color:var(--tfp20-green-dark) !important;
}
body[data-page="tournament-view"] .tournament-page #matches .league-badge.pending {
  border-color:#ead8b2 !important;
  background:var(--tfp20-amber-soft) !important;
  color:var(--tfp20-amber-dark) !important;
}

/* Referee / Coach: slightly larger and gently coloured. */
body[data-page="tournament-view"] .tournament-page #matches .league-panel-link--referee {
  min-height:23px !important;
  height:23px !important;
  padding:0 8px !important;
  border-color:#a9dfe8 !important;
  background:var(--tfp20-cyan-soft) !important;
  color:#08758d !important;
  font-size:8px !important;
  line-height:21px !important;
  font-weight:850 !important;
}
body[data-page="tournament-view"] .tournament-page #matches .league-panel-link--coach {
  min-height:23px !important;
  height:23px !important;
  padding:0 8px !important;
  border-color:#f0d29b !important;
  background:var(--tfp20-coach-soft) !important;
  color:#ad6200 !important;
  font-size:8px !important;
  line-height:21px !important;
  font-weight:850 !important;
}

/* Action buttons: green save, red cancel, navy edit. */
body[data-page="tournament-view"] .tournament-page #matches .league-match-form button[type="submit"]:not(.league-cancel-btn),
body[data-page="tournament-view"] .tournament-page #matches .league-match-save,
body[data-page="tournament-view"] .tournament-page #matches .league-save-btn {
  border-color:var(--tfp20-green-dark) !important;
  background:var(--tfp20-green) !important;
  background-image:none !important;
  color:#fff !important;
  box-shadow:0 5px 12px rgba(15,159,103,.12) !important;
}
body[data-page="tournament-view"] .tournament-page #matches .league-match-form button[type="submit"]:not(.league-cancel-btn):hover,
body[data-page="tournament-view"] .tournament-page #matches .league-match-save:hover,
body[data-page="tournament-view"] .tournament-page #matches .league-save-btn:hover {
  border-color:var(--tfp20-green-dark) !important;
  background:var(--tfp20-green-dark) !important;
  transform:translateY(-1px) !important;
}
body[data-page="tournament-view"] .tournament-page #matches .league-cancel-btn,
body[data-page="tournament-view"] .tournament-page #matches .league-cancel-btn--compact {
  border:1px solid #f1a8b0 !important;
  border-radius:4px !important;
  background:var(--tfp20-red-soft) !important;
  background-image:none !important;
  color:var(--tfp20-red) !important;
  box-shadow:none !important;
  font-weight:850 !important;
}
body[data-page="tournament-view"] .tournament-page #matches .league-cancel-btn:hover,
body[data-page="tournament-view"] .tournament-page #matches .league-cancel-btn--compact:hover {
  border-color:var(--tfp20-red) !important;
  background:var(--tfp20-red) !important;
  color:#fff !important;
}
body[data-page="tournament-view"] .tournament-page #matches .league-edit-result-btn {
  border:1px solid #c6d5e2 !important;
  border-radius:4px !important;
  background:#eef4f8 !important;
  color:var(--tfp16-navy) !important;
  box-shadow:none !important;
  font-weight:850 !important;
}

/* Small premium lift, without decorative stripes or gradients. */
body[data-page="tournament-view"] .tournament-page #matches .league-match-card {
  transition:border-color .15s ease, box-shadow .15s ease, transform .15s ease !important;
}
body[data-page="tournament-view"] .tournament-page #matches .league-match-card:hover {
  border-color:#b8c8d6 !important;
  box-shadow:0 7px 18px rgba(8,47,73,.06) !important;
  transform:translateY(-1px) !important;
}

/* Mobile: keep the same colour system but protect the one-line top row. */
@media (max-width:700px) {
  body[data-page="tournament-view"] .tournament-page #matches .league-match-panel-links .league-panel-link--referee,
  body[data-page="tournament-view"] .tournament-page #matches .league-match-panel-links .league-panel-link--coach {
    width:auto !important;
    min-width:0 !important;
    height:18px !important;
    min-height:18px !important;
    padding:0 4px !important;
    border-radius:3px !important;
    font-size:6.4px !important;
    line-height:16px !important;
  }
}

/* =========================================================
   v21 — DESKTOP NAV + LEAGUE IDENTITY POLISH
   Larger centered desktop navigation and a stronger league title/logo area.
   Mobile stays compact. No layout/business-logic changes.
   ========================================================= */
@media (min-width:901px) {
  /* Give the league identity a little more breathing room. */
  body[data-page="tournament-view"] .tournament-page .league-table-page-head {
    margin:0 0 12px !important;
    padding-top:4px !important;
  }

  body[data-page="tournament-view"] .tournament-page .league-table-page-head__top {
    grid-template-columns:minmax(0,1.2fr) 68px minmax(260px,.8fr) !important;
    grid-template-areas:"title logo summary" !important;
    min-height:68px !important;
    gap:18px !important;
    margin-bottom:12px !important;
  }

  /* No logo? Do not reserve a dead middle column. */
  body[data-page="tournament-view"] .tournament-page .league-table-page-head__top:not(:has(.league-table-page-logo)) {
    grid-template-columns:minmax(0,1fr) auto !important;
    grid-template-areas:"title summary" !important;
  }

  body[data-page="tournament-view"] .tournament-page .league-table-page-head__title {
    min-width:0 !important;
    padding-right:10px !important;
  }

  body[data-page="tournament-view"] .tournament-page .league-table-page-head h1 {
    margin:0 !important;
    max-width:100% !important;
    font-size:clamp(30px,2.25vw,37px) !important;
    line-height:1.02 !important;
    font-weight:900 !important;
    letter-spacing:-.035em !important;
    color:#071d35 !important;
  }

  body[data-page="tournament-view"] .tournament-page .league-table-page-logo {
    width:62px !important;
    height:62px !important;
    border-radius:12px !important;
    border:1px solid #cbd8e5 !important;
    background:#fff !important;
    box-shadow:0 8px 22px rgba(8,47,73,.08) !important;
  }

  body[data-page="tournament-view"] .tournament-page .league-table-page-logo img {
    width:46px !important;
    height:46px !important;
    object-fit:contain !important;
  }

  body[data-page="tournament-view"] .tournament-page .league-round-summary-card--top {
    min-width:255px !important;
    padding:12px 15px !important;
    border-radius:7px !important;
    border:1px solid #d6e0e9 !important;
    background:#fff !important;
    box-shadow:0 7px 18px rgba(8,47,73,.055) !important;
  }

  body[data-page="tournament-view"] .tournament-page .league-round-summary-card--top strong {
    font-size:12.5px !important;
  }

  body[data-page="tournament-view"] .tournament-page .league-round-summary-card--top .league-round-meta {
    font-size:10.5px !important;
  }

  /* Rounds: a little larger, still crisp rectangles. */
  body[data-page="tournament-view"] .tournament-page .league-round-tab,
  body[data-page="tournament-view"] .tournament-page .league-round-tabs--page .league-round-tab,
  body[data-page="tournament-view"] .tournament-page #table .league-round-tab,
  body[data-page="tournament-view"] .tournament-page #matches .league-round-tab,
  body[data-page="tournament-view"] .tournament-page #results .league-round-tab {
    min-height:39px !important;
    height:39px !important;
    padding:0 23px !important;
    border-radius:5px !important;
    font-size:12px !important;
    line-height:37px !important;
    font-weight:850 !important;
  }

  body[data-page="tournament-view"] .tournament-page .league-round-tabs,
  body[data-page="tournament-view"] .tournament-page .league-round-tabs--page {
    gap:9px !important;
    margin-bottom:12px !important;
  }

  /* Main league navigation: larger and visually centered on desktop. */
  body[data-page="tournament-view"] .tournament-page .league-top-tabs {
    justify-content:center !important;
    align-items:center !important;
    gap:7px !important;
    min-height:50px !important;
    padding:5px 8px !important;
    margin:7px 0 15px !important;
    border-radius:5px !important;
    border:1px solid #d8e2ec !important;
    background:#fff !important;
    box-shadow:0 5px 14px rgba(8,47,73,.035) !important;
  }

  body[data-page="tournament-view"] .tournament-page .league-top-tab {
    min-height:39px !important;
    height:39px !important;
    padding:0 18px !important;
    border-radius:5px !important;
    font-size:10.75px !important;
    line-height:37px !important;
    font-weight:800 !important;
  }

  body[data-page="tournament-view"] .tournament-page .league-top-tab--manage {
    padding-left:20px !important;
    padding-right:20px !important;
    border-color:#8fd3c8 !important;
    background:#e8f7f4 !important;
    color:#0b7068 !important;
    box-shadow:inset 0 0 0 1px rgba(15,118,110,.035) !important;
  }

  body[data-page="tournament-view"] .tournament-page .league-top-tab--manage:hover {
    border-color:#4fb7a7 !important;
    background:#dcf3ee !important;
  }

  body[data-page="tournament-view"] .tournament-page .league-top-tab--manage.active {
    border-color:#0f766e !important;
    background:#0f766e !important;
    color:#fff !important;
  }

  body[data-page="tournament-view"] .tournament-page .league-top-tab--owner {
    padding-left:18px !important;
    padding-right:18px !important;
  }

  /* Groups: match the visual weight of the larger rounds. */
  body[data-page="tournament-view"] .tournament-page .league-mini-tab,
  body[data-page="tournament-view"] .tournament-page #table .league-mini-tab,
  body[data-page="tournament-view"] .tournament-page #matches .league-mini-tabs[data-group-tabs="matches"] .league-mini-tab,
  body[data-page="tournament-view"] .tournament-page #results .league-mini-tab {
    min-height:38px !important;
    height:38px !important;
    padding:0 21px !important;
    border-radius:5px !important;
    font-size:11.5px !important;
    line-height:36px !important;
    font-weight:850 !important;
  }

  body[data-page="tournament-view"] .tournament-page .league-mini-tabs {
    gap:8px !important;
  }
}

/* ===== V23: MAIN NAV LEFT ===== */
@media (min-width: 769px) {
  body[data-page="tournament-view"] .tournament-page .league-top-tabs {
    justify-content:flex-start !important;
  }
}

/* ===== TOURNAMENT polish pass: separate PDF, count badge, two-tone results header ===== */
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) .tfp-card-head-actions {
  display:inline-flex !important;
  align-items:center !important;
  gap:8px !important;
  margin-left:auto !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) .tfp-count-badge {
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:24px !important;
  padding:0 10px !important;
  border:1px solid rgba(255,255,255,.18) !important;
  border-radius:999px !important;
  background:rgba(255,255,255,.12) !important;
  color:#fff !important;
  font-size:10px !important;
  font-weight:800 !important;
  line-height:1 !important;
  white-space:nowrap !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) .tfp-head-pdf-action {
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:24px !important;
  padding:0 10px !important;
  border:1px solid #d7e1eb !important;
  border-radius:999px !important;
  background:#fff !important;
  color:var(--tfp16-navy) !important;
  font-size:10px !important;
  font-weight:800 !important;
  text-decoration:none !important;
  white-space:nowrap !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) .tfp-head-pdf-action:hover {
  background:#f5f8fb !important;
  color:var(--tfp16-navy) !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) .league-results-card__head strong {
  display:block !important;
  color:#fff !important;
  font-size:16px !important;
  font-weight:850 !important;
  line-height:1.15 !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) .league-results-card__head span {
  display:block !important;
  margin-bottom:2px !important;
  color:rgba(255,255,255,.82) !important;
  font-size:10px !important;
  font-weight:800 !important;
  letter-spacing:.02em !important;
  text-transform:uppercase !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) .league-results-card__head {
  background:var(--tfp16-navy) !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) .league-results-matrix thead th {
  background:var(--tfp16-navy-2) !important;
  color:#fff !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) .league-results-corner,
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) .league-results-player {
  background:#edf3f8 !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) .league-results-player {
  color:#17324f !important;
}
@media (max-width: 640px) {
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) .tfp-card-head-actions {
    width:100% !important;
    justify-content:flex-end !important;
    margin-top:6px !important;
  }
}

/* ===== FINAL tournament parity with league: results banner + manage/finish colours ===== */
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) .league-top-tab--manage {
  padding-left:20px !important;
  padding-right:20px !important;
  border-color:#8fd3c8 !important;
  background:#e8f7f4 !important;
  color:#0b7068 !important;
  box-shadow:inset 0 0 0 1px rgba(15,118,110,.035) !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) .league-top-tab--manage:hover {
  border-color:#4fb7a7 !important;
  background:#dcf3ee !important;
  color:#0b7068 !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) .league-top-tab--manage.active {
  border-color:#0f766e !important;
  background:#0f766e !important;
  color:#fff !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) .league-top-tab--owner,
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) .tfp-finish-main-tab {
  padding-left:18px !important;
  padding-right:18px !important;
  border-color:#e7d3ad !important;
  background:#fffaf1 !important;
  color:#89520a !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) .league-top-tab--owner:hover,
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) .tfp-finish-main-tab:hover {
  border-color:#dfc391 !important;
  background:#fdf4e4 !important;
  color:#89520a !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) .tfp-finish-main-tab--ready {
  border-color:#9bd9cf !important;
  background:#e8f7f4 !important;
  color:#0b7068 !important;
}

body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #results .league-results-card {
  border-top:3px solid #1b9cf0 !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #results .league-results-card__head {
  display:flex !important;
  align-items:flex-start !important;
  justify-content:space-between !important;
  gap:12px !important;
  padding:14px 16px !important;
  background:var(--tfp16-navy) !important;
  color:#fff !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #results .league-results-card__head > div {
  display:flex !important;
  flex-direction:column !important;
  align-items:flex-start !important;
  gap:2px !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #results .league-results-card__head span {
  display:block !important;
  margin:0 !important;
  color:rgba(255,255,255,.82) !important;
  font-size:10px !important;
  font-weight:800 !important;
  line-height:1.15 !important;
  letter-spacing:.04em !important;
  text-transform:uppercase !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #results .league-results-card__head strong {
  display:block !important;
  margin:0 !important;
  color:#fff !important;
  font-size:16px !important;
  font-weight:850 !important;
  line-height:1.15 !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #results .league-results-card__head p {
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:32px !important;
  margin:0 !important;
  padding:0 12px !important;
  border:1px solid rgba(255,255,255,.14) !important;
  border-radius:6px !important;
  background:rgba(255,255,255,.08) !important;
  color:#fff !important;
  font-size:12px !important;
  font-weight:800 !important;
  line-height:1 !important;
  white-space:nowrap !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #results .league-results-matrix thead th {
  background:var(--tfp16-navy-2) !important;
  color:#fff !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #results .league-results-scroll {
  border-top:1px solid rgba(12,42,67,.08) !important;
}
@media (max-width: 768px) {
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #results .league-results-card__head {
    flex-direction:column !important;
    align-items:flex-start !important;
  }
}

/* ===== TOURNAMENT MOBILE: clean results/table headers ===== */
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #results .league-results-card {
  border-top:1px solid var(--tfp16-line) !important;
}

@media (max-width: 768px) {
  /* Results: no cyan accent line above the banner. */
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #results .league-results-card {
    border-top:1px solid var(--tfp16-line) !important;
  }

  /* Standings header: keep "Grupa X" fully visible next to count/PDF actions. */
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #table .league-standings-card__head {
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:8px !important;
    padding:12px 12px !important;
  }
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #table .league-standings-card__head h3 {
    flex:1 1 auto !important;
    min-width:0 !important;
    margin:0 !important;
    font-size:15px !important;
    line-height:1.1 !important;
    white-space:nowrap !important;
    overflow:visible !important;
  }
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #table .tfp-card-head-actions {
    flex:0 0 auto !important;
    width:auto !important;
    margin:0 !important;
    gap:6px !important;
  }
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #table .tfp-count-badge,
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #table .tfp-head-pdf-action {
    min-height:22px !important;
    padding:0 9px !important;
    font-size:9px !important;
  }

  /* Results matrix: smaller names in the left row header so pairs fit cleanly. */
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #results .league-results-player {
    min-width:190px !important;
    width:190px !important;
    padding:8px 10px !important;
    font-size:13px !important;
    line-height:1.28 !important;
    font-weight:750 !important;
  }
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #results .league-results-player a,
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #results .league-results-player strong,
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #results .league-results-player span {
    font-size:13px !important;
    line-height:1.28 !important;
  }
}

/* ===== TOURNAMENT RESULTS FINAL: remove cyan accent + center top names ===== */
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #results .league-results-card::before,
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #results .league-results-card::after,
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #results .league-results-card__head::before,
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #results .league-results-card__head::after {
  content:none !important;
  display:none !important;
  background:none !important;
  box-shadow:none !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #results .league-results-card {
  border-top:1px solid var(--tfp16-line) !important;
  box-shadow:none !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #results .league-results-matrix thead th:not(.league-results-corner) {
  text-align:center !important;
  vertical-align:middle !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #results .league-results-matrix thead th:not(.league-results-corner) > span,
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #results .league-results-matrix thead th:not(.league-results-corner) .tfp-pair-inline {
  display:flex !important;
  width:100% !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:center !important;
  text-align:center !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #results .league-results-matrix thead th:not(.league-results-corner) a {
  display:block !important;
  width:100% !important;
  text-align:center !important;
}

/* ===== Tournament: visible match group title + PDF action in main tabs bar ===== */
body[data-page="tournament-view"] #matches .league-card__head h3,
body[data-page="tournament-view"] #matches .league-card__head > h3,
body[data-page="tournament-view"] .tournament-page #matches .league-card__head h3 {
  color:#fff !important;
  opacity:1 !important;
  -webkit-text-fill-color:#fff !important;
  text-shadow:none !important;
}

body[data-page="tournament-view"] .tfp-nav-pdf-action {
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  flex:0 0 auto !important;
  min-height:31px !important;
  height:31px !important;
  margin-left:auto !important;
  padding:0 13px !important;
  border:1px solid #b9c9d7 !important;
  border-radius:4px !important;
  background:#f8fbfd !important;
  color:#0b3a59 !important;
  box-shadow:none !important;
  font-size:9px !important;
  line-height:29px !important;
  font-weight:850 !important;
  text-decoration:none !important;
  white-space:nowrap !important;
}
body[data-page="tournament-view"] .tfp-nav-pdf-action span {
  margin-right:5px !important;
  font-size:12px !important;
  line-height:1 !important;
}
body[data-page="tournament-view"] .tfp-nav-pdf-action:hover {
  border-color:#8ea8bc !important;
  background:#eef5f9 !important;
  color:#082f49 !important;
}

@media (max-width: 768px) {
  body[data-page="tournament-view"] .tfp-nav-pdf-action {
    margin-left:8px !important;
    min-height:38px !important;
    height:38px !important;
    padding:0 14px !important;
    font-size:11px !important;
  }
}

/* ===== FINAL: colored PDF CTA + centered player/pair names in Results header ===== */
body[data-page="tournament-view"] .tfp-nav-pdf-action {
  border-color:#1477d4 !important;
  background:#1477d4 !important;
  color:#fff !important;
  box-shadow:0 2px 8px rgba(20,119,212,.18) !important;
}
body[data-page="tournament-view"] .tfp-nav-pdf-action span {
  color:#fff !important;
}
body[data-page="tournament-view"] .tfp-nav-pdf-action:hover {
  border-color:#0f63b7 !important;
  background:#0f63b7 !important;
  color:#fff !important;
  box-shadow:0 3px 10px rgba(20,119,212,.24) !important;
}

body[data-page="tournament-view"] #results .league-results-matrix thead th:not(.league-results-corner),
body[data-page="tournament-view"] #results .league-results-matrix thead th:not(.league-results-corner) > span,
body[data-page="tournament-view"] #results .league-results-matrix thead th:not(.league-results-corner) .tfp-pair-stack,
body[data-page="tournament-view"] #results .league-results-matrix thead th:not(.league-results-corner) .tfp-pair-member,
body[data-page="tournament-view"] #results .league-results-matrix thead th:not(.league-results-corner) a {
  text-align:center !important;
}
body[data-page="tournament-view"] #results .league-results-matrix thead th:not(.league-results-corner) > span,
body[data-page="tournament-view"] #results .league-results-matrix thead th:not(.league-results-corner) .tfp-pair-stack {
  display:flex !important;
  width:100% !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:center !important;
  margin:0 auto !important;
}
body[data-page="tournament-view"] #results .league-results-matrix thead th:not(.league-results-corner) .tfp-pair-member,
body[data-page="tournament-view"] #results .league-results-matrix thead th:not(.league-results-corner) .tfp-pair-member a,
body[data-page="tournament-view"] #results .league-results-matrix thead th:not(.league-results-corner) > span > a {
  display:block !important;
  width:100% !important;
  margin:0 auto !important;
  text-align:center !important;
}

/* ========================================================================== */
/* TOURNAMENT — PREMIUM STATS + INFO REWORK                                   */
/* Navy-first, shared TennisFinalsPro language, desktop + mobile              */
/* ========================================================================== */

/* ---------- STATS: section heading ---------- */
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats {
  --tfp-stat-navy:#082f49;
  --tfp-stat-navy-2:#0b3a59;
  --tfp-stat-line:#d7e1eb;
  --tfp-stat-soft:#f4f7fa;
  --tfp-stat-text:#10233d;
  --tfp-stat-muted:#66788c;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-section-head {
  margin:0 0 12px !important;
  padding:0 !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-section-head > div::before {
  content:'PODSUMOWANIE RUNDY' !important;
  display:inline-flex !important;
  align-items:center !important;
  min-height:22px !important;
  margin:0 0 7px !important;
  padding:0 9px !important;
  border:1px solid #c9d9e6 !important;
  border-radius:999px !important;
  background:#edf3f8 !important;
  color:var(--tfp-stat-navy) !important;
  font-size:8px !important;
  font-weight:900 !important;
  letter-spacing:.08em !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-section-head h2 {
  margin:0 0 4px !important;
  color:var(--tfp-stat-navy) !important;
  font-size:24px !important;
  line-height:1.05 !important;
  font-weight:900 !important;
  letter-spacing:-.035em !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-section-head p {
  margin:0 !important;
  color:var(--tfp-stat-muted) !important;
  font-size:11px !important;
  font-weight:650 !important;
}

/* ---------- STATS: 4 key cards ---------- */
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-hero-grid {
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:10px !important;
  margin:0 0 12px !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-hero-card {
  position:relative !important;
  min-height:112px !important;
  padding:14px 14px 13px !important;
  border:1px solid #d4dee8 !important;
  border-radius:8px !important;
  background:#fff !important;
  background-image:none !important;
  box-shadow:0 6px 18px rgba(8,47,73,.055) !important;
  overflow:hidden !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-hero-card::before {
  content:'' !important;
  display:block !important;
  position:absolute !important;
  inset:0 auto 0 0 !important;
  width:4px !important;
  background:var(--tfp-stat-navy) !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-hero-card:first-child {
  border-color:var(--tfp-stat-navy) !important;
  background:var(--tfp-stat-navy) !important;
  color:#fff !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-hero-card:first-child::before {
  background:#24c8f4 !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-hero-card__label {
  display:block !important;
  margin:0 0 8px !important;
  color:#667b8f !important;
  font-size:8px !important;
  line-height:1.1 !important;
  font-weight:900 !important;
  letter-spacing:.075em !important;
  text-transform:uppercase !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-hero-card:first-child .league-stats-hero-card__label {
  color:rgba(255,255,255,.72) !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-hero-card__value,
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-hero-card__value a {
  display:block !important;
  color:var(--tfp-stat-navy) !important;
  font-size:14px !important;
  line-height:1.18 !important;
  font-weight:900 !important;
  text-decoration:none !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-hero-card:first-child .league-stats-hero-card__value,
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-hero-card:first-child .league-stats-hero-card__value a {
  color:#fff !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-hero-card__sub {
  margin-top:8px !important;
  color:#728499 !important;
  font-size:9px !important;
  line-height:1.25 !important;
  font-weight:750 !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-hero-card:first-child .league-stats-hero-card__sub {
  color:rgba(255,255,255,.74) !important;
}

/* pairs: stacked, never slash-separated in statistics */
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .tfp-pair-stack {
  display:inline-flex !important;
  flex-direction:column !important;
  align-items:flex-start !important;
  gap:1px !important;
  max-width:100% !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .tfp-pair-member {
  display:block !important;
  max-width:100% !important;
  line-height:1.16 !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .tfp-pair-separator {
  display:none !important;
}

/* ---------- STATS: ranking / results panels ---------- */
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-grid {
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:10px !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-grid > .league-card {
  border:1px solid var(--tfp-stat-line) !important;
  border-radius:7px !important;
  background:#fff !important;
  box-shadow:0 6px 18px rgba(8,47,73,.045) !important;
  overflow:hidden !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-grid > .league-card::before,
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-grid > .league-card::after {
  display:none !important;
  content:none !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-grid > .league-card > h3 {
  margin:0 !important;
  padding:11px 13px !important;
  border:0 !important;
  border-bottom:1px solid rgba(255,255,255,.08) !important;
  background:var(--tfp-stat-navy) !important;
  color:#fff !important;
  font-size:13px !important;
  font-weight:850 !important;
  letter-spacing:-.015em !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-list,
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-results-list {
  display:grid !important;
  gap:0 !important;
  padding:0 !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-row {
  counter-increment:tfp-stat-rank !important;
  position:relative !important;
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  align-items:center !important;
  gap:10px !important;
  min-height:58px !important;
  padding:8px 10px 8px 42px !important;
  border:0 !important;
  border-bottom:1px solid #e5ebf1 !important;
  border-radius:0 !important;
  background:#fff !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-list {
  counter-reset:tfp-stat-rank !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-row:last-child {
  border-bottom:0 !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-row::before {
  content:counter(tfp-stat-rank) !important;
  position:absolute !important;
  left:11px !important;
  top:50% !important;
  transform:translateY(-50%) !important;
  display:grid !important;
  place-items:center !important;
  width:22px !important;
  height:22px !important;
  border-radius:50% !important;
  background:#edf3f8 !important;
  color:var(--tfp-stat-navy) !important;
  font-size:9px !important;
  font-weight:900 !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-row strong,
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-row strong a {
  color:var(--tfp-stat-navy) !important;
  font-size:12px !important;
  line-height:1.18 !important;
  font-weight:850 !important;
  text-decoration:none !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-row span {
  display:block !important;
  margin-top:3px !important;
  color:#718397 !important;
  font-size:8px !important;
  font-weight:750 !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-row .league-points {
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-width:48px !important;
  min-height:28px !important;
  padding:0 8px !important;
  border:1px solid #cbd8e4 !important;
  border-radius:999px !important;
  background:#f5f8fb !important;
  color:var(--tfp-stat-navy) !important;
  font-size:9px !important;
  font-weight:900 !important;
  box-shadow:none !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-card:nth-child(3) {
  grid-column:1 / -1 !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-card:nth-child(3) .league-results-list {
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:0 !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-result-card {
  border:0 !important;
  border-bottom:1px solid #e5ebf1 !important;
  border-right:1px solid #e5ebf1 !important;
  border-radius:0 !important;
  background:#fff !important;
  box-shadow:none !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-result-card__players {
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) !important;
  align-items:center !important;
  gap:10px !important;
  padding:10px 12px 7px !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-result-card__players > span {
  min-width:0 !important;
  color:#17324f !important;
  font-size:10px !important;
  font-weight:800 !important;
  line-height:1.16 !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-result-card__players > span:last-child {
  text-align:right !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-result-card__players strong {
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-width:64px !important;
  min-height:28px !important;
  padding:0 8px !important;
  border:1px solid #b9cada !important;
  border-radius:999px !important;
  background:var(--tfp-stat-navy) !important;
  color:#fff !important;
  font-size:9px !important;
  font-weight:900 !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-result-card__meta {
  padding:0 12px 9px !important;
  color:#74869a !important;
  font-size:8px !important;
  font-weight:750 !important;
}

/* ---------- INFO: heading ---------- */
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info {
  --tfp-info-navy:#082f49;
  --tfp-info-navy-2:#0b3a59;
  --tfp-info-soft:#f4f7fa;
  --tfp-info-line:#d7e1eb;
  --tfp-info-text:#10233d;
  --tfp-info-muted:#66788c;
  padding-bottom:16px !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-heading {
  display:flex !important;
  align-items:flex-start !important;
  justify-content:space-between !important;
  gap:16px !important;
  margin:0 0 12px !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-heading__eyebrow {
  display:inline-flex !important;
  align-items:center !important;
  min-height:22px !important;
  margin:0 0 7px !important;
  padding:0 9px !important;
  border:1px solid #c9d9e6 !important;
  border-radius:999px !important;
  background:#edf3f8 !important;
  color:var(--tfp-info-navy) !important;
  font-size:8px !important;
  font-weight:900 !important;
  letter-spacing:.08em !important;
  text-transform:uppercase !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-heading h2 {
  margin:0 0 5px !important;
  color:var(--tfp-info-navy) !important;
  font-size:24px !important;
  line-height:1.05 !important;
  font-weight:900 !important;
  letter-spacing:-.035em !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-heading p {
  max-width:730px !important;
  margin:0 !important;
  color:var(--tfp-info-muted) !important;
  font-size:10px !important;
  line-height:1.45 !important;
  font-weight:650 !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-heading__status {
  display:inline-flex !important;
  align-items:center !important;
  gap:7px !important;
  min-height:30px !important;
  padding:0 11px !important;
  border:1px solid #c9d9e6 !important;
  border-radius:999px !important;
  background:#fff !important;
  color:var(--tfp-info-navy) !important;
  font-size:9px !important;
  font-weight:850 !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-heading__status span {
  width:7px !important;
  height:7px !important;
  border-radius:50% !important;
  background:#21bf73 !important;
  box-shadow:0 0 0 3px rgba(33,191,115,.13) !important;
}

/* ---------- INFO: main overview ---------- */
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-hero {
  display:grid !important;
  grid-template-columns:minmax(0,1.45fr) minmax(280px,.75fr) !important;
  gap:10px !important;
  margin:0 0 10px !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-hero__main,
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-progress {
  min-width:0 !important;
  border:1px solid var(--tfp-info-line) !important;
  border-radius:8px !important;
  box-shadow:0 6px 18px rgba(8,47,73,.05) !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-hero__main {
  position:relative !important;
  overflow:hidden !important;
  padding:16px !important;
  background:var(--tfp-info-navy) !important;
  background-image:none !important;
  color:#fff !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-hero__main::after {
  content:'' !important;
  display:block !important;
  position:absolute !important;
  right:-44px !important;
  bottom:-58px !important;
  width:150px !important;
  height:150px !important;
  border:22px solid rgba(255,255,255,.045) !important;
  border-radius:50% !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-hero__label {
  color:rgba(255,255,255,.67) !important;
  font-size:8px !important;
  font-weight:900 !important;
  letter-spacing:.08em !important;
  text-transform:uppercase !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-hero h3 {
  margin:4px 0 0 !important;
  color:#fff !important;
  font-size:28px !important;
  line-height:1.03 !important;
  font-weight:900 !important;
  letter-spacing:-.04em !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-hero__logo {
  display:grid !important;
  place-items:center !important;
  width:52px !important;
  height:52px !important;
  border:1px solid rgba(255,255,255,.22) !important;
  border-radius:8px !important;
  background:rgba(255,255,255,.96) !important;
  box-shadow:none !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-hero__logo img {
  width:38px !important;
  height:38px !important;
  object-fit:contain !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-chips {
  display:flex !important;
  flex-wrap:wrap !important;
  gap:6px !important;
  margin:18px 0 0 !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-chips span {
  display:inline-flex !important;
  align-items:center !important;
  min-height:24px !important;
  padding:0 8px !important;
  border:1px solid rgba(255,255,255,.16) !important;
  border-radius:999px !important;
  background:rgba(255,255,255,.09) !important;
  color:#fff !important;
  font-size:8px !important;
  font-weight:800 !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-progress {
  display:flex !important;
  flex-direction:column !important;
  justify-content:center !important;
  padding:15px !important;
  background:#fff !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-progress__head span {
  color:#66788c !important;
  font-size:8px !important;
  font-weight:900 !important;
  letter-spacing:.05em !important;
  text-transform:uppercase !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-progress__head strong {
  color:var(--tfp-info-navy) !important;
  font-size:26px !important;
  font-weight:900 !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-progress__head b {
  color:#61758a !important;
  font-size:9px !important;
  font-weight:850 !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-progress__track {
  height:7px !important;
  margin:13px 0 10px !important;
  border-radius:999px !important;
  background:#e8eef3 !important;
  overflow:hidden !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-progress__track span {
  display:block !important;
  height:100% !important;
  border-radius:999px !important;
  background:var(--tfp-info-navy) !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-progress__foot {
  display:flex !important;
  justify-content:space-between !important;
  gap:10px !important;
  color:#728499 !important;
  font-size:8px !important;
  font-weight:700 !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-progress__foot strong {
  color:var(--tfp-info-navy) !important;
}

/* ---------- INFO: KPI strip ---------- */
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-kpis {
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:8px !important;
  margin:0 0 10px !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-kpi {
  position:relative !important;
  min-height:88px !important;
  padding:12px 12px 11px 15px !important;
  border:1px solid var(--tfp-info-line) !important;
  border-radius:7px !important;
  background:#fff !important;
  box-shadow:none !important;
  overflow:hidden !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-kpi::before {
  content:'' !important;
  position:absolute !important;
  inset:0 auto 0 0 !important;
  width:4px !important;
  background:var(--tfp-info-navy) !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-kpi span {
  display:block !important;
  margin:0 0 5px !important;
  color:#708399 !important;
  font-size:8px !important;
  font-weight:900 !important;
  letter-spacing:.06em !important;
  text-transform:uppercase !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-kpi strong {
  display:block !important;
  color:var(--tfp-info-navy) !important;
  font-size:18px !important;
  line-height:1.1 !important;
  font-weight:900 !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-kpi small {
  display:block !important;
  margin-top:6px !important;
  color:#7b8da0 !important;
  font-size:8px !important;
  line-height:1.25 !important;
  font-weight:650 !important;
}

/* ---------- INFO: configuration cards ---------- */
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-grid {
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:10px !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-card {
  border:1px solid var(--tfp-info-line) !important;
  border-radius:7px !important;
  background:#fff !important;
  box-shadow:none !important;
  overflow:hidden !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-card__head {
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  min-height:58px !important;
  padding:10px 12px !important;
  border-bottom:1px solid #dfe7ee !important;
  background:var(--tfp-info-navy) !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-card__index {
  display:grid !important;
  flex:0 0 auto !important;
  place-items:center !important;
  width:28px !important;
  height:28px !important;
  border:1px solid rgba(255,255,255,.2) !important;
  border-radius:50% !important;
  background:rgba(255,255,255,.09) !important;
  color:#fff !important;
  font-size:8px !important;
  font-weight:900 !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-card__head h3 {
  margin:0 0 2px !important;
  color:#fff !important;
  font-size:12px !important;
  line-height:1.15 !important;
  font-weight:850 !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-card__head p {
  margin:0 !important;
  color:rgba(255,255,255,.67) !important;
  font-size:8px !important;
  line-height:1.2 !important;
  font-weight:650 !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-data {
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:7px !important;
  padding:10px !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-data__item {
  min-width:0 !important;
  min-height:54px !important;
  padding:9px 10px !important;
  border:1px solid #dfe7ee !important;
  border-radius:6px !important;
  background:#f7f9fb !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-data__item.is-wide {
  grid-column:1 / -1 !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-data__item.is-positive {
  border-color:#bde5d1 !important;
  background:#effaf4 !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-data__item.is-negative {
  border-color:#f0c9ce !important;
  background:#fff3f4 !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-data__item span {
  display:block !important;
  margin:0 0 5px !important;
  color:#718399 !important;
  font-size:7px !important;
  font-weight:900 !important;
  letter-spacing:.05em !important;
  text-transform:uppercase !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-data__item strong {
  display:block !important;
  color:var(--tfp-info-navy) !important;
  font-size:10px !important;
  line-height:1.25 !important;
  font-weight:850 !important;
  overflow-wrap:anywhere !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-points {
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:7px !important;
  padding:0 10px 10px !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-points > div {
  min-height:54px !important;
  padding:8px !important;
  border:1px solid #dfe7ee !important;
  border-radius:6px !important;
  background:#f7f9fb !important;
  text-align:center !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-points span {
  display:block !important;
  color:#718399 !important;
  font-size:7px !important;
  font-weight:900 !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-points strong {
  color:var(--tfp-info-navy) !important;
  font-size:16px !important;
  font-weight:900 !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-points small {
  color:#7b8da0 !important;
  font-size:7px !important;
  font-weight:750 !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-criteria {
  display:grid !important;
  gap:6px !important;
  margin:0 !important;
  padding:10px !important;
  list-style:none !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-criteria li {
  display:flex !important;
  align-items:center !important;
  gap:9px !important;
  min-height:38px !important;
  padding:6px 9px !important;
  border:1px solid #dfe7ee !important;
  border-radius:6px !important;
  background:#f7f9fb !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-criteria li > span {
  display:grid !important;
  place-items:center !important;
  width:22px !important;
  height:22px !important;
  border-radius:50% !important;
  background:var(--tfp-info-navy) !important;
  color:#fff !important;
  font-size:8px !important;
  font-weight:900 !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-criteria li strong {
  color:var(--tfp-info-navy) !important;
  font-size:10px !important;
  font-weight:850 !important;
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-hero-grid {
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-grid {
    grid-template-columns:1fr !important;
  }
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-card:nth-child(3) {
    grid-column:auto !important;
  }
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-hero {
    grid-template-columns:1fr !important;
  }
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-kpis {
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}

@media (max-width: 640px) {
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-section-head h2,
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-heading h2 {
    font-size:20px !important;
  }
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-hero-grid {
    grid-template-columns:1fr 1fr !important;
    gap:7px !important;
  }
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-hero-card {
    min-height:102px !important;
    padding:11px 10px 10px 12px !important;
  }
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-hero-card__value,
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-hero-card__value a {
    font-size:11px !important;
  }
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-hero-card__sub {
    font-size:8px !important;
  }
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-card:nth-child(3) .league-results-list {
    grid-template-columns:1fr !important;
  }
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-result-card {
    border-right:0 !important;
  }
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-result-card__players {
    grid-template-columns:minmax(0,1fr) 52px minmax(0,1fr) !important;
    gap:6px !important;
    padding:9px 8px 6px !important;
  }
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-result-card__players > span {
    font-size:9px !important;
  }
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #stats .league-result-card__players strong {
    min-width:52px !important;
    min-height:25px !important;
    padding:0 5px !important;
    font-size:8px !important;
  }

  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-heading {
    flex-direction:column !important;
    gap:8px !important;
  }
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-heading p {
    font-size:9px !important;
  }
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-hero__main {
    padding:13px !important;
  }
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-hero h3 {
    font-size:22px !important;
    padding-right:4px !important;
  }
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-hero__logo {
    width:44px !important;
    height:44px !important;
  }
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-chips {
    margin-top:13px !important;
    gap:5px !important;
  }
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-chips span {
    min-height:22px !important;
    padding:0 7px !important;
    font-size:7px !important;
  }
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-progress {
    padding:12px !important;
  }
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-kpis {
    grid-template-columns:1fr 1fr !important;
    gap:7px !important;
  }
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-kpi {
    min-height:82px !important;
    padding:10px 9px 9px 13px !important;
  }
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-kpi strong {
    font-size:15px !important;
  }
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-grid {
    grid-template-columns:1fr !important;
    gap:8px !important;
  }
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-card__head {
    min-height:54px !important;
    padding:9px 10px !important;
  }
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-data {
    gap:6px !important;
    padding:8px !important;
  }
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-data__item {
    min-height:50px !important;
    padding:8px !important;
  }
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-data__item strong {
    font-size:9px !important;
  }
  body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #info .league-config-points {
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    padding:0 8px 8px !important;
  }
}

/* ===== Tournament table/results polish: cleaner group header separation ===== */
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #results .league-results-card__head > div {
  gap:0 !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #results .league-results-card__head strong {
  margin:0 !important;
  font-size:16px !important;
  line-height:1.15 !important;
}

/* Standings: group banner stays main navy, column labels use the second navy tone. */
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #table .league-standings-card__head {
  background:var(--tfp16-navy) !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #table .league-table-wrap {
  border-top:1px solid rgba(255,255,255,.12) !important;
}
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #table .league-standings-table thead,
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #table .league-standings-table thead tr,
body[data-page="tournament-view"]:not(#tfp-shared-ui-priority) #table .league-standings-table thead th {
  background:var(--tfp16-navy-2) !important;
  color:#fff !important;
}


/* ========================================================================== */
/* LEAGUE — MATCH TOURNAMENT PREMIUM STATS + INFO                                   */
/* Same visual language as tournament, desktop + mobile                      */
/* ========================================================================== */

/* ---------- STATS: section heading ---------- */
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats {
  --tfp-stat-navy:#082f49;
  --tfp-stat-navy-2:#0b3a59;
  --tfp-stat-line:#d7e1eb;
  --tfp-stat-soft:#f4f7fa;
  --tfp-stat-text:#10233d;
  --tfp-stat-muted:#66788c;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-section-head {
  margin:0 0 12px !important;
  padding:0 !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-section-head > div::before {
  content:'PODSUMOWANIE RUNDY' !important;
  display:inline-flex !important;
  align-items:center !important;
  min-height:22px !important;
  margin:0 0 7px !important;
  padding:0 9px !important;
  border:1px solid #c9d9e6 !important;
  border-radius:999px !important;
  background:#edf3f8 !important;
  color:var(--tfp-stat-navy) !important;
  font-size:8px !important;
  font-weight:900 !important;
  letter-spacing:.08em !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-section-head h2 {
  margin:0 0 4px !important;
  color:var(--tfp-stat-navy) !important;
  font-size:24px !important;
  line-height:1.05 !important;
  font-weight:900 !important;
  letter-spacing:-.035em !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-section-head p {
  margin:0 !important;
  color:var(--tfp-stat-muted) !important;
  font-size:11px !important;
  font-weight:650 !important;
}

/* ---------- STATS: 4 key cards ---------- */
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-hero-grid {
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:10px !important;
  margin:0 0 12px !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-hero-card {
  position:relative !important;
  min-height:112px !important;
  padding:14px 14px 13px !important;
  border:1px solid #d4dee8 !important;
  border-radius:8px !important;
  background:#fff !important;
  background-image:none !important;
  box-shadow:0 6px 18px rgba(8,47,73,.055) !important;
  overflow:hidden !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-hero-card::before {
  content:'' !important;
  display:block !important;
  position:absolute !important;
  inset:0 auto 0 0 !important;
  width:4px !important;
  background:var(--tfp-stat-navy) !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-hero-card:first-child {
  border-color:var(--tfp-stat-navy) !important;
  background:var(--tfp-stat-navy) !important;
  color:#fff !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-hero-card:first-child::before {
  background:#24c8f4 !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-hero-card__label {
  display:block !important;
  margin:0 0 8px !important;
  color:#667b8f !important;
  font-size:8px !important;
  line-height:1.1 !important;
  font-weight:900 !important;
  letter-spacing:.075em !important;
  text-transform:uppercase !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-hero-card:first-child .league-stats-hero-card__label {
  color:rgba(255,255,255,.72) !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-hero-card__value,
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-hero-card__value a {
  display:block !important;
  color:var(--tfp-stat-navy) !important;
  font-size:14px !important;
  line-height:1.18 !important;
  font-weight:900 !important;
  text-decoration:none !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-hero-card:first-child .league-stats-hero-card__value,
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-hero-card:first-child .league-stats-hero-card__value a {
  color:#fff !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-hero-card__sub {
  margin-top:8px !important;
  color:#728499 !important;
  font-size:9px !important;
  line-height:1.25 !important;
  font-weight:750 !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-hero-card:first-child .league-stats-hero-card__sub {
  color:rgba(255,255,255,.74) !important;
}

/* pairs: stacked, never slash-separated in statistics */
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .tfp-pair-stack {
  display:inline-flex !important;
  flex-direction:column !important;
  align-items:flex-start !important;
  gap:1px !important;
  max-width:100% !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .tfp-pair-member {
  display:block !important;
  max-width:100% !important;
  line-height:1.16 !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .tfp-pair-separator {
  display:none !important;
}

/* ---------- STATS: ranking / results panels ---------- */
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-grid {
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:10px !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-grid > .league-card {
  border:1px solid var(--tfp-stat-line) !important;
  border-radius:7px !important;
  background:#fff !important;
  box-shadow:0 6px 18px rgba(8,47,73,.045) !important;
  overflow:hidden !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-grid > .league-card::before,
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-grid > .league-card::after {
  display:none !important;
  content:none !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-grid > .league-card > h3 {
  margin:0 !important;
  padding:11px 13px !important;
  border:0 !important;
  border-bottom:1px solid rgba(255,255,255,.08) !important;
  background:var(--tfp-stat-navy) !important;
  color:#fff !important;
  font-size:13px !important;
  font-weight:850 !important;
  letter-spacing:-.015em !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-list,
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-results-list {
  display:grid !important;
  gap:0 !important;
  padding:0 !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-row {
  counter-increment:tfp-stat-rank !important;
  position:relative !important;
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  align-items:center !important;
  gap:10px !important;
  min-height:58px !important;
  padding:8px 10px 8px 42px !important;
  border:0 !important;
  border-bottom:1px solid #e5ebf1 !important;
  border-radius:0 !important;
  background:#fff !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-list {
  counter-reset:tfp-stat-rank !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-row:last-child {
  border-bottom:0 !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-row::before {
  content:counter(tfp-stat-rank) !important;
  position:absolute !important;
  left:11px !important;
  top:50% !important;
  transform:translateY(-50%) !important;
  display:grid !important;
  place-items:center !important;
  width:22px !important;
  height:22px !important;
  border-radius:50% !important;
  background:#edf3f8 !important;
  color:var(--tfp-stat-navy) !important;
  font-size:9px !important;
  font-weight:900 !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-row strong,
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-row strong a {
  color:var(--tfp-stat-navy) !important;
  font-size:12px !important;
  line-height:1.18 !important;
  font-weight:850 !important;
  text-decoration:none !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-row span {
  display:block !important;
  margin-top:3px !important;
  color:#718397 !important;
  font-size:8px !important;
  font-weight:750 !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-row .league-points {
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-width:48px !important;
  min-height:28px !important;
  padding:0 8px !important;
  border:1px solid #cbd8e4 !important;
  border-radius:999px !important;
  background:#f5f8fb !important;
  color:var(--tfp-stat-navy) !important;
  font-size:9px !important;
  font-weight:900 !important;
  box-shadow:none !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-card:nth-child(3) {
  grid-column:1 / -1 !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-card:nth-child(3) .league-results-list {
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:0 !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-result-card {
  border:0 !important;
  border-bottom:1px solid #e5ebf1 !important;
  border-right:1px solid #e5ebf1 !important;
  border-radius:0 !important;
  background:#fff !important;
  box-shadow:none !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-result-card__players {
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) !important;
  align-items:center !important;
  gap:10px !important;
  padding:10px 12px 7px !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-result-card__players > span {
  min-width:0 !important;
  color:#17324f !important;
  font-size:10px !important;
  font-weight:800 !important;
  line-height:1.16 !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-result-card__players > span:last-child {
  text-align:right !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-result-card__players strong {
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-width:64px !important;
  min-height:28px !important;
  padding:0 8px !important;
  border:1px solid #b9cada !important;
  border-radius:999px !important;
  background:var(--tfp-stat-navy) !important;
  color:#fff !important;
  font-size:9px !important;
  font-weight:900 !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-result-card__meta {
  padding:0 12px 9px !important;
  color:#74869a !important;
  font-size:8px !important;
  font-weight:750 !important;
}

/* ---------- INFO: heading ---------- */
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info {
  --tfp-info-navy:#082f49;
  --tfp-info-navy-2:#0b3a59;
  --tfp-info-soft:#f4f7fa;
  --tfp-info-line:#d7e1eb;
  --tfp-info-text:#10233d;
  --tfp-info-muted:#66788c;
  padding-bottom:16px !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-heading {
  display:flex !important;
  align-items:flex-start !important;
  justify-content:space-between !important;
  gap:16px !important;
  margin:0 0 12px !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-heading__eyebrow {
  display:inline-flex !important;
  align-items:center !important;
  min-height:22px !important;
  margin:0 0 7px !important;
  padding:0 9px !important;
  border:1px solid #c9d9e6 !important;
  border-radius:999px !important;
  background:#edf3f8 !important;
  color:var(--tfp-info-navy) !important;
  font-size:8px !important;
  font-weight:900 !important;
  letter-spacing:.08em !important;
  text-transform:uppercase !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-heading h2 {
  margin:0 0 5px !important;
  color:var(--tfp-info-navy) !important;
  font-size:24px !important;
  line-height:1.05 !important;
  font-weight:900 !important;
  letter-spacing:-.035em !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-heading p {
  max-width:730px !important;
  margin:0 !important;
  color:var(--tfp-info-muted) !important;
  font-size:10px !important;
  line-height:1.45 !important;
  font-weight:650 !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-heading__status {
  display:inline-flex !important;
  align-items:center !important;
  gap:7px !important;
  min-height:30px !important;
  padding:0 11px !important;
  border:1px solid #c9d9e6 !important;
  border-radius:999px !important;
  background:#fff !important;
  color:var(--tfp-info-navy) !important;
  font-size:9px !important;
  font-weight:850 !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-heading__status span {
  width:7px !important;
  height:7px !important;
  border-radius:50% !important;
  background:#21bf73 !important;
  box-shadow:0 0 0 3px rgba(33,191,115,.13) !important;
}

/* ---------- INFO: main overview ---------- */
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-hero {
  display:grid !important;
  grid-template-columns:minmax(0,1.45fr) minmax(280px,.75fr) !important;
  gap:10px !important;
  margin:0 0 10px !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-hero__main,
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-progress {
  min-width:0 !important;
  border:1px solid var(--tfp-info-line) !important;
  border-radius:8px !important;
  box-shadow:0 6px 18px rgba(8,47,73,.05) !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-hero__main {
  position:relative !important;
  overflow:hidden !important;
  padding:16px !important;
  background:var(--tfp-info-navy) !important;
  background-image:none !important;
  color:#fff !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-hero__main::after {
  content:'' !important;
  display:block !important;
  position:absolute !important;
  right:-44px !important;
  bottom:-58px !important;
  width:150px !important;
  height:150px !important;
  border:22px solid rgba(255,255,255,.045) !important;
  border-radius:50% !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-hero__label {
  color:rgba(255,255,255,.67) !important;
  font-size:8px !important;
  font-weight:900 !important;
  letter-spacing:.08em !important;
  text-transform:uppercase !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-hero h3 {
  margin:4px 0 0 !important;
  color:#fff !important;
  font-size:28px !important;
  line-height:1.03 !important;
  font-weight:900 !important;
  letter-spacing:-.04em !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-hero__logo {
  display:grid !important;
  place-items:center !important;
  width:52px !important;
  height:52px !important;
  border:1px solid rgba(255,255,255,.22) !important;
  border-radius:8px !important;
  background:rgba(255,255,255,.96) !important;
  box-shadow:none !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-hero__logo img {
  width:38px !important;
  height:38px !important;
  object-fit:contain !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-chips {
  display:flex !important;
  flex-wrap:wrap !important;
  gap:6px !important;
  margin:18px 0 0 !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-chips span {
  display:inline-flex !important;
  align-items:center !important;
  min-height:24px !important;
  padding:0 8px !important;
  border:1px solid rgba(255,255,255,.16) !important;
  border-radius:999px !important;
  background:rgba(255,255,255,.09) !important;
  color:#fff !important;
  font-size:8px !important;
  font-weight:800 !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-progress {
  display:flex !important;
  flex-direction:column !important;
  justify-content:center !important;
  padding:15px !important;
  background:#fff !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-progress__head span {
  color:#66788c !important;
  font-size:8px !important;
  font-weight:900 !important;
  letter-spacing:.05em !important;
  text-transform:uppercase !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-progress__head strong {
  color:var(--tfp-info-navy) !important;
  font-size:26px !important;
  font-weight:900 !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-progress__head b {
  color:#61758a !important;
  font-size:9px !important;
  font-weight:850 !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-progress__track {
  height:7px !important;
  margin:13px 0 10px !important;
  border-radius:999px !important;
  background:#e8eef3 !important;
  overflow:hidden !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-progress__track span {
  display:block !important;
  height:100% !important;
  border-radius:999px !important;
  background:var(--tfp-info-navy) !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-progress__foot {
  display:flex !important;
  justify-content:space-between !important;
  gap:10px !important;
  color:#728499 !important;
  font-size:8px !important;
  font-weight:700 !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-progress__foot strong {
  color:var(--tfp-info-navy) !important;
}

/* ---------- INFO: KPI strip ---------- */
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-kpis {
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:8px !important;
  margin:0 0 10px !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-kpi {
  position:relative !important;
  min-height:88px !important;
  padding:12px 12px 11px 15px !important;
  border:1px solid var(--tfp-info-line) !important;
  border-radius:7px !important;
  background:#fff !important;
  box-shadow:none !important;
  overflow:hidden !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-kpi::before {
  content:'' !important;
  position:absolute !important;
  inset:0 auto 0 0 !important;
  width:4px !important;
  background:var(--tfp-info-navy) !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-kpi span {
  display:block !important;
  margin:0 0 5px !important;
  color:#708399 !important;
  font-size:8px !important;
  font-weight:900 !important;
  letter-spacing:.06em !important;
  text-transform:uppercase !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-kpi strong {
  display:block !important;
  color:var(--tfp-info-navy) !important;
  font-size:18px !important;
  line-height:1.1 !important;
  font-weight:900 !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-kpi small {
  display:block !important;
  margin-top:6px !important;
  color:#7b8da0 !important;
  font-size:8px !important;
  line-height:1.25 !important;
  font-weight:650 !important;
}

/* ---------- INFO: configuration cards ---------- */
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-grid {
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:10px !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-card {
  border:1px solid var(--tfp-info-line) !important;
  border-radius:7px !important;
  background:#fff !important;
  box-shadow:none !important;
  overflow:hidden !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-card__head {
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  min-height:58px !important;
  padding:10px 12px !important;
  border-bottom:1px solid #dfe7ee !important;
  background:var(--tfp-info-navy) !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-card__index {
  display:grid !important;
  flex:0 0 auto !important;
  place-items:center !important;
  width:28px !important;
  height:28px !important;
  border:1px solid rgba(255,255,255,.2) !important;
  border-radius:50% !important;
  background:rgba(255,255,255,.09) !important;
  color:#fff !important;
  font-size:8px !important;
  font-weight:900 !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-card__head h3 {
  margin:0 0 2px !important;
  color:#fff !important;
  font-size:12px !important;
  line-height:1.15 !important;
  font-weight:850 !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-card__head p {
  margin:0 !important;
  color:rgba(255,255,255,.67) !important;
  font-size:8px !important;
  line-height:1.2 !important;
  font-weight:650 !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-data {
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:7px !important;
  padding:10px !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-data__item {
  min-width:0 !important;
  min-height:54px !important;
  padding:9px 10px !important;
  border:1px solid #dfe7ee !important;
  border-radius:6px !important;
  background:#f7f9fb !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-data__item.is-wide {
  grid-column:1 / -1 !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-data__item.is-positive {
  border-color:#bde5d1 !important;
  background:#effaf4 !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-data__item.is-negative {
  border-color:#f0c9ce !important;
  background:#fff3f4 !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-data__item span {
  display:block !important;
  margin:0 0 5px !important;
  color:#718399 !important;
  font-size:7px !important;
  font-weight:900 !important;
  letter-spacing:.05em !important;
  text-transform:uppercase !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-data__item strong {
  display:block !important;
  color:var(--tfp-info-navy) !important;
  font-size:10px !important;
  line-height:1.25 !important;
  font-weight:850 !important;
  overflow-wrap:anywhere !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-points {
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:7px !important;
  padding:0 10px 10px !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-points > div {
  min-height:54px !important;
  padding:8px !important;
  border:1px solid #dfe7ee !important;
  border-radius:6px !important;
  background:#f7f9fb !important;
  text-align:center !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-points span {
  display:block !important;
  color:#718399 !important;
  font-size:7px !important;
  font-weight:900 !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-points strong {
  color:var(--tfp-info-navy) !important;
  font-size:16px !important;
  font-weight:900 !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-points small {
  color:#7b8da0 !important;
  font-size:7px !important;
  font-weight:750 !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-criteria {
  display:grid !important;
  gap:6px !important;
  margin:0 !important;
  padding:10px !important;
  list-style:none !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-criteria li {
  display:flex !important;
  align-items:center !important;
  gap:9px !important;
  min-height:38px !important;
  padding:6px 9px !important;
  border:1px solid #dfe7ee !important;
  border-radius:6px !important;
  background:#f7f9fb !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-criteria li > span {
  display:grid !important;
  place-items:center !important;
  width:22px !important;
  height:22px !important;
  border-radius:50% !important;
  background:var(--tfp-info-navy) !important;
  color:#fff !important;
  font-size:8px !important;
  font-weight:900 !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-criteria li strong {
  color:var(--tfp-info-navy) !important;
  font-size:10px !important;
  font-weight:850 !important;
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-hero-grid {
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
  body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-grid {
    grid-template-columns:1fr !important;
  }
  body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-card:nth-child(3) {
    grid-column:auto !important;
  }
  body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-hero {
    grid-template-columns:1fr !important;
  }
  body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-kpis {
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}

@media (max-width: 640px) {
  body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-section-head h2,
  body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-heading h2 {
    font-size:20px !important;
  }
  body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-hero-grid {
    grid-template-columns:1fr 1fr !important;
    gap:7px !important;
  }
  body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-hero-card {
    min-height:102px !important;
    padding:11px 10px 10px 12px !important;
  }
  body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-hero-card__value,
  body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-hero-card__value a {
    font-size:11px !important;
  }
  body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-stats-hero-card__sub {
    font-size:8px !important;
  }
  body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-card:nth-child(3) .league-results-list {
    grid-template-columns:1fr !important;
  }
  body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-result-card {
    border-right:0 !important;
  }
  body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-result-card__players {
    grid-template-columns:minmax(0,1fr) 52px minmax(0,1fr) !important;
    gap:6px !important;
    padding:9px 8px 6px !important;
  }
  body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-result-card__players > span {
    font-size:9px !important;
  }
  body[data-page="league-view"]:not(#tfp-shared-ui-priority) #stats .league-result-card__players strong {
    min-width:52px !important;
    min-height:25px !important;
    padding:0 5px !important;
    font-size:8px !important;
  }

  body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-heading {
    flex-direction:column !important;
    gap:8px !important;
  }
  body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-heading p {
    font-size:9px !important;
  }
  body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-hero__main {
    padding:13px !important;
  }
  body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-hero h3 {
    font-size:22px !important;
    padding-right:4px !important;
  }
  body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-hero__logo {
    width:44px !important;
    height:44px !important;
  }
  body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-chips {
    margin-top:13px !important;
    gap:5px !important;
  }
  body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-chips span {
    min-height:22px !important;
    padding:0 7px !important;
    font-size:7px !important;
  }
  body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-progress {
    padding:12px !important;
  }
  body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-kpis {
    grid-template-columns:1fr 1fr !important;
    gap:7px !important;
  }
  body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-kpi {
    min-height:82px !important;
    padding:10px 9px 9px 13px !important;
  }
  body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-kpi strong {
    font-size:15px !important;
  }
  body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-grid {
    grid-template-columns:1fr !important;
    gap:8px !important;
  }
  body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-card__head {
    min-height:54px !important;
    padding:9px 10px !important;
  }
  body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-data {
    gap:6px !important;
    padding:8px !important;
  }
  body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-data__item {
    min-height:50px !important;
    padding:8px !important;
  }
  body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-data__item strong {
    font-size:9px !important;
  }
  body[data-page="league-view"]:not(#tfp-shared-ui-priority) #info .league-config-points {
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    padding:0 8px 8px !important;
  }
}

/* ===== Tournament table/results polish: cleaner group header separation ===== */
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #results .league-results-card__head > div {
  gap:0 !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #results .league-results-card__head strong {
  margin:0 !important;
  font-size:16px !important;
  line-height:1.15 !important;
}

/* Standings: group banner stays main navy, column labels use the second navy tone. */
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #table .league-standings-card__head {
  background:var(--tfp16-navy) !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #table .league-table-wrap {
  border-top:1px solid rgba(255,255,255,.12) !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #table .league-standings-table thead,
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #table .league-standings-table thead tr,
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #table .league-standings-table thead th {
  background:var(--tfp16-navy-2) !important;
  color:#fff !important;
}


/* ========================================================================== */
/* LEAGUE — TABLE + RESULTS HEADER PARITY WITH TOURNAMENT                     */
/* ========================================================================== */
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #table .league-standings-card__head {
  background:#082f49 !important;
  color:#fff !important;
  border-bottom:0 !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #table .league-standings-card__head h3,
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #table .league-standings-card__head span {
  color:#fff !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #table .league-standings-card__head span {
  background:rgba(255,255,255,.09) !important;
  border-color:rgba(255,255,255,.16) !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #table .league-standings-table thead th {
  background:#0b3a59 !important;
  color:#fff !important;
  border-top:1px solid rgba(255,255,255,.08) !important;
}

body[data-page="league-view"]:not(#tfp-shared-ui-priority) #results .league-results-card {
  border-top:0 !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #results .league-results-card::before {
  display:none !important;
  content:none !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #results .league-results-card__head {
  background:#082f49 !important;
  color:#fff !important;
  border-bottom:0 !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #results .league-results-card__head > div {
  display:flex !important;
  align-items:center !important;
  min-height:34px !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #results .league-results-card__head strong {
  margin:0 !important;
  color:#fff !important;
  font-size:17px !important;
  line-height:1.1 !important;
  font-weight:900 !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #results .league-results-card__head p {
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:30px !important;
  margin:0 !important;
  padding:0 11px !important;
  border:1px solid rgba(255,255,255,.14) !important;
  border-radius:6px !important;
  background:rgba(255,255,255,.08) !important;
  color:#fff !important;
  font-size:11px !important;
  font-weight:850 !important;
  white-space:nowrap !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #results .league-results-matrix thead th {
  background:#0b3a59 !important;
  color:#fff !important;
  border-top:1px solid rgba(255,255,255,.08) !important;
  text-align:center !important;
  vertical-align:middle !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #results .league-results-matrix thead th > span,
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #results .league-results-matrix thead th a {
  text-align:center !important;
  justify-content:center !important;
}
body[data-page="league-view"]:not(#tfp-shared-ui-priority) #results .league-results-corner {
  background:#0b3a59 !important;
  color:#fff !important;
}

@media (max-width:768px) {
  body[data-page="league-view"]:not(#tfp-shared-ui-priority) #results .league-results-card__head {
    gap:10px !important;
  }
  body[data-page="league-view"]:not(#tfp-shared-ui-priority) #results .league-results-card__head strong {
    font-size:15px !important;
  }
}


/* =====================================================================
   TFP 2026-09-25 — WIDE DESKTOP / STRONG TABS / COMPACT NAVY MANAGER
   Final desktop pass for LEAGUE + TOURNAMENT.
   ===================================================================== */

@media (min-width: 1100px) {
  /* ===== SZEROKOŚĆ STRONY — wykorzystaj desktop zamiast wąskiego pasa ===== */
  body[data-page="league-view"] .league-shell,
  body[data-page="tournament-view"] .tournament-page .league-shell {
    width:min(1580px, calc(100vw - 56px)) !important;
    max-width:1580px !important;
    margin-left:auto !important;
    margin-right:auto !important;
    padding-left:0 !important;
    padding-right:0 !important;
  }

  body[data-page="league-view"] .league-panels,
  body[data-page="tournament-view"] .tournament-page .league-panels,
  body[data-page="league-view"] .league-panel,
  body[data-page="tournament-view"] .tournament-page .league-panel {
    width:100% !important;
    max-width:none !important;
  }

  /* ===== GŁÓWNE ZAKŁADKI — nie mikroskopijne ===== */
  body[data-page="league-view"] .league-top-tabs,
  body[data-page="tournament-view"] .tournament-page .league-top-tabs {
    gap:7px !important;
    min-height:52px !important;
    padding:5px !important;
    margin:10px 0 16px !important;
    border-radius:9px !important;
  }

  body[data-page="league-view"] .league-top-tab,
  body[data-page="tournament-view"] .tournament-page .league-top-tab {
    min-height:40px !important;
    height:40px !important;
    padding:0 18px !important;
    border-radius:7px !important;
    font-size:12.5px !important;
    line-height:38px !important;
    font-weight:850 !important;
  }

  /* Rundy i grupy też mają mieć normalny rozmiar na desktopie */
  body[data-page="league-view"] .league-round-tab,
  body[data-page="league-view"] .league-round-tabs--page .league-round-tab,
  body[data-page="league-view"] .league-mini-tab,
  body[data-page="tournament-view"] .tournament-page .league-round-tab,
  body[data-page="tournament-view"] .tournament-page .league-mini-tab {
    min-height:38px !important;
    height:38px !important;
    padding:0 17px !important;
    border-radius:7px !important;
    font-size:12px !important;
    line-height:36px !important;
    font-weight:850 !important;
  }

  body[data-page="league-view"] .league-round-tabs,
  body[data-page="league-view"] .league-round-tabs--page,
  body[data-page="league-view"] .league-mini-tabs,
  body[data-page="tournament-view"] .tournament-page .league-round-tabs,
  body[data-page="tournament-view"] .tournament-page .league-mini-tabs {
    gap:8px !important;
  }

  /* ===== MANAGER — zakładki duże, czytelne ===== */
  body[data-page="league-view"] .tfp-manager--league .tfp-manager-tabs,
  body[data-page="league-view"] .tfp-manager-tabs,
  body[data-page="tournament-view"] .tournament-page .tfp-manager-tabs {
    min-height:54px !important;
    gap:6px !important;
    padding:6px !important;
    border-radius:12px !important;
  }

  body[data-page="league-view"] .tfp-manager--league .tfp-manager-tab,
  body[data-page="league-view"] .tfp-manager-tab,
  body[data-page="tournament-view"] .tournament-page .tfp-manager-tab {
    min-height:40px !important;
    height:40px !important;
    padding:0 17px !important;
    border-radius:8px !important;
    font-size:12px !important;
    line-height:38px !important;
    font-weight:850 !important;
  }

  /* ===== BANER ZARZĄDZANIA — mniejszy, ciemny granat ===== */
  body[data-page="league-view"] .league-panel--manage .league-manage-tab-intro,
  body[data-page="tournament-view"] .tournament-page .league-panel--manage .league-manage-tab-intro {
    min-height:0 !important;
    margin:0 0 14px !important;
    padding:22px 26px !important;
    border-radius:18px !important;
    border:1px solid rgba(255,255,255,.08) !important;
    background:
      radial-gradient(circle at 100% 0%, rgba(27,92,135,.18), transparent 32%),
      linear-gradient(135deg,#061d3a 0%,#082b59 66%,#0a365f 100%) !important;
    box-shadow:0 13px 32px rgba(6,29,58,.14) !important;
  }

  body[data-page="league-view"] .league-panel--manage .league-manage-tab-intro span,
  body[data-page="tournament-view"] .tournament-page .league-panel--manage .league-manage-tab-intro span {
    min-height:28px !important;
    margin-bottom:8px !important;
    padding:0 11px !important;
    font-size:10px !important;
    color:#d7e5f3 !important;
    background:rgba(255,255,255,.09) !important;
  }

  body[data-page="league-view"] .league-panel--manage .league-manage-tab-intro h2,
  body[data-page="tournament-view"] .tournament-page .league-panel--manage .league-manage-tab-intro h2 {
    margin:0 !important;
    color:#fff !important;
    font-size:32px !important;
    line-height:1.02 !important;
    font-weight:950 !important;
    letter-spacing:-.04em !important;
  }

  body[data-page="league-view"] .league-panel--manage .league-manage-tab-intro p,
  body[data-page="tournament-view"] .tournament-page .league-panel--manage .league-manage-tab-intro p {
    max-width:860px !important;
    margin:7px 0 0 !important;
    color:#d5e1ee !important;
    font-size:14.5px !important;
    line-height:1.45 !important;
    font-weight:650 !important;
  }

  /* Dashboard managera — już nie wielki banner */
  body[data-page="league-view"] .tfp-league-dashboard__hero,
  body[data-page="league-view"] .tfp-manager--league .tfp-module-hero {
    min-height:0 !important;
    padding:16px 18px !important;
    border-radius:14px !important;
    background:
      linear-gradient(135deg,#071f3d 0%,#082b59 70%,#0b3c65 100%) !important;
  }

  body[data-page="league-view"] .tfp-league-dashboard__hero h3,
  body[data-page="league-view"] .tfp-manager--league .tfp-module-hero h3 {
    color:#fff !important;
    font-size:22px !important;
  }

  body[data-page="league-view"] .tfp-league-dashboard__hero p,
  body[data-page="league-view"] .tfp-manager--league .tfp-module-hero p {
    color:#d7e3ef !important;
    font-size:11.5px !important;
  }
}

/* ===== KLASYFIKACJA GENERALNA — pełna szerokość i porządna hierarchia ===== */
body[data-page="league-view"] #general {
  width:100% !important;
}

body[data-page="league-view"] #general .league-section-head {
  margin:4px 0 16px !important;
}

body[data-page="league-view"] #general .league-section-head h2 {
  margin:0 !important;
  color:#0b1f38 !important;
  font-size:clamp(24px,2vw,31px) !important;
  line-height:1.05 !important;
  font-weight:950 !important;
  letter-spacing:-.04em !important;
}

body[data-page="league-view"] #general .league-section-head p {
  margin-top:5px !important;
  color:#64768a !important;
  font-size:13px !important;
  line-height:1.45 !important;
}

body[data-page="league-view"] #general .league-general-kpis {
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:12px !important;
  margin:0 0 14px !important;
}

body[data-page="league-view"] #general .league-general-kpi {
  display:grid !important;
  grid-template-columns:46px minmax(0,1fr) !important;
  align-items:center !important;
  gap:12px !important;
  min-height:96px !important;
  padding:15px 17px !important;
  border:1px solid #d8e2ec !important;
  border-radius:14px !important;
  background:#fff !important;
  box-shadow:0 6px 18px rgba(15,35,60,.04) !important;
}

body[data-page="league-view"] #general .league-general-kpi__icon {
  display:grid !important;
  place-items:center !important;
  width:42px !important;
  height:42px !important;
  border-radius:11px !important;
  background:#edf3f8 !important;
  color:#082f49 !important;
  font-size:18px !important;
}

body[data-page="league-view"] #general .league-general-kpi > div {
  display:grid !important;
  grid-template-columns:auto 1fr !important;
  grid-template-areas:
    "label label"
    "value meta" !important;
  align-items:end !important;
  column-gap:9px !important;
  row-gap:2px !important;
  min-width:0 !important;
}

body[data-page="league-view"] #general .league-general-kpi small {
  grid-area:label !important;
  display:block !important;
  color:#60758a !important;
  font-size:10.5px !important;
  line-height:1.2 !important;
  font-weight:850 !important;
  letter-spacing:.06em !important;
  text-transform:uppercase !important;
}

body[data-page="league-view"] #general .league-general-kpi strong,
body[data-page="league-view"] #general .league-general-kpi strong a {
  grid-area:value !important;
  display:block !important;
  min-width:0 !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  color:#0b1f38 !important;
  font-size:24px !important;
  line-height:1.05 !important;
  font-weight:950 !important;
  letter-spacing:-.035em !important;
}

body[data-page="league-view"] #general .league-general-kpi em {
  grid-area:meta !important;
  align-self:end !important;
  margin:0 0 2px !important;
  color:#73869a !important;
  font-size:12px !important;
  line-height:1.2 !important;
  font-style:normal !important;
  font-weight:700 !important;
  white-space:nowrap !important;
}

body[data-page="league-view"] #general .league-general-ranking-card {
  width:100% !important;
  border:1px solid #d7e1eb !important;
  border-radius:14px !important;
  overflow:hidden !important;
  background:#fff !important;
  box-shadow:0 8px 24px rgba(15,35,60,.045) !important;
}

body[data-page="league-view"] #general .league-general-ranking-card__head {
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:16px !important;
  min-height:58px !important;
  padding:0 18px !important;
  border:0 !important;
  background:linear-gradient(135deg,#061f3d,#083455) !important;
}

body[data-page="league-view"] #general .league-general-ranking-card__head h3 {
  margin:0 !important;
  color:#fff !important;
  font-size:16px !important;
  font-weight:900 !important;
}

body[data-page="league-view"] #general .league-general-ranking-card__head > span {
  display:inline-flex !important;
  align-items:center !important;
  min-height:28px !important;
  padding:0 11px !important;
  border:1px solid rgba(255,255,255,.16) !important;
  border-radius:999px !important;
  background:rgba(255,255,255,.10) !important;
  color:#fff !important;
  font-size:10.5px !important;
  font-weight:850 !important;
}

body[data-page="league-view"] #general .league-general-table-wrap {
  width:100% !important;
  max-width:none !important;
  overflow-x:auto !important;
  background:#fff !important;
}

body[data-page="league-view"] #general table.league-general-table {
  width:100% !important;
  min-width:980px !important;
  margin:0 !important;
  border-collapse:collapse !important;
  table-layout:auto !important;
}

body[data-page="league-view"] #general .league-general-table thead th {
  height:46px !important;
  padding:0 14px !important;
  background:#0b3a59 !important;
  color:#fff !important;
  border-bottom:0 !important;
  font-size:10.5px !important;
  font-weight:900 !important;
  letter-spacing:.05em !important;
  text-transform:uppercase !important;
  white-space:nowrap !important;
}

body[data-page="league-view"] #general .league-general-table tbody td {
  height:50px !important;
  padding:8px 14px !important;
  border-bottom:1px solid #e6edf4 !important;
  background:#fff !important;
  color:#253a51 !important;
  font-size:12px !important;
  vertical-align:middle !important;
}

body[data-page="league-view"] #general .league-general-table tbody tr:nth-child(even) td {
  background:#f8fafc !important;
}

body[data-page="league-view"] #general .league-general-table tbody tr:hover td {
  background:#f0f6fb !important;
}

body[data-page="league-view"] #general .league-general-table th:first-child,
body[data-page="league-view"] #general .league-general-table td:first-child {
  width:66px !important;
  text-align:center !important;
}

body[data-page="league-view"] #general .league-general-player {
  min-width:210px !important;
}

body[data-page="league-view"] #general .league-general-player strong,
body[data-page="league-view"] #general .league-general-player strong a {
  color:#10233d !important;
  font-size:12.5px !important;
  font-weight:850 !important;
}

body[data-page="league-view"] #general .league-general-group {
  display:inline-flex !important;
  align-items:center !important;
  min-height:28px !important;
  padding:0 10px !important;
  border:1px solid #d9e4ee !important;
  border-radius:999px !important;
  background:#f5f8fb !important;
  color:#3f5870 !important;
  font-size:10.5px !important;
  font-weight:800 !important;
  white-space:nowrap !important;
}

body[data-page="league-view"] #general .league-general-round-points {
  min-width:118px !important;
  color:#40586f !important;
  font-weight:750 !important;
}

body[data-page="league-view"] #general .league-general-total {
  min-width:115px !important;
  text-align:center !important;
}

body[data-page="league-view"] #general .league-general-total strong {
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-width:58px !important;
  min-height:32px !important;
  padding:0 10px !important;
  border-radius:999px !important;
  background:#eaf2f8 !important;
  color:#082f49 !important;
  font-size:13px !important;
  font-weight:950 !important;
}

/* ===== PUNKTACJA W MANAGERZE — zamiast surowej ściany inputów ===== */
body[data-page="league-view"] .tfp-manager--league .league-general-points-grid {
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:14px !important;
  margin:14px 0 16px !important;
}

body[data-page="league-view"] .tfp-manager--league .league-general-points-card {
  overflow:hidden !important;
  padding:0 14px 14px !important;
  border:1px solid #d7e1eb !important;
  border-radius:14px !important;
  background:#fff !important;
  box-shadow:0 5px 16px rgba(15,35,60,.035) !important;
}

body[data-page="league-view"] .tfp-manager--league .league-general-points-card > strong {
  display:block !important;
  margin:0 -14px 12px !important;
  padding:12px 14px !important;
  background:linear-gradient(135deg,#071f3d,#0a3d62) !important;
  color:#fff !important;
  font-size:13px !important;
  font-weight:900 !important;
}

body[data-page="league-view"] .tfp-manager--league .league-general-points-fields {
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:8px !important;
}

body[data-page="league-view"] .tfp-manager--league .league-general-points-fields label {
  display:grid !important;
  grid-template-columns:32px minmax(0,1fr) !important;
  align-items:center !important;
  gap:8px !important;
  min-width:0 !important;
  padding:7px !important;
  border:1px solid #e1e8ef !important;
  border-radius:9px !important;
  background:#f8fafc !important;
}

body[data-page="league-view"] .tfp-manager--league .league-general-points-fields label > span {
  color:#4c6177 !important;
  font-size:11px !important;
  font-weight:900 !important;
  text-align:center !important;
}

body[data-page="league-view"] .tfp-manager--league .league-general-points-fields input[type="number"] {
  width:100% !important;
  min-width:0 !important;
  height:38px !important;
  min-height:38px !important;
  padding:0 8px !important;
  border:1px solid #b9c9d8 !important;
  border-radius:7px !important;
  background:#fff !important;
  color:#10233d !important;
  font-size:13px !important;
  font-weight:850 !important;
  text-align:center !important;
}

body[data-page="league-view"] .tfp-manager--league [data-manager-panel="points"] .league-save-btn {
  width:auto !important;
  min-width:230px !important;
  min-height:42px !important;
  padding:0 18px !important;
  border-radius:8px !important;
  background:#082f49 !important;
  color:#fff !important;
  font-size:12px !important;
  font-weight:900 !important;
}

/* ===== TABLET ===== */
@media (min-width:701px) and (max-width:1099px) {
  body[data-page="league-view"] .league-shell,
  body[data-page="tournament-view"] .tournament-page .league-shell {
    width:calc(100vw - 28px) !important;
    max-width:none !important;
  }

  body[data-page="league-view"] .tfp-manager--league .league-general-points-grid {
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}

/* ===== MOBILE: zachowaj obecny układ, tylko klasyfikacja i punktacja czytelniej ===== */
@media (max-width:700px) {
  body[data-page="league-view"] #general .league-general-kpis {
    grid-template-columns:1fr !important;
    gap:8px !important;
  }

  body[data-page="league-view"] #general .league-general-kpi {
    grid-template-columns:38px minmax(0,1fr) !important;
    min-height:74px !important;
    padding:11px 12px !important;
    border-radius:10px !important;
  }

  body[data-page="league-view"] #general .league-general-kpi__icon {
    width:36px !important;
    height:36px !important;
    border-radius:9px !important;
  }

  body[data-page="league-view"] #general .league-general-kpi strong,
  body[data-page="league-view"] #general .league-general-kpi strong a {
    font-size:19px !important;
  }

  body[data-page="league-view"] #general .league-general-ranking-card {
    border-radius:10px !important;
  }

  body[data-page="league-view"] #general .league-general-ranking-card__head {
    min-height:50px !important;
    padding:0 12px !important;
  }

  body[data-page="league-view"] #general table.league-general-table {
    min-width:760px !important;
  }

  body[data-page="league-view"] .tfp-manager--league .league-general-points-grid {
    grid-template-columns:1fr !important;
    gap:10px !important;
  }

  body[data-page="league-view"] .tfp-manager--league .league-general-points-fields {
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }

  body[data-page="league-view"] .tfp-manager--league [data-manager-panel="points"] .league-save-btn {
    width:100% !important;
    min-width:0 !important;
  }
}


/* =====================================================================
   TFP 2026-09-25 — MANAGER CONTRAST + INPUT FIT FINAL
   Naprawia jasny tekst na jasnym tle i ciasne pola w Zarządzaniu ligą.
   competition-ui.css ładuje się po manager CSS, więc te reguły mają priorytet.
   ===================================================================== */

/* ===== MODUŁY MANAGERA: ZAWSZE GRANATOWE TŁO + BIAŁY TEKST ===== */
body[data-page="league-view"] .tfp-manager--league .tfp-module-hero {
  background:
    radial-gradient(circle at 100% 0%, rgba(31,105,150,.17), transparent 34%),
    linear-gradient(135deg,#061d3a 0%,#082b59 68%,#0a355f 100%) !important;
  border:1px solid rgba(8,43,89,.16) !important;
  box-shadow:0 8px 22px rgba(6,29,58,.08) !important;
}

body[data-page="league-view"] .tfp-manager--league .tfp-module-hero span {
  color:#cdddf0 !important;
  opacity:1 !important;
}

body[data-page="league-view"] .tfp-manager--league .tfp-module-hero h3 {
  color:#ffffff !important;
  opacity:1 !important;
  text-shadow:none !important;
}

body[data-page="league-view"] .tfp-manager--league .tfp-module-hero p {
  color:#d3dfec !important;
  opacity:1 !important;
}

body[data-page="league-view"] .tfp-manager--league .tfp-module-hero strong {
  color:#073456 !important;
  background:#dceaf5 !important;
  border:1px solid #bfd7e8 !important;
  opacity:1 !important;
}

/* ===== BIAŁE KARTY: ZAWSZE CIEMNY TEKST ===== */
body[data-page="league-view"] .tfp-manager--league .tfp-admin-card:not(.tfp-module-hero),
body[data-page="league-view"] .tfp-manager--league .tfp-group-card,
body[data-page="league-view"] .tfp-manager--league .tfp-group-card--clean {
  color:#0b1f38 !important;
}

body[data-page="league-view"] .tfp-manager--league .tfp-admin-card:not(.tfp-module-hero) h3,
body[data-page="league-view"] .tfp-manager--league .tfp-admin-card:not(.tfp-module-hero) h4,
body[data-page="league-view"] .tfp-manager--league .tfp-group-card h3,
body[data-page="league-view"] .tfp-manager--league .tfp-group-card h4 {
  color:#0b1f38 !important;
}

body[data-page="league-view"] .tfp-manager--league .tfp-admin-card:not(.tfp-module-hero) p,
body[data-page="league-view"] .tfp-manager--league .tfp-group-card p {
  color:#53667c !important;
  opacity:1 !important;
}

body[data-page="league-view"] .tfp-manager--league .tfp-admin-card:not(.tfp-module-hero) span,
body[data-page="league-view"] .tfp-manager--league .tfp-group-card__top span,
body[data-page="league-view"] .tfp-manager--league label span {
  color:#4f647b !important;
  opacity:1 !important;
}

/* Liczniki na jasnym tle */
body[data-page="league-view"] .tfp-manager--league .tfp-group-card__top strong {
  color:#083b63 !important;
  background:#d9eaf5 !important;
  border:1px solid #bfd9e9 !important;
  opacity:1 !important;
}

/* ===== INPUTY / SELECTY — PEŁNA SZEROKOŚĆ I CZYTELNY TEKST ===== */
body[data-page="league-view"] .tfp-manager--league input:not([type="hidden"]):not([type="color"]):not([type="checkbox"]):not([type="radio"]),
body[data-page="league-view"] .tfp-manager--league select,
body[data-page="league-view"] .tfp-manager--league textarea {
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  box-sizing:border-box !important;
  color:#10233d !important;
  background:#ffffff !important;
  border:1.5px solid #b8c8d8 !important;
  font-weight:800 !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}

body[data-page="league-view"] .tfp-manager--league input::placeholder,
body[data-page="league-view"] .tfp-manager--league textarea::placeholder {
  color:#718195 !important;
  opacity:1 !important;
  font-weight:700 !important;
}

/* Label nie może zwężać inputa */
body[data-page="league-view"] .tfp-manager--league form label {
  min-width:0 !important;
  max-width:none !important;
  width:100% !important;
}

/* ===== DODAJ PUSTĄ GRUPĘ — pierwszy input ma dostać większość miejsca ===== */
@media (min-width:1100px) {
  body[data-page="league-view"] .tfp-manager--league .tfp-group-create-form {
    display:grid !important;
    grid-template-columns:minmax(360px,1fr) 48px 150px !important;
    gap:10px !important;
    align-items:end !important;
    width:100% !important;
  }

  body[data-page="league-view"] .tfp-manager--league .tfp-group-create-form > label:first-of-type {
    min-width:0 !important;
    width:100% !important;
  }

  body[data-page="league-view"] .tfp-manager--league .tfp-group-create-form input[type="text"] {
    min-height:40px !important;
    height:40px !important;
    padding:0 12px !important;
    font-size:12px !important;
    line-height:38px !important;
  }

  body[data-page="league-view"] .tfp-manager--league .tfp-group-create-form input[type="text"]::placeholder {
    font-size:11.5px !important;
  }

  body[data-page="league-view"] .tfp-manager--league .tfp-group-create-form .league-save-btn {
    min-height:40px !important;
    height:40px !important;
    padding:0 16px !important;
    white-space:normal !important;
    line-height:1.1 !important;
  }

  /* ===== EDYCJA NAZWY GRUPY — input nie ściska się przez przyciski ===== */
  body[data-page="league-view"] .tfp-manager--league .tfp-group-inline-form {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) 46px 68px !important;
    gap:7px !important;
    width:100% !important;
    align-items:end !important;
  }

  body[data-page="league-view"] .tfp-manager--league .tfp-group-inline-form > label:first-of-type {
    min-width:0 !important;
    width:100% !important;
  }

  body[data-page="league-view"] .tfp-manager--league .tfp-group-inline-form input[type="text"] {
    min-height:36px !important;
    height:36px !important;
    padding:0 10px !important;
    font-size:11.5px !important;
    line-height:34px !important;
  }

  body[data-page="league-view"] .tfp-manager--league .tfp-group-inline-form .league-save-btn {
    min-height:36px !important;
    height:36px !important;
    padding:0 9px !important;
    white-space:nowrap !important;
    font-size:10.5px !important;
  }
}

/* ===== KARTY GRUP: NA DUŻYM DESKTOPIE 4 KOLUMNY, ALE NIE ZA WĄSKIE ===== */
@media (min-width:1450px) {
  body[data-page="league-view"] .tfp-manager--league .tfp-group-cards,
  body[data-page="league-view"] .tfp-manager--league .tfp-group-cards--admin {
    grid-template-columns:repeat(4,minmax(270px,1fr)) !important;
    gap:10px !important;
  }
}

@media (min-width:1100px) and (max-width:1449px) {
  body[data-page="league-view"] .tfp-manager--league .tfp-group-cards,
  body[data-page="league-view"] .tfp-manager--league .tfp-group-cards--admin {
    grid-template-columns:repeat(3,minmax(280px,1fr)) !important;
    gap:10px !important;
  }
}

/* Zawodnicy w kartach — nigdy biały tekst na białym tle */
body[data-page="league-view"] .tfp-manager--league .tfp-player-chip-row,
body[data-page="league-view"] .tfp-manager--league .tfp-player-chip-row span {
  color:#14283f !important;
}

body[data-page="league-view"] .tfp-manager--league .tfp-player-chip-row span {
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}

/* Hint na dole karty */
body[data-page="league-view"] .tfp-manager--league .tfp-group-delete-hint,
body[data-page="league-view"] .tfp-manager--league .tfp-group-empty {
  color:#5d7086 !important;
  background:#f1f5f9 !important;
  opacity:1 !important;
}

/* ===== MOBILE — inputy mają się mieścić i nie ściskać ===== */
@media (max-width:760px) {
  body[data-page="league-view"] .tfp-manager--league .tfp-group-create-form {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) 48px !important;
    gap:8px !important;
  }

  body[data-page="league-view"] .tfp-manager--league .tfp-group-create-form > label:first-of-type {
    grid-column:1 / -1 !important;
  }

  body[data-page="league-view"] .tfp-manager--league .tfp-group-create-form .league-save-btn {
    min-height:42px !important;
    height:auto !important;
    padding:8px 10px !important;
    white-space:normal !important;
    line-height:1.1 !important;
  }

  body[data-page="league-view"] .tfp-manager--league .tfp-group-inline-form {
    grid-template-columns:minmax(0,1fr) 48px 84px !important;
    gap:7px !important;
  }

  body[data-page="league-view"] .tfp-manager--league input:not([type="hidden"]):not([type="color"]):not([type="checkbox"]):not([type="radio"]),
  body[data-page="league-view"] .tfp-manager--league select {
    min-height:44px !important;
    height:44px !important;
    padding:0 12px !important;
    font-size:14px !important;
    line-height:42px !important;
  }

  body[data-page="league-view"] .tfp-manager--league input::placeholder {
    font-size:13px !important;
  }
}


/* =========================================================
   TFP FINAL HOTFIX — manager contrast 2026-09-25
   Direct #manage selectors so light-on-light cannot return.
   ========================================================= */
body[data-page="league-view"] #manage .tfp-admin-card.tfp-module-hero,
body[data-page="league-view"] #manage .tfp-module-hero {
  background:linear-gradient(135deg,#061d3a 0%,#082b59 70%,#0a355f 100%) !important;
  border-color:#123f69 !important;
  color:#fff !important;
}
body[data-page="league-view"] #manage .tfp-module-hero span {
  color:#bfd0e2 !important;
  opacity:1 !important;
}
body[data-page="league-view"] #manage .tfp-module-hero h3 {
  color:#fff !important;
  opacity:1 !important;
}
body[data-page="league-view"] #manage .tfp-module-hero p {
  color:#d5e1ed !important;
  opacity:1 !important;
}
body[data-page="league-view"] #manage .tfp-module-hero strong {
  color:#083653 !important;
  background:#dcecf6 !important;
  border-color:#c3ddeb !important;
  opacity:1 !important;
}
body[data-page="league-view"] #manage .tfp-admin-card:not(.tfp-module-hero),
body[data-page="league-view"] #manage .tfp-group-card {
  color:#0b1f38 !important;
  background:#fff !important;
}
body[data-page="league-view"] #manage .tfp-admin-card:not(.tfp-module-hero) h3,
body[data-page="league-view"] #manage .tfp-admin-card:not(.tfp-module-hero) h4,
body[data-page="league-view"] #manage .tfp-group-card h3,
body[data-page="league-view"] #manage .tfp-group-card h4 {
  color:#0b1f38 !important;
}
body[data-page="league-view"] #manage .tfp-admin-card:not(.tfp-module-hero) p,
body[data-page="league-view"] #manage .tfp-group-card p,
body[data-page="league-view"] #manage .tfp-group-delete-hint {
  color:#52677e !important;
  opacity:1 !important;
}
body[data-page="league-view"] #manage .tfp-admin-card:not(.tfp-module-hero) span,
body[data-page="league-view"] #manage .tfp-group-card span,
body[data-page="league-view"] #manage label span {
  opacity:1 !important;
}
body[data-page="league-view"] #manage .tfp-admin-card__head > div > span,
body[data-page="league-view"] #manage .tfp-group-card__top > div > span {
  color:#587087 !important;
}
body[data-page="league-view"] #manage input:not([type="color"]):not([type="checkbox"]):not([type="radio"]),
body[data-page="league-view"] #manage select,
body[data-page="league-view"] #manage textarea {
  color:#10233d !important;
  background:#fff !important;
}
body[data-page="league-view"] #manage input::placeholder,
body[data-page="league-view"] #manage textarea::placeholder {
  color:#718297 !important;
  opacity:1 !important;
}

/* Match cards: opposing pairs in one row, with a separate recorded-result strip. */
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-editor {
  --result-navy:#19394c; --result-line:#d9e5ee;
  display:grid; gap:9px; min-width:0; color:var(--result-navy); font-size:13px; line-height:1.4;
}
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-editor *,
body:is([data-page="league-view"], [data-page="tournament-view"]) .league-page #matches .tfp-result-card * { box-sizing:border-box; }
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-editor [hidden] { display:none !important; }
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-types {
  display:grid !important; grid-template-columns:repeat(3,minmax(0,1fr)); gap:3px; min-width:0;
  margin:0 !important; padding:3px !important; border:1px solid #d9e5ee !important; border-radius:8px !important; background:#f6f9fc !important;
}
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-types label { position:relative; min-width:0; margin:0 !important; cursor:pointer; }
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-types input,
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-sr {
  position:absolute !important; width:1px !important; height:1px !important; padding:0 !important; margin:-1px !important;
  overflow:hidden !important; clip:rect(0,0,0,0); white-space:nowrap; border:0 !important;
}
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-types label span {
  display:flex !important; align-items:center; justify-content:center; min-height:38px; padding:5px 4px; border-radius:5px;
  color:#24445d !important; background:transparent !important; font-size:12px !important; font-weight:500 !important;
  text-align:center; white-space:normal !important; line-height:1.3; opacity:1 !important; -webkit-text-fill-color:currentColor !important;
}
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-types input:checked + span { background:#e8f4ed !important; color:#087747 !important; box-shadow:none !important; }
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-types input[value="walkover"]:checked + span { background:#f0eaf8 !important; color:#624780 !important; }
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-types input[value="retirement"]:checked + span { background:#fff3d9 !important; color:#774916 !important; }
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-types input:focus-visible + span { outline:2px solid #247dcc; outline-offset:2px; }
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-withdrawal { display:grid; gap:5px; min-width:0; }
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-editor label { font-size:12px !important; font-weight:500 !important; color:#28465e !important; }
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-editor select,
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-editor input[type="number"] {
  display:block; width:100% !important; max-width:100% !important; min-width:0 !important; height:40px !important;
  margin:0 !important; padding:6px !important; border:1px solid #ccdae6 !important; border-radius:6px !important;
  background:#fff !important; color:#19394c !important; font-family:inherit !important; font-size:16px !important; font-weight:400 !important;
  box-shadow:none !important; line-height:1.3 !important; text-overflow:ellipsis;
}
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-editor select:focus,
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-editor input[type="number"]:focus { outline:2px solid #247dcc !important; outline-offset:1px; }
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-editor input[type="number"] { padding:4px !important; text-align:center; appearance:textfield; -moz-appearance:textfield; }
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-editor input::-webkit-inner-spin-button { appearance:none; }
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-scores { display:grid; gap:5px; min-width:0; }
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-order,
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-note { color:#455d73 !important; font-size:12px !important; line-height:1.4; font-weight:400 !important; }
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-set-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; min-width:0; }
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-set { display:grid; gap:5px; min-width:0; align-content:start; }
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-set label { display:flex; align-items:flex-end; min-height:16px; white-space:normal; font-size:11px !important; line-height:1.3; }
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-custom { display:grid; grid-template-columns:minmax(0,1fr) 7px minmax(0,1fr); gap:3px; align-items:center; min-width:0; }
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-custom > span { text-align:center; font-weight:400 !important; color:#19394c !important; }

body:is([data-page="league-view"], [data-page="tournament-view"]) .league-page #matches .league-matches-grid {
  display:grid !important; grid-template-columns:minmax(0,1fr) !important; gap:16px !important;
  align-items:start !important; align-content:start !important; grid-auto-rows:auto !important; min-height:0 !important; height:auto !important;
}
@media (min-width:760px) {
  body:is([data-page="league-view"], [data-page="tournament-view"]) .league-page #matches .league-matches-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
}
@media (min-width:1120px) {
  body:is([data-page="league-view"], [data-page="tournament-view"]) .league-page #matches .league-matches-grid { grid-template-columns:repeat(3,minmax(0,1fr)) !important; }
}
body:is([data-page="league-view"], [data-page="tournament-view"]) .league-page #matches .league-match-card.tfp-result-card {
  display:block !important; width:auto !important; min-width:0 !important; min-height:0 !important; height:auto !important;
  margin:0 !important; padding:14px !important; border:1px solid #d6e0e9 !important; border-radius:8px !important;
  background:#fff !important; box-shadow:none !important;
}
body:is([data-page="league-view"], [data-page="tournament-view"]) .league-page #matches .league-match-card.tfp-result-card[hidden] { display:none !important; }
body:is([data-page="league-view"], [data-page="tournament-view"]) .league-page #matches .tfp-result-card .league-match-top { margin:0 0 8px !important; gap:7px !important; flex-wrap:wrap !important; }
body:is([data-page="league-view"], [data-page="tournament-view"]) .league-page #matches .tfp-result-card .league-badge { font-size:11px !important; font-weight:500 !important; line-height:1.3 !important; padding:4px 6px !important; height:auto !important; }
body:is([data-page="league-view"], [data-page="tournament-view"]) .league-page #matches .tfp-result-card .league-panel-link { min-height:26px !important; height:auto !important; padding:4px 7px !important; font-size:11px !important; font-weight:500 !important; line-height:1.3 !important; color:#174b64 !important; background:#eef7fb !important; }
body:is([data-page="league-view"], [data-page="tournament-view"]) .league-page #matches .tfp-result-card .tfp-result-status.ok { background:#eaf5ee !important; color:#087747 !important; border-color:#c9e3d3 !important; }
body:is([data-page="league-view"], [data-page="tournament-view"]) .league-page #matches .tfp-result-card .tfp-result-status.pending { background:#fff5de !important; color:#7d5b0b !important; border-color:#eddfb9 !important; }
body:is([data-page="league-view"], [data-page="tournament-view"]) .league-page #matches .tfp-result-card .tfp-result-status--walkover.ok { background:#f4effa !important; color:#624780 !important; border-color:#ded3eb !important; }
body:is([data-page="league-view"], [data-page="tournament-view"]) .league-page #matches .tfp-result-card .tfp-result-status--retirement.ok { background:#fff6df !important; color:#86531c !important; border-color:#eed9a8 !important; }

/* These rules also cover the match editor opened from the tournament draw. */
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(.league-page #matches .tfp-result-card, .tournament-match-card-pro) .league-match-players-row {
  display:grid !important; grid-template-columns:minmax(0,1fr) 20px minmax(0,1fr) !important;
  align-items:center !important; gap:6px !important; min-width:0 !important; margin:0 0 10px !important;
}
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(.league-page #matches .tfp-result-card, .tournament-match-card-pro) .league-match-player {
  display:flex !important; align-items:center !important; justify-content:center !important;
  width:auto !important; min-width:0 !important; min-height:48px !important; height:auto !important;
  margin:0 !important; padding:4px 0 !important; border:0 !important; border-radius:0 !important; background:transparent !important;
  box-shadow:none !important; text-align:left !important; overflow:visible !important; opacity:1 !important; color:#19394c !important;
}
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(.league-page #matches .tfp-result-card, .tournament-match-card-pro) .league-match-player strong,
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(.league-page #matches .tfp-result-card, .tournament-match-card-pro) .league-match-player strong * {
  font-family:inherit !important; font-size:14px !important; font-weight:500 !important; line-height:20px !important;
  letter-spacing:0 !important; text-transform:none !important; white-space:normal !important; overflow-wrap:anywhere !important;
  width:auto !important; min-width:0 !important; max-width:100% !important; height:auto !important; max-height:none !important;
  overflow:visible !important; text-overflow:clip !important; text-align:left !important; color:#19394c !important; opacity:1 !important; -webkit-text-fill-color:currentColor !important;
}
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(.league-page #matches .tfp-result-card, .tournament-match-card-pro) .league-match-player strong { display:block !important; flex:0 1 auto !important; width:fit-content !important; min-width:0 !important; margin:0 !important; overflow:visible !important; }
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(.league-page #matches .tfp-result-card, .tournament-match-card-pro) .league-match-player .tfp-pair-stack { display:grid !important; justify-items:start !important; gap:0 !important; min-width:0 !important; }
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(.league-page #matches .tfp-result-card, .tournament-match-card-pro) .league-match-player .tfp-pair-member { display:block !important; min-width:0 !important; }
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(.league-page #matches .tfp-result-card, .tournament-match-card-pro) .league-match-player :is(a, .tfp-player-link) { display:inline !important; }
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(.league-page #matches .tfp-result-card, .tournament-match-card-pro) .league-match-player.is-win strong,
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(.league-page #matches .tfp-result-card, .tournament-match-card-pro) .league-match-player.is-win strong * { color:#087747 !important; }
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(.league-page #matches .tfp-result-card, .tournament-match-card-pro) .league-dot { display:none !important; }
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(.league-page #matches .tfp-result-card, .tournament-match-card-pro) .league-match-vs {
  display:grid !important; place-items:center; align-self:center !important; justify-self:center !important; width:20px !important; height:20px !important;
  padding:0 !important; border:0 !important; border-radius:0 !important; background:transparent !important; color:#637787 !important;
  font-size:11px !important; font-weight:500 !important; line-height:20px !important; text-transform:uppercase;
}

body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-board {
  display:grid !important; grid-template-columns:repeat(var(--tfp-result-columns,1),minmax(0,1fr)) !important; align-items:start !important;
  gap:0 !important; min-width:0 !important; margin:0 0 10px !important; padding:8px 0 !important;
  border:1px solid #dce6ef !important; border-radius:6px !important; background:#f5f8fc !important; box-shadow:none !important;
}
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-cell { display:grid; justify-items:center; gap:4px; min-width:0; padding:0 4px; text-align:center; }
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-cell + .tfp-result-cell { border-left:1px solid #dce6ef; }
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-cell-label {
  color:#526b7e !important; font-size:11px !important; font-weight:400 !important; line-height:15px !important; white-space:normal !important;
}
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-cell-score {
  display:block; min-width:0; padding:1px 6px; color:#19394c !important; font-size:16px !important; font-weight:550 !important;
  font-variant-numeric:tabular-nums; letter-spacing:0 !important; line-height:22px !important; white-space:nowrap !important;
}
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-cell--total .tfp-result-cell-score { border-radius:4px; background:#e4f1e8 !important; color:#087747 !important; }
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-ending {
  grid-column:1 / -1; padding:0 8px; color:#624780 !important; font-size:13px !important; font-weight:500 !important; line-height:20px !important; text-align:center;
}
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-board--retirement .tfp-result-ending { color:#86531c !important; }
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-cell--status .tfp-result-ending { padding:1px 4px; border-radius:4px; background:#fff1d6 !important; font-size:12px !important; line-height:22px !important; white-space:nowrap !important; }
body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-no-sets { padding:6px 0 !important; }

body:is([data-page="league-view"], [data-page="tournament-view"]) .league-page #matches .tfp-result-card .league-match-actions { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:8px !important; margin-top:10px !important; }
body:is([data-page="league-view"], [data-page="tournament-view"]) .league-page #matches .tfp-result-card .league-match-actions > * { min-width:0 !important; width:100% !important; margin:0 !important; }
body:is([data-page="league-view"], [data-page="tournament-view"]) .league-page #matches .tfp-result-card:not(.is-played) .league-match-actions > .league-save-btn { grid-column:1 / -1; }
body:is([data-page="league-view"], [data-page="tournament-view"]) .league-page #matches .tfp-result-card .league-match-actions button {
  min-height:44px !important; height:auto !important; padding:8px !important; font-family:inherit !important; font-size:13px !important; font-weight:500 !important;
  line-height:1.3 !important; border-radius:6px !important; box-shadow:none !important; white-space:normal !important;
}
body:is([data-page="league-view"], [data-page="tournament-view"]) .league-page #matches .tfp-result-card .league-match-actions .league-save-btn { background:#07865e !important; color:#fff !important; }
body:is([data-page="league-view"], [data-page="tournament-view"]) .league-page #matches .tfp-result-card .league-match-actions .league-edit-result-btn { background:#fff !important; color:#19394c !important; border:1px solid #d1dfe9 !important; }
body:is([data-page="league-view"], [data-page="tournament-view"]) .league-page #matches .tfp-result-card .league-match-actions .league-cancel-btn { background:#0c3349 !important; color:#fff !important; }
body:is([data-page="league-view"], [data-page="tournament-view"]) .league-page #matches .tfp-result-card .league-match-actions button span { color:inherit !important; font-size:inherit !important; font-weight:inherit !important; -webkit-text-fill-color:currentColor !important; }
body:is([data-page="league-view"], [data-page="tournament-view"]) .league-page #matches .tfp-result-card .league-match-actions button:focus-visible { outline:2px solid #247dcc !important; outline-offset:2px; }
body:is([data-page="league-view"], [data-page="tournament-view"]) .league-page #matches .tfp-result-card .league-save-btn:disabled { opacity:.65; cursor:wait; }
@media (max-width:359px) {
  body:is([data-page="league-view"], [data-page="tournament-view"]) .league-page #matches .league-match-card.tfp-result-card { padding:10px !important; }
  body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-types label span { font-size:11px !important; }
  body:is([data-page="league-view"], [data-page="tournament-view"]) :is(#matches, #bracket, .tournament-match-card-pro) .tfp-result-set-grid { gap:5px; }
}

/* Results matrix: hovering a row must preserve each recorded-result colour. */
body:is([data-page="league-view"], [data-page="tournament-view"]) .league-page #results .league-results-matrix tbody tr {
  --tfp-results-row-colour:transparent;
}
body:is([data-page="league-view"], [data-page="tournament-view"]) .league-page #results .league-results-matrix tbody tr:nth-child(even) {
  --tfp-results-row-colour:#f7fbff;
}
body:is([data-page="league-view"], [data-page="tournament-view"]) .league-page #results .league-results-matrix tbody td {
  --tfp-results-hover-image:none;
  --tfp-results-hover-colour:var(--tfp-results-row-colour,transparent);
  --tfp-results-hover-shadow:none;
}
body:is([data-page="league-view"], [data-page="tournament-view"]) .league-page #results .league-results-matrix tbody .league-results-cell:is(.is-empty,.league-results-cell--self) {
  --tfp-results-hover-colour:#f4f7fb;
}
body[data-page="league-view"] .league-page #results .league-results-matrix tbody tr:nth-child(even) .league-results-cell.is-empty {
  --tfp-results-hover-colour:#f7fbff;
}
body:is([data-page="league-view"], [data-page="tournament-view"]) .league-page #results .league-results-matrix tbody .league-results-player {
  --tfp-results-hover-image:linear-gradient(90deg,#ffffff 0%,#f6faff 100%);
  --tfp-results-hover-colour:var(--tfp-results-row-colour,transparent);
  --tfp-results-hover-shadow:12px 0 24px rgba(15,23,42,0.07);
}
body[data-page="tournament-view"] .league-page #results .league-results-matrix tbody tr {
  --tfp-results-row-colour:#fff;
}
body[data-page="tournament-view"] .league-page #results .league-results-matrix tbody tr:nth-child(even) {
  --tfp-results-row-colour:#f7fafd;
}
body[data-page="tournament-view"] .league-page #results .league-results-matrix tbody .league-results-cell:is(.is-empty,.league-results-cell--self) {
  --tfp-results-hover-colour:var(--tfp-results-row-colour,#fff);
}
body[data-page="tournament-view"] .league-page #results .league-results-matrix tbody .league-results-player {
  --tfp-results-hover-image:none;
  --tfp-results-hover-colour:#eef3f8;
}
body:is([data-page="league-view"], [data-page="tournament-view"]) .league-page #results .league-results-matrix tbody .league-results-cell.is-win {
  --tfp-results-hover-image:linear-gradient(180deg,#dcfce7 0%,#c8f7db 100%);
  --tfp-results-hover-colour:transparent;
  --tfp-results-hover-shadow:inset 0 0 0 1px rgba(16,185,129,0.13);
}
body:is([data-page="league-view"], [data-page="tournament-view"]) .league-page #results .league-results-matrix tbody .league-results-cell.is-loss {
  --tfp-results-hover-image:linear-gradient(180deg,#ffe4e6 0%,#ffd5db 100%);
  --tfp-results-hover-colour:transparent;
  --tfp-results-hover-shadow:inset 0 0 0 1px rgba(244,63,94,0.13);
}
body:is([data-page="league-view"], [data-page="tournament-view"]) .league-page #results .league-results-matrix tbody tr:hover :is(td,.league-results-player) {
  background:var(--tfp-results-hover-image,none) var(--tfp-results-hover-colour,transparent) !important;
  box-shadow:var(--tfp-results-hover-shadow,none) !important;
}
