/* =========================================================
   TennisFinalsPro — Tournament Creator Dark Premium
   Cel: dokładnie ten sam język wizualny co aktualny kreator ligi.
   Tylko warstwa UI; bez zmian logiki formularzy.
========================================================= */

body[data-page^="tournament-creator-step-"] {
  --tc-ink:#10213a;
  --tc-muted:#77879a;
  --tc-line:#d8e2ec;
  --tc-blue:#2389e9;
  --tc-cyan:#69c8ff;
  background:#06131f!important;
  overflow-x:hidden!important;
}

body[data-page^="tournament-creator-step-"] main.league-creator-page {
  min-height:calc(100vh - var(--tfp-header-fixed-height,72px))!important;
  padding:26px 0 72px!important;
  background:
    radial-gradient(circle at 82% 16%,rgba(24,183,220,.13),transparent 26%),
    radial-gradient(circle at 12% 35%,rgba(27,103,238,.13),transparent 32%),
    linear-gradient(180deg,#06131f 0%,#071b2b 54%,#061625 100%)!important;
}

body[data-page^="tournament-creator-step-"] .league-creator-hero { background:transparent!important; }
body[data-page^="tournament-creator-step-"] .league-creator-hero>.container {
  width:min(1180px,calc(100% - 40px))!important;
  max-width:1180px!important;
  margin:0 auto!important;
  padding:0!important;
}
body[data-page^="tournament-creator-step-"] .league-creator-shell { max-width:none!important;margin:0!important; }

body[data-page^="tournament-creator-step-"] .league-creator-topbar {
  display:grid!important;
  grid-template-columns:auto minmax(280px,420px)!important;
  justify-content:space-between!important;
  align-items:center!important;
  gap:28px!important;
  margin:0 0 24px!important;
}
body[data-page^="tournament-creator-step-"] .league-creator-back {
  min-height:38px!important;
  padding:0 14px!important;
  display:inline-flex!important;
  align-items:center!important;
  border:1px solid rgba(111,184,255,.26)!important;
  border-radius:10px!important;
  background:rgba(6,28,46,.70)!important;
  color:#dcecff!important;
  font-size:12px!important;
  font-weight:700!important;
  text-decoration:none!important;
  box-shadow:none!important;
}
body[data-page^="tournament-creator-step-"] .league-creator-back:hover { background:#0e2b42!important;border-color:#4e98d1!important; }
body[data-page^="tournament-creator-step-"] .league-creator-step { gap:8px!important; }
body[data-page^="tournament-creator-step-"] .league-creator-step__label {
  color:#91b3cf!important;
  font-size:10px!important;
  font-weight:800!important;
  letter-spacing:.14em!important;
  text-align:left!important;
}
body[data-page^="tournament-creator-step-"] .league-creator-progress {
  height:5px!important;
  border-radius:999px!important;
  background:#173247!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.025)!important;
}
body[data-page^="tournament-creator-step-"] .league-creator-progress span {
  background:linear-gradient(90deg,#2b79f6,#69c8ff,#6ce9da)!important;
  box-shadow:0 0 16px rgba(64,187,255,.32)!important;
}

body[data-page^="tournament-creator-step-"] .league-creator-grid {
  display:grid!important;
  grid-template-columns:minmax(260px,.68fr) minmax(0,1.65fr)!important;
  gap:32px!important;
  align-items:start!important;
}
body[data-page^="tournament-creator-step-"] .league-creator-intro.card-glass {
  position:sticky!important;
  top:calc(var(--tfp-header-fixed-height,72px) + 26px)!important;
  padding:30px 8px 20px 0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  backdrop-filter:none!important;
  box-shadow:none!important;
}
body[data-page^="tournament-creator-step-"] .league-creator-eyebrow {
  margin:0 0 14px!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  color:#6fb8ff!important;
  font-size:10px!important;
  font-weight:900!important;
  letter-spacing:.17em!important;
  text-transform:uppercase!important;
}
body[data-page^="tournament-creator-step-"] .league-creator-intro h1 {
  max-width:320px!important;
  margin:0 0 14px!important;
  color:#fff!important;
  font-size:clamp(30px,3vw,43px)!important;
  line-height:.98!important;
  font-weight:850!important;
  letter-spacing:-.055em!important;
}
body[data-page^="tournament-creator-step-"] .league-creator-intro p {
  max-width:335px!important;
  margin:0!important;
  color:#a9bfd2!important;
  font-size:13px!important;
  line-height:1.58!important;
  font-weight:500!important;
}
body[data-page^="tournament-creator-step-"] .league-creator-benefits { margin:22px 0 0!important;gap:9px!important; }
body[data-page^="tournament-creator-step-"] .league-creator-benefits li {
  padding-left:18px!important;
  color:#c9d9e7!important;
  font-size:11px!important;
  line-height:1.35!important;
  font-weight:650!important;
}
body[data-page^="tournament-creator-step-"] .league-creator-benefits li::before {
  top:5px!important;width:6px!important;height:6px!important;
  background:#58e3a6!important;
  box-shadow:0 0 10px rgba(88,227,166,.38)!important;
}

/* Główna biała karta — identyczna logika kontrastu jak w kreatorze ligi */
body[data-page^="tournament-creator-step-"] .league-creator-form-card {
  min-width:0!important;
  padding:22px!important;
  border:1px solid rgba(204,220,235,.86)!important;
  border-radius:18px!important;
  background:#fff!important;
  box-shadow:0 24px 70px rgba(0,0,0,.23)!important;
  backdrop-filter:none!important;
  color:var(--tc-ink)!important;
}
body[data-page^="tournament-creator-step-"] .league-settings-section {
  margin-bottom:15px!important;
  padding-bottom:14px!important;
  border-bottom:1px solid #e6edf4!important;
  background:transparent!important;
}
body[data-page^="tournament-creator-step-"] .league-settings-section:last-of-type { border-bottom:0!important;padding-bottom:0!important; }
body[data-page^="tournament-creator-step-"] .league-settings-section__header { margin-bottom:9px!important; }
body[data-page^="tournament-creator-step-"] .league-settings-section__header h3 {
  margin:0 0 3px!important;
  color:#10213d!important;
  font-size:14px!important;
  line-height:1.25!important;
  font-weight:850!important;
  letter-spacing:-.02em!important;
}
body[data-page^="tournament-creator-step-"] .league-settings-section__header p {
  margin:0!important;
  color:#75859a!important;
  font-size:10.5px!important;
  line-height:1.4!important;
  font-weight:500!important;
}

body[data-page^="tournament-creator-step-"] .league-form__grid { gap:12px!important; }
body[data-page^="tournament-creator-step-"] .league-form__grid--two { grid-template-columns:repeat(2,minmax(0,1fr))!important; }
body[data-page^="tournament-creator-step-"] .league-form__grid--three { grid-template-columns:repeat(3,minmax(0,1fr))!important; }
body[data-page^="tournament-creator-step-"] .league-form__field { min-width:0!important;margin:0 0 14px!important; }
body[data-page^="tournament-creator-step-"] .league-form__field label,
body[data-page^="tournament-creator-step-"] .league-form__field>label:first-child {
  display:block!important;
  margin:0 0 7px!important;
  color:#11233d!important;
  font-size:11px!important;
  line-height:1.25!important;
  font-weight:800!important;
}
body[data-page^="tournament-creator-step-"] .league-form__field small,
body[data-page^="tournament-creator-step-"] .tfp-player-search-help,
body[data-page^="tournament-creator-step-"] .field-help {
  margin-top:6px!important;
  color:#77879a!important;
  font-size:9.5px!important;
  line-height:1.4!important;
  font-weight:500!important;
}
body[data-page^="tournament-creator-step-"] .league-form__field input:not([type="checkbox"]):not([type="radio"]),
body[data-page^="tournament-creator-step-"] .league-form__field select,
body[data-page^="tournament-creator-step-"] .league-form__field textarea,
body[data-page^="tournament-creator-step-"] .manual-pair-select,
body[data-page^="tournament-creator-step-"] .league-creator-form-card input[type="text"],
body[data-page^="tournament-creator-step-"] .league-creator-form-card input[type="number"],
body[data-page^="tournament-creator-step-"] .league-creator-form-card input[type="email"],
body[data-page^="tournament-creator-step-"] .league-creator-form-card input[type="date"],
body[data-page^="tournament-creator-step-"] .league-creator-form-card input[type="time"],
body[data-page^="tournament-creator-step-"] .league-creator-form-card input[type="datetime-local"],
body[data-page^="tournament-creator-step-"] .league-creator-form-card select {
  width:100%!important;
  min-height:42px!important;
  height:42px!important;
  padding:0 12px!important;
  border:1px solid #d8e2ec!important;
  border-radius:11px!important;
  background:#fbfdff!important;
  color:#10213a!important;
  font-size:12px!important;
  line-height:1!important;
  font-weight:650!important;
  outline:none!important;
  box-shadow:none!important;
}
body[data-page^="tournament-creator-step-"] .league-form__field textarea {
  height:auto!important;min-height:82px!important;padding:11px 12px!important;line-height:1.45!important;resize:vertical!important;
}
body[data-page^="tournament-creator-step-"] .league-form__field input:focus,
body[data-page^="tournament-creator-step-"] .league-form__field select:focus,
body[data-page^="tournament-creator-step-"] .league-form__field textarea:focus,
body[data-page^="tournament-creator-step-"] .manual-pair-select:focus {
  border-color:#2389e9!important;
  background:#fff!important;
  box-shadow:0 0 0 3px rgba(35,137,233,.11)!important;
}

/* Karty wyboru */
body[data-page^="tournament-creator-step-"] .league-choice-grid { gap:9px!important; }
body[data-page^="tournament-creator-step-"] .league-choice-card {
  min-width:0!important;
  min-height:66px!important;
  display:grid!important;
  grid-template-columns:auto 1fr!important;
  grid-template-rows:auto auto!important;
  column-gap:10px!important;
  row-gap:2px!important;
  align-items:center!important;
  padding:11px 12px!important;
  border:1px solid #e0e8f0!important;
  border-radius:11px!important;
  background:#fff!important;
  box-shadow:none!important;
  transform:none!important;
}
body[data-page^="tournament-creator-step-"] .league-choice-card:hover { border-color:#91bce6!important;background:#f8fbff!important;box-shadow:none!important;transform:none!important; }
body[data-page^="tournament-creator-step-"] .league-choice-card.is-active,
body[data-page^="tournament-creator-step-"] .league-choice-card:has(input:checked) {
  border-color:#2686df!important;
  background:#eef7ff!important;
  box-shadow:inset 0 0 0 1px rgba(38,134,223,.16)!important;
}
body[data-page^="tournament-creator-step-"] .league-choice-card__icon { grid-row:1/3!important;font-size:17px!important; }
body[data-page^="tournament-creator-step-"] .league-choice-card__title { color:#12243f!important;font-size:11.5px!important;font-weight:850!important; }
body[data-page^="tournament-creator-step-"] .league-choice-card__text { color:#7a8998!important;font-size:9px!important;line-height:1.35!important; }

/* Elementy specyficzne kolejnych kroków */
body[data-page^="tournament-creator-step-"] .league-summary-box,
body[data-page^="tournament-creator-step-"] .tournament-pairing-box,
body[data-page^="tournament-creator-step-"] .league-player-builder,
body[data-page^="tournament-creator-step-"] .league-players-list-wrap,
body[data-page^="tournament-creator-step-"] .league-draw-stage,
body[data-page^="tournament-creator-step-"] .league-group-column,
body[data-page^="tournament-creator-step-"] .tfp-quick-groups-bar {
  border:1px solid #dce6ef!important;
  background:#f8fbff!important;
  box-shadow:none!important;
}
body[data-page^="tournament-creator-step-"] .league-summary-box { padding:12px!important;border-radius:11px!important;background:#eef7ff!important;border-color:#d4e8fb!important; }
body[data-page^="tournament-creator-step-"] .league-summary-box__label { color:#1579e8!important; }
body[data-page^="tournament-creator-step-"] .league-summary-box__value { color:#1a3157!important; }
body[data-page^="tournament-creator-step-"] .tournament-pairing-box,
body[data-page^="tournament-creator-step-"] .league-player-builder,
body[data-page^="tournament-creator-step-"] .league-players-list-wrap,
body[data-page^="tournament-creator-step-"] .league-draw-stage,
body[data-page^="tournament-creator-step-"] .league-group-column { border-radius:12px!important; }
body[data-page^="tournament-creator-step-"] .tournament-pairing-box__title,
body[data-page^="tournament-creator-step-"] .league-players-list-header h3,
body[data-page^="tournament-creator-step-"] .league-group-column__header h3 { color:#10213d!important; }
body[data-page^="tournament-creator-step-"] .league-player-card,
body[data-page^="tournament-creator-step-"] .league-group-player { background:#fff!important;border-color:#e0e8f0!important;box-shadow:none!important; }
body[data-page^="tournament-creator-step-"] .league-player-card__name,
body[data-page^="tournament-creator-step-"] .league-group-player__name { color:#12243f!important; }

/* Step 3 pair mode */
body[data-page="tournament-creator-step-3"] .tfp-pairing-mode {
  padding:5px!important;border:1px solid #dce8f4!important;border-radius:12px!important;background:#eef6ff!important;
}
body[data-page="tournament-creator-step-3"] .tfp-pairing-mode__btn { color:#526b85!important;border-radius:9px!important; }
body[data-page="tournament-creator-step-3"] .tfp-pairing-mode__btn.is-active,
body[data-page="tournament-creator-step-3"] .tfp-pairing-mode__btn[aria-pressed="true"] { background:#fff!important;color:#146fda!important;box-shadow:0 3px 10px rgba(27,91,160,.10)!important; }

/* Step 4 error / draw cards */
body[data-page="tournament-creator-step-4"] .tournament-step4-errors { background:#fff5f5!important;border-color:#f3caca!important; }
body[data-page="tournament-creator-step-4"] .tournament-slot-board,
body[data-page="tournament-creator-step-4"] .tournament-slot-card { background:transparent!important; }

/* Step 7 kryteria */
body[data-page="tournament-creator-step-7"] .league-criteria-stack,
body[data-page="tournament-creator-step-7"] .league-criteria-card { background:transparent!important; }

/* CTA */
body[data-page^="tournament-creator-step-"] .league-form__actions {
  display:flex!important;
  justify-content:space-between!important;
  gap:10px!important;
  margin-top:16px!important;
}
body[data-page^="tournament-creator-step-"] .league-creator-submit,
body[data-page^="tournament-creator-step-"] .league-form__actions .btn--primary {
  min-height:44px!important;height:44px!important;padding:0 18px!important;
  border:0!important;border-radius:10px!important;
  background:linear-gradient(100deg,#1e6ff0,#149de5,#18b5d7)!important;
  color:#fff!important;font-size:11px!important;font-weight:850!important;
  box-shadow:0 9px 20px rgba(26,122,226,.20)!important;
}
body[data-page^="tournament-creator-step-"] .league-creator-secondary,
body[data-page^="tournament-creator-step-"] .league-form__actions .btn--ghost {
  min-height:44px!important;height:44px!important;padding:0 16px!important;
  border:1px solid #dbe4ed!important;border-radius:10px!important;
  background:#fff!important;color:#52657b!important;font-size:11px!important;font-weight:750!important;box-shadow:none!important;
}

@media (max-width:900px) {
  body[data-page^="tournament-creator-step-"] main.league-creator-page { padding:14px 0 44px!important; }
  body[data-page^="tournament-creator-step-"] .league-creator-hero>.container { width:calc(100% - 24px)!important; }
  body[data-page^="tournament-creator-step-"] .league-creator-topbar { grid-template-columns:auto minmax(150px,260px)!important;gap:14px!important;margin-bottom:16px!important; }
  body[data-page^="tournament-creator-step-"] .league-creator-grid { grid-template-columns:1fr!important;gap:14px!important; }
  body[data-page^="tournament-creator-step-"] .league-creator-intro.card-glass { position:static!important;padding:8px 2px 2px!important; }
  body[data-page^="tournament-creator-step-"] .league-creator-intro h1 { max-width:620px!important;font-size:31px!important; }
  body[data-page^="tournament-creator-step-"] .league-creator-intro p { max-width:620px!important; }
  body[data-page^="tournament-creator-step-"] .league-creator-benefits { display:flex!important;flex-wrap:wrap!important;gap:8px 16px!important;margin-top:14px!important; }
  body[data-page^="tournament-creator-step-"] .league-creator-form-card { padding:17px!important;border-radius:15px!important; }
}

/* Mobile — taka sama zwartość jak liga V4 */
@media (max-width:600px) {
  body[data-page^="tournament-creator-step-"] main.league-creator-page { padding:8px 0 24px!important; }
  body[data-page^="tournament-creator-step-"] .league-creator-hero>.container { width:calc(100% - 16px)!important; }
  body[data-page^="tournament-creator-step-"] .league-creator-topbar {
    grid-template-columns:82px 1fr!important;gap:10px!important;margin-bottom:10px!important;
  }
  body[data-page^="tournament-creator-step-"] .league-creator-back {
    min-height:34px!important;height:34px!important;padding:0 9px!important;border-radius:9px!important;font-size:9.5px!important;
  }
  body[data-page^="tournament-creator-step-"] .league-creator-step__label { font-size:8px!important; }
  body[data-page^="tournament-creator-step-"] .league-creator-intro.card-glass { padding:5px 2px 0!important; }
  body[data-page^="tournament-creator-step-"] .league-creator-eyebrow { margin-bottom:7px!important;font-size:8px!important; }
  body[data-page^="tournament-creator-step-"] .league-creator-intro h1 {
    max-width:350px!important;margin-bottom:7px!important;font-size:25px!important;line-height:1.02!important;
  }
  body[data-page^="tournament-creator-step-"] .league-creator-intro p { font-size:10.5px!important;line-height:1.4!important; }
  body[data-page^="tournament-creator-step-"] .league-creator-benefits { gap:4px!important;margin-top:9px!important; }
  body[data-page^="tournament-creator-step-"] .league-creator-benefits li { padding-left:15px!important;font-size:9px!important;line-height:1.3!important; }
  body[data-page^="tournament-creator-step-"] .league-creator-grid { gap:10px!important; }
  body[data-page^="tournament-creator-step-"] .league-creator-form-card { padding:10px!important;border-radius:12px!important; }
  body[data-page^="tournament-creator-step-"] .league-form__grid--two { grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important; }
  body[data-page^="tournament-creator-step-"] .league-form__grid--three { grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important; }
  body[data-page^="tournament-creator-step-"] .league-form__field { margin-bottom:9px!important;min-width:0!important; }
  body[data-page^="tournament-creator-step-"] .league-form__field label,
  body[data-page^="tournament-creator-step-"] .league-form__field>label:first-child { margin-bottom:4px!important;font-size:9.8px!important;line-height:1.18!important; }
  body[data-page^="tournament-creator-step-"] .league-form__field input:not([type="checkbox"]):not([type="radio"]),
  body[data-page^="tournament-creator-step-"] .league-form__field select,
  body[data-page^="tournament-creator-step-"] .league-creator-form-card input[type="number"],
  body[data-page^="tournament-creator-step-"] .league-creator-form-card input[type="text"],
  body[data-page^="tournament-creator-step-"] .league-creator-form-card input[type="email"] {
    min-height:36px!important;height:36px!important;padding:0 9px!important;border-radius:9px!important;font-size:10.5px!important;
  }
  body[data-page^="tournament-creator-step-"] .league-form__field textarea { min-height:64px!important;padding:8px 9px!important;font-size:10.5px!important; }
  body[data-page^="tournament-creator-step-"] .league-form__field small,
  body[data-page^="tournament-creator-step-"] .field-help,
  body[data-page^="tournament-creator-step-"] .tfp-player-search-help { margin-top:3px!important;font-size:8.6px!important;line-height:1.3!important; }
  body[data-page^="tournament-creator-step-"] .league-form__grid--two .league-form__field small,
  body[data-page^="tournament-creator-step-"] .league-form__grid--three .league-form__field small { display:none!important; }
  body[data-page^="tournament-creator-step-"] .league-choice-card { min-height:54px!important;padding:9px 10px!important;border-radius:10px!important; }
  body[data-page^="tournament-creator-step-"] .league-choice-card__title { font-size:10.5px!important; }
  body[data-page^="tournament-creator-step-"] .league-choice-card__text { font-size:8.5px!important; }
  body[data-page^="tournament-creator-step-"] .league-settings-section { margin-bottom:10px!important;padding-bottom:9px!important; }
  body[data-page^="tournament-creator-step-"] .league-settings-section__header h3 { font-size:12px!important; }
  body[data-page^="tournament-creator-step-"] .league-settings-section__header p { font-size:8.8px!important; }
  body[data-page^="tournament-creator-step-"] .league-form__actions {
    position:sticky!important;bottom:6px!important;z-index:20!important;
    margin-top:10px!important;padding:5px!important;border:1px solid rgba(211,223,234,.9)!important;
    border-radius:11px!important;background:rgba(255,255,255,.94)!important;
    backdrop-filter:blur(12px)!important;box-shadow:0 12px 34px rgba(4,22,40,.16)!important;
  }
  body[data-page^="tournament-creator-step-"] .league-form__actions>* { flex:1 1 0!important;justify-content:center!important; }
  body[data-page^="tournament-creator-step-"] .league-creator-submit,
  body[data-page^="tournament-creator-step-"] .league-form__actions .btn--primary,
  body[data-page^="tournament-creator-step-"] .league-creator-secondary,
  body[data-page^="tournament-creator-step-"] .league-form__actions .btn--ghost {
    min-height:38px!important;height:38px!important;padding:0 11px!important;border-radius:9px!important;font-size:10px!important;
  }
}

@media (max-width:370px) {
  body[data-page^="tournament-creator-step-"] .league-form__grid--three { gap:5px!important; }
  body[data-page^="tournament-creator-step-"] .league-form__grid--three .league-form__field label { font-size:8.8px!important; }
  body[data-page^="tournament-creator-step-"] .league-form__grid--three input[type="number"] { padding:0 7px!important;font-size:10px!important; }
}
