
/* ==================== EXTRACTED: Tournaments View & Detail ==================== */
/* Phase 3B: tournament workspace */
    .tournament-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
      gap: 14px;
      min-height: 164px;
    }

    .tournament-filter-row {
      display: flex;
      justify-content: flex-end;
      align-items: center;
      gap: 10px;
      margin: 14px 0;
    }

    .tournament-filter-row .input-shell {
      width: auto;
      min-width: 190px;
    }

    .tournament-card {
      display: grid;
      gap: 18px;
      min-width: 0;
      padding: 20px;
      border: 1px solid var(--border-light);
      border-radius: 15px;
      background: #fff;
      box-shadow: 0 5px 16px rgba(30, 43, 34, .035);
    }

    .tournament-card h3 {
      overflow-wrap: anywhere;
    }

    .tournament-card-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      color: var(--text-secondary);
      font-size: .75rem;
    }

    .tournament-card-footer {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      padding-top: 14px;
      border-top: 1px solid var(--border-light);
    }

    .tournament-card-footer small {
      color: var(--text-faint);
    }

    .tournament-view-btn {
      width: auto;
      padding: 8px 11px;
      font-size: .75rem;
    }

    .tournaments-page .tournament-card-footer .tournament-action-danger {
      width: auto;
      min-height: 32px;
      padding: 6px 9px;
      font-size: .72rem;
    }

    .tournament-detail-hero {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 22px;
      align-items: end;
      padding-bottom: 24px;
      border-bottom: 1px solid var(--border-light);
    }

    .tournament-detail-title {
      display: block;
    }

    .tournament-detail-title h2 {
      overflow-wrap: anywhere;
      margin: 0;
    }

    .tournament-status-row {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 7px;
    }

    .phase-indicator-label {
      display: inline-flex;
      align-items: center;
      font-size: .84rem;
      color: #5d6c63;
      font-weight: 500;
      margin-left: 0;
    }

    .tournament-actions {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      gap: 8px;
    }

    .tournament-action {
      width: auto;
      padding: 9px 12px;
      font-size: .75rem;
    }

    .tournament-action-danger {
      border-color: #f4cccc;
      color: #b42318;
    }

    .tournament-overview {
      display: grid;
      grid-template-columns: minmax(250px, .8fr) minmax(0, 1.2fr);
      gap: 16px;
      margin-top: 22px;
    }

    .tournament-panel {
      min-width: 0;
      padding: 20px;
      border: 1px solid var(--border-light);
      border-radius: 15px;
      background: #fff;
    }

    .tournament-panel-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
    }

    .participant-list {
      display: grid;
      gap: 0;
      margin: 15px 0 0;
      padding: 0;
      list-style: none;
    }

    .participant-list li {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      padding: 11px 0;
      overflow-wrap: anywhere;
    }

    .participant-list small {
      color: var(--text-faint);
    }

    .detail-register {
      width: auto;
      margin-top: 15px;
      padding: 9px 12px;
    }

    .tournament-schedule {
      display: grid;
      gap: 14px;
      margin-top: 22px;
    }

    .schedule-round {
      padding: 19px;
      border: 1px solid var(--border-light);
      border-radius: 15px;
      background: #fff;
    }

    .standings-table-scroll,
    .schedule-table-scroll {
      max-width: 100%;
      overflow-x: auto;
      overscroll-behavior-inline: contain;
      scrollbar-width: thin;
    }

    .standings-table-scroll:focus-visible,
    .schedule-table-scroll:focus-visible {
      outline: 3px solid #176b4d;
      outline-offset: 3px;
    }

    .standings-table-scroll .data-table,
    .schedule-table-scroll .data-table {
      min-width: 620px;
    }

    .schedule-table th,
    .schedule-table td {
      white-space: nowrap;
    }

    .schedule-table th:nth-child(2),
    .schedule-table th:nth-child(3),
    .schedule-table td:nth-child(2),
    .schedule-table td:nth-child(3) {
      min-width: 130px;
      white-space: normal;
      overflow-wrap: anywhere;
    }

    .schedule-mobile-list {
      display: none;
    }

    .schedule-match-card {
      display: grid;
      gap: 14px;
      padding: 15px;
      border: 1px solid var(--border-light);
      border-radius: 12px;
      background: #fff;
    }

    .schedule-card-header,
    .schedule-card-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .schedule-card-players {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
      align-items: center;
      gap: 10px;
    }

    .schedule-card-player {
      display: grid;
      gap: 4px;
      min-width: 0;
    }

    .schedule-card-player:last-child {
      text-align: right;
    }

    .schedule-card-player small,
    .schedule-card-winner {
      color: var(--text-secondary);
      font-size: .72rem;
    }

    .schedule-card-player strong {
      overflow-wrap: anywhere;
    }

    .schedule-card-vs {
      color: var(--text-faint);
      font-size: .75rem;
      font-weight: 700;
    }

    .schedule-card-footer .secondary-btn {
      width: auto;
      flex: 0 0 auto;
      padding: 8px 11px;
    }

    .schedule-round h4 {
      margin-bottom: 12px;
      color: var(--text-secondary);
    }

    @media (max-width: 700px) {
      .tournament-detail-hero {
        grid-template-columns: 1fr;
        align-items: start;
      }

      .tournament-actions {
        justify-content: flex-start;
      }

      .tournament-overview {
        grid-template-columns: 1fr;
      }

      .tournament-card-footer {
        align-items: flex-start;
        flex-direction: column;
      }

      .tournament-filter-row {
        align-items: stretch;
        flex-direction: column;
      }

      .tournament-filter-row .input-shell {
        width: 100%;
      }

      .tournament-view-btn,
      .detail-register {
        width: 100%;
      }
    }

    @media (max-width: 640px) {
      .schedule-round {
        padding: 14px;
      }

      .schedule-table-scroll {
        display: none;
      }

      .schedule-mobile-list {
        display: grid;
        gap: 10px;
      }
    }

    .schedule-round-heading {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 13px;
    }

    .schedule-round-title {
      display: flex;
      align-items: center;
      gap: 8px;
      color: var(--text-primary);
      font-weight: 750;
    }

    .schedule-round-title .td-icon {
      width: 18px;
      height: 18px;
      color: #16803c;
    }

    .schedule-round-count {
      padding: 5px 9px;
      border-radius: 999px;
      background: #f1f7f2;
      color: var(--text-secondary);
      font-size: .72rem;
      font-weight: 650;
    }

    .schedule-table .schedule-match-row td:first-child {
      color: var(--text-secondary);
      font-weight: 700;
    }

    .schedule-winner-cell {
      color: #126b34;
      font-weight: 750;
    }

    .schedule-score-cell {
      min-width: 72px;
      color: var(--text-primary);
      font-size: .95rem;
      font-weight: 800;
      letter-spacing: .04em;
      text-align: center !important;
    }

    .schedule-action-cell .secondary-btn {
      width: auto;
      min-width: 104px;
      padding: 8px 11px;
      color: #126b34;
      border-color: #cfe4d4;
      background: #f4fbf5;
    }

    .schedule-action-cell .secondary-btn:hover {
      background: #e4f3e9;
    }

    .schedule-card-player.is-winner strong {
      color: #126b34;
    }

    .schedule-winner-mark {
      width: fit-content;
      margin-top: 2px;
      padding: 2px 6px;
      border-radius: 999px;
      background: #e4f3e9;
      color: #126b34;
      font-size: .58rem;
      font-weight: 800;
      letter-spacing: .04em;
    }

    .schedule-card-footer .schedule-card-winner {
      color: #126b34;
      font-weight: 650;
    }

    /* Shared transition layer for tournament list and detail views. */
    #tournaments.tournaments-page.active .tournament-toolbar,
    #tournaments.tournaments-page.active .tournament-grid > *,
    #tournament-detail.tournament-detail-redesign.active > * {
      animation: tournament-rise-in .42s cubic-bezier(.22, 1, .36, 1) both;
    }

    #tournaments.tournaments-page.active .tournament-grid > *:nth-child(2) { animation-delay: 55ms; }
    #tournaments.tournaments-page.active .tournament-grid > *:nth-child(3) { animation-delay: 110ms; }
    #tournaments.tournaments-page.active .tournament-grid > *:nth-child(4) { animation-delay: 165ms; }

    @keyframes tournament-rise-in {
      from { opacity: 0; transform: translate3d(0, 14px, 0); }
      to { opacity: 1; transform: translate3d(0, 0, 0); }
    }

    .tournaments-page .tournament-card,
    .tournament-detail-redesign .tournament-panel,
    .tournament-detail-redesign .schedule-round {
      transition: transform .22s cubic-bezier(.22, 1, .36, 1), border-color .22s ease, box-shadow .22s ease;
    }

    .tournaments-page .tournament-card:hover,
    .tournament-detail-redesign .tournament-panel:hover,
    .tournament-detail-redesign .schedule-round:hover {
      transform: translate3d(0, -3px, 0) perspective(900px) rotateX(1deg);
      box-shadow: 0 12px 24px rgba(23, 107, 77, .08);
    }

    @media (prefers-reduced-motion: reduce) {
      #tournaments.tournaments-page.active .tournament-toolbar,
      #tournaments.tournaments-page.active .tournament-grid > *,
      #tournament-detail.tournament-detail-redesign.active > * { animation: none; }
      .tournaments-page .tournament-card:hover,
      .tournament-detail-redesign .tournament-panel:hover,
      .tournament-detail-redesign .schedule-round:hover { transform: none; }
    }

  /* Tournament management page: spacious SaaS card grid. */
    #tournaments.tournaments-page {
      width: calc(100% - 232px);
      max-width: none;
      margin-left: 232px;
      margin-right: 0;
    }

    #tournaments #open-tournament-modal {
      width: auto;
      min-width: 0;
      min-height: 40px;
      max-width: max-content;
      flex: 0 0 auto;
      padding: 9px 14px;
      white-space: nowrap;
    }

    #tournaments #open-tournament-modal .ui-icon {
      width: 18px;
      height: 18px;
    }

    #topbar-breadcrumb {
      font-size: 1.12rem;
    }

    .tournament-toolbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      margin: 24px 0 16px;
    }

    .tournament-toolbar-controls {
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
    }

    .tournament-toolbar .bot-search {
      width: min(340px, 34vw);
      max-width: none;
      flex: 0 1 340px;
    }

    .tournament-filter {
      position: relative;
      display: inline-flex;
      align-items: center;
      flex: 0 0 auto;
    }

    .tournament-filter > .ui-icon {
      position: absolute;
      left: 11px;
      width: 16px;
      height: 16px;
      color: var(--text-faint);
      pointer-events: none;
    }

    .tournament-filter select {
      min-height: 42px;
      min-width: 190px;
      padding: 9px 12px 9px 34px;
      border: 1px solid var(--border-light);
      border-radius: 10px;
      background: #fff;
      color: var(--text-primary);
    }

    .tournament-toolbar .bots-count {
      flex: 0 0 auto;
      color: var(--text-secondary);
      font-size: .78rem;
      white-space: nowrap;
    }

    .tournament-toolbar .workspace-primary-action {
      width: auto;
      flex: 0 0 auto;
      margin-left: 4px;
      white-space: nowrap;
    }

    .tournaments-page .tournament-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      align-items: stretch;
      justify-content: stretch;
      gap: 16px;
      min-height: 0;
    }

    .tournaments-page .tournament-card {
      grid-template-rows: auto 1fr auto;
      gap: 16px;
      min-height: 196px;
      padding: 20px;
      border: 1px solid #dfe7e1;
      border-radius: 12px;
      box-shadow: 0 3px 12px rgba(23, 35, 29, .025);
      transition: border-color .18s ease, box-shadow .18s ease;
    }

    .tournaments-page .tournament-card:hover {
      border-color: #a9cdb5;
      box-shadow: 0 7px 18px rgba(23, 35, 29, .06);
    }

    .tournaments-page .tournament-card > div:first-child {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
    }

    .tournaments-page .tournament-card h3 {
      min-width: 0;
      margin: 0;
      color: var(--text-primary);
      font-size: 1rem;
      font-weight: 650;
      line-height: 1.35;
      overflow-wrap: anywhere;
    }

    .tournaments-page .tournament-card .status-badge {
      flex: 0 0 auto;
    }

    .tournaments-page .status-badge,
    .tournament-detail-redesign .status-badge {
      display: inline-flex;
      flex: 0 0 auto;
      align-items: center;
      border: 1px solid transparent;
      border-radius: 999px;
      font-size: .68rem;
      font-weight: 650;
      line-height: 1;
      min-width: max-content;
      white-space: nowrap;
    }

    .tournaments-page .status-registration_open {
      background: #e7f0ff;
      border-color: #c8dcff;
      color: #285ea8;
    }

    .tournaments-page .status-running {
      background: #e6f5eb;
      border-color: #c4e3cd;
      color: #176b3b;
    }

    .tournaments-page .status-registration_closed {
      background: #fff5df;
      border-color: #f0d9a5;
      color: #87611b;
    }

    .tournaments-page .status-completed {
      background: #eef1ef;
      border-color: #d9dfdb;
      color: #5a6860;
    }

    .tournaments-page .status-cancelled {
      background: #fff0ef;
      border-color: #efc9c5;
      color: #a0463e;
    }

    .tournaments-page .tournament-card-meta {
      display: grid;
      align-content: start;
      gap: 10px;
      color: var(--text-secondary);
      font-size: .8rem;
    }

    .tournament-meta-item {
      display: inline-flex;
      align-items: center;
      gap: 9px;
    }

    .tournament-meta-icon {
      width: 25px;
      height: 25px;
      flex: 0 0 auto;
      color: #789084;
      fill: none;
      stroke: currentColor;
      stroke-width: 1.8;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .tournaments-page .tournament-card-footer {
      justify-content: flex-end;
      padding-top: 14px;
      border-top: 1px solid #e7ece8;
    }

    .tournaments-page .tournament-card-id {
      display: none;
    }

    .tournament-view-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      min-height: 38px;
      padding: 8px 12px;
    }

    .tournament-action-icon {
      width: 16px;
      height: 16px;
      fill: none;
      stroke: currentColor;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .tournament-grid .ui-message {
      grid-column: 1 / -1;
      width: 100%;
      max-width: none;
      min-height: 220px;
      box-sizing: border-box;
      margin: 0;
      padding: 36px 24px;
      border: 1px solid #dfe7e1;
      border-radius: 12px;
      background: #fff;
      text-align: center;
    }

    #tournaments .tournament-grid .ui-message .bot-empty-action {
      width: auto;
      min-width: 0;
      min-height: 36px;
      margin: 2px auto 0;
      padding: 8px 16px;
      border-radius: 7px;
      font-size: 13px;
      box-shadow: none;
    }

    .tournament-empty-icon {
      display: block;
      width: 30px;
      height: 30px;
      margin: 0 auto 12px;
      color: #719481;
      fill: none;
      stroke: currentColor;
      stroke-width: 1.7;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    @media (max-width: 1199px) {
      .tournaments-page .tournament-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    @media (max-width: 900px) {
      #tournaments.tournaments-page {
        width: 100%;
        margin-left: 0;
      }
    }

    @media (max-width: 767px) {
      .tournament-toolbar {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
      }

      .tournament-toolbar-controls {
        align-items: stretch;
        flex-direction: column;
      }

      .tournament-toolbar .bot-search,
      .tournament-filter,
      .tournament-filter select {
        width: 100%;
        max-width: none;
      }

      .tournament-toolbar .bots-count {
        align-self: flex-start;
      }

      .tournament-toolbar .workspace-primary-action {
        width: 100%;
        margin-left: 0;
      }

      .tournaments-page .tournament-grid {
        grid-template-columns: 1fr;
      }
    }

/* Multi-game knockout presentation: pairing is the container, games are the evidence. */
.knockout-pairing-card { gap: 14px; }
.knockout-series-summary { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 13px; background:#f3f8f4; border-radius:8px; color:#5d6e63; font-size:.74rem; }
.knockout-series-summary strong { color:#173b2a; font-size:1.05rem; letter-spacing:.02em; }
.knockout-games { display:grid; gap:6px; padding:2px 0; }
.knockout-game-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:10px; padding:9px 10px; border:1px solid #e6eee8; border-radius:7px; background:#fff; }
.knockout-game-row.is-in_progress { border-color:#b7d8c1; background:#f4fbf6; }
.knockout-game-title { display:flex; align-items:center; gap:8px; min-width:0; }
.knockout-game-title strong { color:#304238; font-size:.78rem; }
.knockout-game-status { color:#85938a; font-size:.7rem; }
.knockout-game-row.is-in_progress .knockout-game-status { color:#176b50; font-weight:700; }
.knockout-game-result { min-width:100px; color:#53655a; font-size:.76rem; text-align:right; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.knockout-game-actions { display:flex; justify-content:flex-end; min-width:78px; }
.knockout-game-actions .secondary-btn { min-height:30px; padding:5px 9px; font-size:.7rem; }
.knockout-game-unavailable { color:#a18b62; font-size:.68rem; white-space:nowrap; }

@media (max-width: 767px) {
  .knockout-game-row { grid-template-columns:minmax(0,1fr) auto; }
  .knockout-game-result { grid-column:1; grid-row:2; min-width:0; text-align:left; }
  .knockout-game-actions { grid-column:2; grid-row:1 / span 2; }
}

    /* Tournament detail redesign */
    .tournament-detail-redesign { width: calc(100% - 248px); max-width: none !important; margin-left: 248px; margin-right: 0; padding: 34px 40px 64px; color: #17251d; }
    .tournament-detail-redesign .tournament-detail-hero { display:flex; align-items:flex-end; justify-content:space-between; gap:28px; padding:0 0 26px; border-bottom:1px solid #dfe8e1; }
    .tournament-heading-copy { min-width:0; }
    .tournament-breadcrumb { border:0; background:none; color:#66756c; padding:0; display:inline-flex; align-items:center; gap:7px; font-size:.79rem; font-weight:600; margin-bottom:18px; }
    .tournament-breadcrumb:hover { color:#176b50; }
    .tournament-breadcrumb .td-icon { width:16px; height:16px; }
    .tournament-breadcrumb .breadcrumb-separator { color:#b0bbb3; margin:0 1px; }
    .tournament-breadcrumb #td-breadcrumb-name { color:#25382c; font-weight:700; max-width:260px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .tournament-detail-redesign .tournament-detail-title { display:flex; align-items:center; flex-wrap:wrap; gap:12px; }
    .tournament-detail-redesign .tournament-detail-title h2 { font-size:clamp(1.75rem, 3vw, 2.35rem); line-height:1.12; letter-spacing:-.035em; color:#15251c; }
    .tournament-detail-redesign .dialog-copy { color:#718078; margin-top:10px; font-size:.92rem; }
    .tournament-detail-redesign .tournament-actions { display:flex; align-items:center; justify-content:flex-end; gap:10px; flex-wrap:wrap; max-width:420px; }
    .tournament-detail-redesign .tournament-actions .tournament-action { width:auto; min-width:148px; padding:11px 16px; border-radius:9px; box-shadow:none; }
    .tournament-detail-redesign .tournament-actions { flex-wrap:nowrap; max-width:none; }
    .tournament-detail-redesign .tournament-actions .tournament-action { flex:0 0 auto; }
    .tournament-detail-redesign .tournament-actions .tournament-action-danger { color:#a23d3d; background:#fff; border:1px solid #e7caca; }
    .tournament-detail-redesign .tournament-actions .tournament-action-danger { min-width:0; padding:8px 10px; font-size:.72rem; }
    .tournament-detail-redesign .tournament-actions .tournament-refresh-action { min-width:0; color:#176b50; background:#f3faf5; border:1px solid #cfe4d4; }
    .tournament-detail-redesign .tournament-actions .tournament-refresh-action:hover { background:#e4f3e9; border-color:#b7d8c1; }
    .tournament-detail-redesign .tournament-action.is-loading { cursor:wait; opacity:.7; }
    .tournament-detail-redesign .execution-status { display:inline-flex; align-items:center; gap:5px; padding:5px 9px; border-radius:999px; font-size:.7rem; font-weight:700; }
    .tournament-detail-redesign .execution-status-ready { color:#5d6c63; background:#f1f5f2; }
    .tournament-detail-redesign .execution-status-running { color:#176b50; background:#e4f1eb; }
    .tournament-detail-redesign .execution-status-progress { color:#87611b; background:#fff5df; }
    .tournament-detail-redesign .execution-status-complete { color:#176b50; background:#e4f1eb; }
    .tournament-detail-redesign .execution-status-error { color:#a0463e; background:#fff0ef; }
    .tournament-detail-redesign .tournament-lifecycle { margin:26px 0 20px; padding:0; display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); list-style:none; position:relative; gap:0; }
    .tournament-detail-redesign .tournament-lifecycle::before, .tournament-detail-redesign .tournament-lifecycle::after { content:""; position:absolute; top:16px; left:7%; height:2px; border-radius:99px; z-index:0; }
    .tournament-detail-redesign .tournament-lifecycle::before { right:7%; background:#dce5de; }
    .tournament-detail-redesign .tournament-lifecycle::after { width:calc(var(--progress, 0) * .86%); background:#176b50; transition:width .25s ease; }
    .tournament-detail-redesign .tournament-lifecycle[data-cancelled="true"]::before, .tournament-detail-redesign .tournament-lifecycle[data-cancelled="true"]::after { display:none; }
    .tournament-detail-redesign .tournament-lifecycle li { min-width:0; display:flex; flex-direction:column; align-items:center; gap:9px; color:#98a49d; font-size:.72rem; line-height:1.25; text-align:center; position:relative; z-index:1; background:transparent; }
    .tournament-detail-redesign .lifecycle-marker { display:grid; place-items:center; width:34px; height:34px; border-radius:50%; border:1px solid #d8e2da; background:#f7f9f8; color:#8e9b92; font-size:.73rem; font-weight:700; box-shadow:0 0 0 5px #f7f9f8; }
    .tournament-detail-redesign .tournament-lifecycle li.is-complete { color:#176b50; }
    .tournament-detail-redesign .tournament-lifecycle li.is-complete .lifecycle-marker { background:#176b50; border-color:#176b50; color:#fff; }
    .tournament-detail-redesign .tournament-lifecycle li.is-current { color:#17251d; font-weight:700; }
    .tournament-detail-redesign .tournament-lifecycle li.is-current .lifecycle-marker { width:38px; height:38px; margin-top:-2px; background:#e4f1eb; border:2px solid #176b50; color:#176b50; box-shadow:0 0 0 5px #f7f9f8, 0 0 0 8px #d9eee2; }
    .tournament-detail-redesign .tournament-lifecycle li.is-cancelled { grid-column:1 / -1; flex-direction:row; justify-content:flex-start; color:#a24c3d; font-weight:700; }
    .tournament-detail-redesign .tournament-lifecycle.lifecycle-compact {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 12px;
      margin: 16px 0 20px;
      padding: 0;
      list-style: none;
      min-height: auto;
      border: none;
    }
    .tournament-detail-redesign .tournament-lifecycle.lifecycle-compact::before,
    .tournament-detail-redesign .tournament-lifecycle.lifecycle-compact::after {
      display: none !important;
    }
    .tournament-detail-redesign .tournament-lifecycle.lifecycle-compact li.lifecycle-step {
      display: inline-flex;
      flex-direction: row;
      align-items: center;
      gap: 6px;
      font-size: .88rem;
      font-weight: 500;
      color: #718077;
      line-height: 1.4;
      background: transparent;
    }
    .tournament-detail-redesign .tournament-lifecycle.lifecycle-compact li.lifecycle-step.is-complete {
      color: #176b50;
      font-weight: 600;
    }
    .tournament-detail-redesign .tournament-lifecycle.lifecycle-compact li.lifecycle-step.is-complete .lifecycle-check-icon {
      width: 14px;
      height: 14px;
      stroke-width: 2.5;
      color: #176b50;
    }
    .tournament-detail-redesign .tournament-lifecycle.lifecycle-compact li.lifecycle-step.is-current {
      color: #176b50;
      font-weight: 700;
    }
    .tournament-detail-redesign .tournament-lifecycle.lifecycle-compact li.lifecycle-step.is-upcoming {
      color: #718077;
      font-weight: 400;
    }
    .tournament-detail-redesign .tournament-lifecycle.lifecycle-compact li.lifecycle-separator {
      display: inline-flex;
      align-items: center;
      color: #98a49d;
      font-size: 1rem;
      user-select: none;
      list-style: none;
      font-weight: 400;
    }
    .lifecycle-mobile-count { display:none; }
    .tournament-detail-redesign .tournament-next-step { min-height:86px; display:flex; align-items:center; gap:16px; margin-bottom:28px; padding:17px 20px; background:#edf7f1; border:1px solid #cde6d7; border-radius:11px; }
    .next-step-icon { width:42px; height:42px; display:grid; place-items:center; flex:0 0 42px; border-radius:50%; color:#176b50; background:#d4eddf; }
    .next-step-icon svg { width:21px; height:21px; }
    .next-step-content { display:grid; gap:2px; }
    .next-step-content .panel-kicker { color:#176b50; }
    .next-step-content strong { color:#173b2a; font-size:1rem; }
    .next-step-content p { color:#66776d; font-size:.82rem; }
    .tournament-detail-redesign .tournament-overview { display:grid; grid-template-columns:minmax(0, .9fr) minmax(0, 1.1fr); gap:18px; }
    .tournament-detail-redesign .tournament-panel, .tournament-detail-redesign .tournament-schedule { background:#fff; border:1px solid #dfe8e1; border-radius:11px; box-shadow:0 2px 7px rgba(21,49,34,.035); }
    .tournament-detail-redesign .tournament-panel { padding:22px; }
    .tournament-detail-redesign .tournament-panel-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:18px; }
    .tournament-detail-redesign .tournament-panel-head h3, .tournament-detail-redesign .schedule-heading h3 { display:flex; align-items:center; gap:8px; color:#203329; font-size:1.03rem; }
    .panel-kicker { color: #203329; font-size:.84rem; letter-spacing:.1em; font-weight:700; margin-bottom:5px; }
    .panel-count { display:grid; place-items:center; min-width:30px; height:26px; padding:0 8px; border-radius:999px; background:#edf5ef; color:#176b50; font-size:.76rem; font-weight:700; }
    .panel-heading-icon { width:17px; height:17px; color:#176b50; }
    .tournament-detail-redesign .participant-list { display:grid; gap:8px; }
    .tournament-detail-redesign #td-participants { max-height:360px; overflow-y:auto; padding-right:4px; }
    .tournament-detail-redesign #td-participants:not(:has(.participant-empty)) { grid-template-columns:repeat(2,minmax(0,1fr)); align-content:start; }
    .tournament-detail-redesign .participant-list li:not(.participant-empty) { display:flex; align-items:center; justify-content:space-between; padding:11px 12px; border:1px solid #edf1ed; border-radius:8px; background:#fbfcfb; }
    .tournament-detail-redesign .participant-copy { display:grid; gap:3px; min-width:0; }
    .tournament-detail-redesign .participant-copy strong { color:#203329; font-size:.84rem; }
    .tournament-detail-redesign .participant-bot-line { display:flex; align-items:center; gap:7px; min-width:0; }
    .tournament-detail-redesign .participant-bot-id { flex:0 1 auto; min-width:0; color:#7b8980; font-size:.74rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .tournament-detail-redesign .participant-meta { flex:1 1 auto; min-width:0; color:#9aa69e; font-size:.68rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .tournament-detail-redesign .participant-empty, .tournament-detail-redesign .detail-empty, .tournament-detail-redesign .requests-empty { min-height:104px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; color:#8a978e; text-align:center; list-style:none; }
    .tournament-detail-redesign .participant-empty svg, .tournament-detail-redesign .detail-empty svg { width:29px; height:29px; color:#94a49a; margin-bottom:3px; }
    .tournament-detail-redesign .participant-empty strong, .tournament-detail-redesign .detail-empty strong { color:#57685d; font-size:.88rem; }
    .tournament-detail-redesign .participant-empty span, .tournament-detail-redesign .detail-empty span { font-size:.76rem; }
    .tournament-detail-redesign .requests-empty .td-icon { color:#94a49a; margin-bottom:2px; }
    .tournament-detail-redesign .requests-empty strong { color:#57685d; font-size:.84rem; }
    .tournament-detail-redesign .requests-empty span { color:#8a978e; font-size:.75rem; }
    .tournament-detail-redesign .request-section-title { display:flex; align-items:center; gap:9px; }
    .tournament-detail-redesign .request-section-title .td-icon { color:#176b50; }
    .tournament-detail-redesign .request-pending-count { padding:5px 9px; border-radius:999px; background:#fff4d6; color:#946200; font-size:.7rem; font-weight:700; white-space:nowrap; }
    .tournament-detail-redesign #td-request-list { display:grid; gap:9px; }
    .tournament-detail-redesign #td-request-list { max-height:360px; overflow-y:auto; padding-right:4px; }
    .tournament-detail-redesign #td-participants .is-viewer-participant {
      position:relative; border-color:#6c8cff; background:#f3f6ff; box-shadow:0 0 0 2px rgba(108,140,255,.14);
    }
    .tournament-detail-redesign .viewer-marker {
      position:absolute; top:10px; right:10px; border-radius:999px; padding:3px 8px;
      background:#3857c8; color:#fff; font-size:11px; font-weight:800; letter-spacing:.02em;
    }
    .tournament-detail-redesign #td-standings tbody tr.is-viewer-standing,
    .tournament-detail-redesign .schedule-match-row.is-viewer-match {
      background:#f3f6ff; box-shadow:inset 3px 0 0 #3857c8;
    }
    .tournament-detail-redesign .schedule-match-card.is-viewer-match {
      border-color:#6c8cff; background:#f3f6ff; box-shadow:0 0 0 2px rgba(108,140,255,.14);
    }
    .tournament-detail-redesign .participant-request-row { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:15px 16px; border:1px solid #dfe7e1; border-radius:10px; background:#fff; }
    .tournament-detail-redesign .request-identity { display:flex; align-items:center; gap:12px; min-width:0; }
    .tournament-detail-redesign .request-bot-icon { display:grid; place-items:center; flex:0 0 40px; width:40px; height:40px; border-radius:9px; background:#edf7f1; color:#176b50; }
    .tournament-detail-redesign .request-copy { display:grid; gap:5px; min-width:0; }
    .tournament-detail-redesign .request-copy strong { color:#203329; font-size:.9rem; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .tournament-detail-redesign .request-meta-row { display:flex; align-items:center; gap:7px; min-width:0; }
    .tournament-detail-redesign .request-meta { color:#68786e; font-size:.78rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .tournament-detail-redesign .request-copy-id { display:inline-flex; align-items:center; justify-content:center; flex:0 0 28px; width:28px; height:28px; padding:0; border:1px solid #dfe7e1; border-radius:7px; background:#fff; color:#68786e; }
    .tournament-detail-redesign .request-copy-id:hover { color:#176b50; border-color:#176b50; background:#f3faf5; }
    .tournament-detail-redesign .request-controls { display:flex; align-items:center; justify-content:flex-end; gap:10px; flex:0 0 auto; }
    .tournament-detail-redesign .request-status { display:inline-flex; align-items:center; gap:5px; padding:6px 8px; border-radius:999px; font-size:.7rem; font-weight:700; white-space:nowrap; }
    .tournament-detail-redesign .request-status-pending { color:#946200; background:#fff4d6; }
    .tournament-detail-redesign .request-status-approved { color:#176b50; background:#e8f5ed; }
    .tournament-detail-redesign .request-status-rejected { color:#a24c3d; background:#fbeceb; }
.tournament-detail-redesign .preflight-status { font-size:.68rem; font-weight:700; }
.tournament-detail-redesign .preflight-passed { color:#176b50; }
.tournament-detail-redesign .preflight-pending { color:#946200; }
.tournament-detail-redesign .preflight-failed { color:#a24c3d; }
.tournament-detail-redesign .preflight-expired,
.tournament-detail-redesign .preflight-not_started { color:#6c7a71; }
    .tournament-detail-redesign .request-action { width:auto; min-width:92px; height:38px; padding:0 12px; border-radius:8px; box-shadow:none; font-size:.82rem; display:inline-flex; align-items:center; justify-content:center; gap:8px; white-space:nowrap; }
    .tournament-detail-redesign .request-action-primary { color:#fff; background:#176b50; border:1px solid #176b50; }
    .tournament-detail-redesign .request-action-primary:hover { background:#12553f; border-color:#12553f; }
    .tournament-detail-redesign .request-action-danger { color:#dc2626; background:#fff; border:1px solid #efb7b7; }
    .tournament-detail-redesign .request-action-danger:hover { background:#fff5f5; border-color:#dc2626; }
    .tournament-detail-redesign .request-action .td-icon { pointer-events:none; }
    .tournament-detail-redesign .standings-table-scroll { max-height:300px; overflow:auto; }
    .tournament-detail-redesign .data-table th { color:#88958c; font-size:.66rem; text-transform:uppercase; letter-spacing:.04em; background:#fbfcfb; }
    .tournament-detail-redesign .data-table td { color:#415148; font-size:.88rem; }
    .tournament-detail-redesign .standings-heading { display:flex; align-items:center; gap:8px; }
    .tournament-detail-redesign .standings-heading .td-icon { color:#176b50; }
    .tournament-detail-redesign .standings-panel .standings-table-scroll { margin:0 -6px; padding:0 6px 4px; }
    .tournament-detail-redesign #td-standings tbody tr { transition:background .18s ease, box-shadow .18s ease; }
    .tournament-detail-redesign #td-standings tbody tr:hover { background:#f7fbf8; }
    .tournament-detail-redesign #td-standings tbody tr.standing-top-1,
    .tournament-detail-redesign #td-standings tbody tr.standing-top-2,
    .tournament-detail-redesign #td-standings tbody tr.standing-top-3 { font-weight:650; }
    .tournament-detail-redesign #td-standings tbody tr.standing-top-1 { background:linear-gradient(90deg, #fff9e8, #fffdf7); box-shadow:inset 4px 0 0 #e6ad24; }
    .tournament-detail-redesign #td-standings tbody tr.standing-top-2 { background:linear-gradient(90deg, #f3f6f7, #fbfcfc); box-shadow:inset 4px 0 0 #9daab0; }
    .tournament-detail-redesign #td-standings tbody tr.standing-top-3 { background:linear-gradient(90deg, #fff2e9, #fffaf7); box-shadow:inset 4px 0 0 #c87945; }
    .tournament-detail-redesign #td-standings tbody tr.standing-top-1 td:nth-child(2),
    .tournament-detail-redesign #td-standings tbody tr.standing-top-2 td:nth-child(2),
    .tournament-detail-redesign #td-standings tbody tr.standing-top-3 td:nth-child(2) { color:#1e3026; font-weight:800; }
    .tournament-detail-redesign .standing-rank-cell { width:58px; }
    .tournament-detail-redesign .standing-rank-badge { display:inline-flex; width:30px; height:30px; align-items:center; justify-content:center; border-radius:50%; font-size:.78rem; font-weight:850; }
    .tournament-detail-redesign .standing-top-1 .standing-rank-badge { background:#f6d875; color:#765306; box-shadow:0 0 0 4px rgba(230,173,36,.14); }
    .tournament-detail-redesign .standing-top-2 .standing-rank-badge { background:#dce3e7; color:#52616a; box-shadow:0 0 0 4px rgba(157,170,176,.14); }
    .tournament-detail-redesign .standing-top-3 .standing-rank-badge { background:#e7b28d; color:#75401f; box-shadow:0 0 0 4px rgba(200,121,69,.14); }
    .tournament-detail-redesign #td-standings tbody tr.is-viewer-standing { outline:2px solid #3857c8; outline-offset:-2px; }
    .tournament-detail-redesign .tournament-schedule { margin-top:18px; padding:22px; }
    .schedule-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:12px; margin-bottom:18px; }
    .schedule-caption { color:#89968e; font-size:.76rem; }
    .schedule-empty { min-height:168px; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:8px; border:1px dashed #d7e3da; border-radius:9px; color:#87958c; text-align:center; }
    .schedule-empty svg { width:30px; height:30px; color:#8fa095; }
    .schedule-empty strong { color:#55675b; font-size:.9rem; }
    .schedule-empty p { color:#89968e; font-size:.78rem; }
    .tournament-detail-redesign .schedule-round { margin-top:16px; }
    .tournament-detail-redesign .schedule-round h4 { color:#3b4d41; font-size:.83rem; margin-bottom:9px; }
    .tournament-detail-redesign .detail-register { width:auto; margin-top:16px; }
    .tournament-detail-redesign .td-icon { display:inline-block; flex-shrink:0; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; vertical-align:middle; }
    .tournament-detail-redesign .td-icon--sm { width:25px; height:25px; }
    .tournament-detail-redesign .td-icon--md { width:25px; height:25px; }
    .tournament-detail-redesign .td-icon--lg { width:32px; height:32px; }
    .tournament-detail-redesign .tournament-breadcrumb .td-icon { color:#66756c; }
    .tournament-detail-redesign .tournament-actions .td-icon { color:currentColor; }
    .tournament-detail-redesign .tournament-action-danger .td-icon { color:#dc2626; }
    .tournament-detail-redesign .lifecycle-marker .td-icon { width:16px; height:16px; }
    .tournament-detail-redesign .schedule-round h4 { display:flex; align-items:center; gap:7px; }
    .tournament-detail-redesign .schedule-heading-icon { color:#66756c; }
    .tournament-detail-redesign .schedule-table th:nth-child(5),
    .tournament-detail-redesign .schedule-table td:nth-child(5) { width:92px; min-width:92px; padding-left:8px; padding-right:8px; text-align:center !important; vertical-align:middle; }
    .tournament-detail-redesign .schedule-table { width:100%; min-width:958px; table-layout:fixed; }
    .tournament-detail-redesign .schedule-table th:nth-child(1),
    .tournament-detail-redesign .schedule-table td:nth-child(1) { width:76px; }
    .tournament-detail-redesign .schedule-table th:nth-child(2),
    .tournament-detail-redesign .schedule-table td:nth-child(2),
    .tournament-detail-redesign .schedule-table th:nth-child(3),
    .tournament-detail-redesign .schedule-table td:nth-child(3) { width:150px; }
    .tournament-detail-redesign .schedule-table th:nth-child(4),
    .tournament-detail-redesign .schedule-table td:nth-child(4) { width:118px; }
    .tournament-detail-redesign .schedule-table th:nth-child(6),
    .tournament-detail-redesign .schedule-table td:nth-child(6) { width:142px; }
    .tournament-detail-redesign .schedule-table th:nth-child(7),
    .tournament-detail-redesign .schedule-table td:nth-child(7) { width:230px; min-width:230px; }
    .tournament-detail-redesign .schedule-action-cell { min-width:230px; width:230px; vertical-align:middle; }
    .tournament-detail-redesign .schedule-action-cell .action-content { flex-wrap:nowrap; gap:6px; }
    .tournament-detail-redesign .schedule-action-empty { display:block; width:100%; color:#a3afa7; text-align:center; font-weight:700; }
    .tournament-detail-redesign .next-step-icon .td-icon { color:#176b50; }
    .tournament-detail-redesign .tournament-next-step-cancelled .next-step-icon .td-icon { color:#a24c3d; }
    .tournament-detail-redesign .tournament-next-step-cancelled { background:#fff7f5; border-color:#f0d7d0; }
    .tournament-detail-redesign .tournament-next-step-cancelled .next-step-icon { background:#f9e3dc; color:#a24c3d; }
    .tournament-detail-redesign .tournament-podium-panel { margin:0 0 20px; padding:22px; background:linear-gradient(135deg,#fffdf7 0%,#fff 48%,#f4fbf7 100%); border:1px solid #e4e0c8; border-radius:14px; box-shadow:0 5px 18px rgba(21,49,34,.06); }
    .tournament-detail-redesign .podium-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:18px; }
    .tournament-detail-redesign .podium-heading-copy { display:grid; gap:4px; }
    .tournament-detail-redesign .podium-heading-title { display:flex; align-items:center; gap:9px; color:#203329; font-size:1.08rem; font-weight:800; }
    .tournament-detail-redesign .podium-heading-title .td-icon { color:#b27a0b; }
    .tournament-detail-redesign .podium-heading-copy p { color:#718078; font-size:.78rem; }
    .tournament-detail-redesign .podium-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; align-items:end; }
    .tournament-detail-redesign .podium-card { position:relative; min-height:126px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; padding:18px 14px 15px; text-align:center; border:1px solid #e4ebe5; border-radius:11px; background:rgba(255,255,255,.86); }
    .tournament-detail-redesign .podium-card:first-child { min-height:148px; border-color:#ead28a; background:linear-gradient(180deg,#fff8dc,#fff); box-shadow:0 7px 18px rgba(178,122,11,.12); }
    .tournament-detail-redesign .podium-medal { display:grid; place-items:center; width:36px; height:36px; border-radius:50%; font-size:.82rem; font-weight:850; }
    .tournament-detail-redesign .podium-card:first-child .podium-medal { width:44px; height:44px; background:#f6d875; color:#765306; box-shadow:0 0 0 5px rgba(230,173,36,.14); }
    .tournament-detail-redesign .podium-card:nth-child(2) .podium-medal { background:#dce3e7; color:#52616a; }
    .tournament-detail-redesign .podium-card:nth-child(3) .podium-medal { background:#e7b28d; color:#75401f; }
    .tournament-detail-redesign .podium-place { color:#718078; font-size:.68rem; font-weight:750; text-transform:uppercase; letter-spacing:.04em; }
    .tournament-detail-redesign .podium-name { max-width:100%; overflow:hidden; color:#203329; font-size:.98rem; font-weight:850; text-overflow:ellipsis; white-space:nowrap; }
    .tournament-detail-redesign .podium-meta { color:#819087; font-size:.7rem; }
    @media (max-width: 820px) {
      .tournament-detail-redesign { width:100%; max-width:none !important; margin-left:0; padding:22px 16px 30px; }
      .tournament-detail-redesign .tournament-detail-hero { align-items:stretch; flex-direction:column; gap:18px; }
      .tournament-detail-redesign .tournament-actions { justify-content:flex-start; max-width:none; flex-wrap:wrap; }
      .tournament-detail-redesign .tournament-actions .tournament-action { flex:1 1 145px; }
      .tournament-detail-redesign .tournament-lifecycle { display:flex; overflow:visible; margin:20px 0 30px; padding:0 2px 3px; min-height:61px; }
      .tournament-detail-redesign .tournament-lifecycle::before, .tournament-detail-redesign .tournament-lifecycle::after { left:16px; right:16px; top:15px; width:auto; }
      .tournament-detail-redesign .tournament-lifecycle::after { right:auto; width:calc((100% - 32px) * var(--progress, 0) / 100); }
      .tournament-detail-redesign .tournament-lifecycle li { display:none; }
      .tournament-detail-redesign .tournament-lifecycle li.is-current, .tournament-detail-redesign .tournament-lifecycle li.is-complete:last-of-type { display:flex; flex:1; }
      .tournament-detail-redesign .tournament-lifecycle::after { content:""; }
      .tournament-detail-redesign .tournament-lifecycle[data-cancelled="true"]::after { display:none; }
      .tournament-detail-redesign .tournament-lifecycle[data-cancelled="false"]::before { right:16px; }
      .tournament-detail-redesign .tournament-lifecycle[data-cancelled="false"]::after { display:block; }
      .tournament-detail-redesign .lifecycle-mobile-count { display:block; margin:-24px 0 16px; color:#8a998f; font-size:.68rem; text-align:right; }
      .tournament-detail-redesign .tournament-lifecycle[data-cancelled="true"] + .lifecycle-mobile-count { color:#a24c3d; }
      .tournament-detail-redesign .tournament-lifecycle[data-cancelled="false"] + .tournament-next-step::before { content:"Bước " attr(data-current) "/ 7"; }
      .tournament-detail-redesign .tournament-overview { grid-template-columns:1fr; }
      .tournament-detail-redesign .podium-list { grid-template-columns:1fr; }
      .tournament-detail-redesign .podium-card, .tournament-detail-redesign .podium-card:first-child { min-height:108px; }
      .tournament-detail-redesign .participant-request-row { align-items:stretch; flex-direction:column; gap:13px; }
      .tournament-detail-redesign #td-participants:not(:has(.participant-empty)) { grid-template-columns:1fr; }
      .tournament-detail-redesign .request-controls { justify-content:flex-start; flex-wrap:wrap; }
      .tournament-detail-redesign .request-status { margin-right:auto; }
      .tournament-detail-redesign .request-meta { white-space:normal; overflow-wrap:anywhere; }
      .tournament-detail-redesign .request-action { min-height:40px; }
      .schedule-heading { align-items:flex-start; flex-direction:column; }
      .tournament-detail-redesign .schedule-table-scroll { overflow-x:auto; }
    }

#tournaments .tournament-scope-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 14px;
  padding: 4px;
  border: 1px solid #dfe8e1;
  border-radius: 10px;
  background: #f7faf8;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}

/* Multi-stage frontend foundation: Regional Qualifiers */
.multi-stage-workspace { display:grid; gap:18px; margin-top:24px; }
.multi-stage-progress-summary,
.regional-qualifiers-view,
.regional-pairings-panel { background:#fff; border:1px solid #dfe8e1; border-radius:11px; padding:22px; }
.multi-stage-section-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:18px; }
.multi-stage-heading-copy { min-width:0; }
.multi-stage-heading-copy h3 { color:#203329; font-size:1.08rem; line-height:1.25; }
.multi-stage-heading-copy .panel-kicker { margin-bottom:5px; color:#176b50; }
.multi-stage-current-stage,
.multi-stage-pairing-count { flex:0 0 auto; padding:6px 10px; border-radius:999px; background:#edf7f1; color:#176b50; font-size:.72rem; font-weight:750; }
.multi-stage-progress-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.multi-stage-progress-item { display:grid; gap:4px; padding:14px; border-radius:9px; background:#f7faf8; }
.multi-stage-progress-item strong { color:#17251d; font-size:1.35rem; line-height:1; }
.multi-stage-progress-item span { color:#718078; font-size:.74rem; }
.multi-stage-progress-item.is-completed strong { color:#176b50; }
.multi-stage-progress-item.is-failed strong { color:#a24c3d; }
.multi-stage-progress-item.is-tiebreaker strong { color:#946200; }
.multi-stage-progress-track { height:7px; margin-top:18px; overflow:hidden; border-radius:99px; background:#e8f0ea; }
.multi-stage-progress-fill { display:block; height:100%; border-radius:inherit; background:#176b50; transition:width .3s ease; }
.multi-stage-navigation { display:flex; gap:8px; overflow-x:auto; padding:2px 0 4px; }
.multi-stage-tab { display:flex; align-items:center; gap:9px; flex:0 0 auto; min-width:190px; padding:11px 13px; border:1px solid #dfe8e1; border-radius:9px; background:#fff; color:#617168; text-align:left; transition:border-color .18s ease, background .18s ease, transform .18s ease; }
.multi-stage-tab:hover:not(:disabled) { border-color:#a9cfb7; background:#f7fbf8; transform:translateY(-1px); }
.multi-stage-tab.is-active { border-color:#176b50; background:#edf7f1; color:#173b2a; }
.multi-stage-tab:disabled { cursor:not-allowed; opacity:.58; }
.multi-stage-tab-index { display:grid; place-items:center; width:28px; height:28px; flex:0 0 28px; border-radius:50%; background:#f0f4f1; color:#738178; font-size:.72rem; font-weight:800; }
.multi-stage-tab.is-active .multi-stage-tab-index { background:#176b50; color:#fff; }
.multi-stage-tab-copy { display:grid; gap:3px; min-width:0; }
.multi-stage-tab-copy strong { overflow:hidden; color:inherit; font-size:.8rem; text-overflow:ellipsis; white-space:nowrap; }
.multi-stage-tab-copy small { color:#849188; font-size:.68rem; }
.regional-heading { margin-bottom:16px; }
.multi-stage-supporting-copy { margin-top:6px; color:#718078; font-size:.82rem; }
.regional-region-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.regional-region-card { display:grid; gap:10px; width:100%; padding:15px; border:1px solid #dfe8e1; border-radius:10px; background:#fff; color:#203329; text-align:left; transition:border-color .18s ease, background .18s ease, transform .18s ease; }
.regional-region-card:hover { border-color:#a9cfb7; background:#f7fbf8; transform:translateY(-2px); }
.regional-region-card.is-selected { border-color:#176b50; background:#edf7f1; box-shadow:0 0 0 2px rgba(23,107,80,.1); }
.regional-region-card-top, .regional-region-counts, .regional-pairing-row { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.regional-region-card-top strong { overflow:hidden; font-size:.9rem; text-overflow:ellipsis; white-space:nowrap; }
.stage-status { flex:0 0 auto; padding:4px 7px; border-radius:999px; background:#f1f5f2; color:#6c7a71; font-size:.65rem; font-weight:750; }
.stage-status-running, .stage-status-in_progress { background:#e4f1eb; color:#176b50; }
.stage-status-completed { background:#e4f1eb; color:#176b50; }
.stage-status-pending_tiebreaker { background:#fff4d6; color:#946200; }
.stage-status-failed, .stage-status-cancelled { background:#fff0ef; color:#a24c3d; }
.regional-region-counts { color:#718078; font-size:.72rem; }
.regional-region-track { height:5px; overflow:hidden; border-radius:99px; background:#e8f0ea; }
.regional-region-track span { display:block; height:100%; border-radius:inherit; background:#58a87d; transition:width .3s ease; }
.regional-region-meta { color:#89968e; font-size:.68rem; }
.regional-pairings-slot { margin-top:18px; }
.regional-pairings-panel > .multi-stage-section-heading { margin-bottom:18px; }
.regional-standings-panel { margin-bottom:16px; padding-bottom:16px; border-bottom:1px solid #edf1ed; }
.regional-standings-panel .multi-stage-section-heading { margin-bottom:10px; }
.regional-standing-qualified { background:#f3faf5; }
.regional-standings-pagination { display:flex; align-self:center; align-items:center; justify-content:center; width:fit-content; gap:8px; margin-top:10px; color:#6a7c72; font-size:.72rem; }
.regional-standings-pagination > span { white-space:nowrap; }
.regional-standings-pagination .secondary-btn { min-width:56px; min-height:30px; padding:5px 9px; font-size:.72rem; line-height:1.1; }
.regional-pairing-list { display:grid; gap:7px; }
.regional-pairing-row { min-height:52px; padding:10px 12px; border:1px solid #edf1ed; border-radius:8px; background:#fbfcfb; }
.regional-pairing-names { display:flex; align-items:center; gap:9px; min-width:0; }
.regional-pairing-names strong { max-width:170px; overflow:hidden; color:#203329; font-size:.8rem; text-overflow:ellipsis; white-space:nowrap; }
.regional-pairing-names span { color:#a0aca4; font-size:.68rem; font-weight:750; }
.regional-pairing-result { color:#68786e; font-size:.7rem; }
.group-stage-view { display:grid; gap:18px; }
.group-stage-heading { margin-bottom:0; }
.group-stage-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:12px; }
.group-stage-card { display:grid; gap:11px; width:100%; min-width:0; padding:15px; border:1px solid #dfe8e1; border-radius:10px; background:#fff; color:#203329; text-align:left; transition:border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease; }
.group-stage-card:hover { border-color:#a9cfb7; background:#f7fbf8; transform:translateY(-2px); }
.group-stage-card.is-selected { border-color:#176b50; background:#edf7f1; box-shadow:0 0 0 2px rgba(23,107,80,.1); }
.group-stage-card-top, .group-stage-card-details, .group-stage-advancement { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.group-stage-card-top strong { min-width:0; overflow:hidden; font-size:.9rem; text-overflow:ellipsis; white-space:nowrap; }
.group-stage-card-details { color:#718078; font-size:.72rem; }
.group-stage-track { height:5px; overflow:hidden; border-radius:99px; background:#e8f0ea; }
.group-stage-track span { display:block; height:100%; border-radius:inherit; background:#58a87d; transition:width .3s ease; }
.group-stage-advancement { align-items:flex-start; flex-direction:column; gap:3px; padding-top:2px; }
.group-stage-advancement strong { color:#203329; font-size:.76rem; }
.group-stage-advancement small { color:#89968e; font-size:.68rem; }
.group-stage-advancement.is-confirmed strong, .group-stage-advancement.is-confirmed small { color:#176b50; }
.group-stage-detail-slot { display:grid; gap:16px; }
.group-standings-panel, .group-pairings-panel { background:#fff; border:1px solid #dfe8e1; border-radius:11px; padding:22px; }
.group-standings-scroll { overflow-x:auto; border:1px solid #edf1ed; border-radius:8px; }
.group-standings-table { min-width:620px; }
.group-standings-table th, .group-standings-table td { white-space:nowrap; }
.group-standings-table tbody tr.group-standing-qualified { background:#edf7f1; }
.group-standing-qualified td:first-child { color:#176b50; font-weight:800; }
.group-standings-note { margin:12px 0 0; color:#8a978f; font-size:.75rem; }
.group-pairing-list { display:grid; gap:10px; }
.group-pairing-row { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:52px; padding:10px 12px; border:1px solid #edf1ed; border-radius:8px; background:#fbfcfb; }
.group-pairing-card { display:flex; flex-direction:column; width:100%; box-sizing:border-box; background:#fff; border:1px solid #dfe8e1; border-radius:10px; overflow:hidden; transition:border-color .18s ease, box-shadow .18s ease; }
.group-pairing-card:hover { border-color:#c0d9c9; }
.group-pairing-card-header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 18px; }
.group-pairing-main { display:flex; flex:1 1 auto; flex-direction:row; align-items:center; gap:14px; min-width:0; }
.group-pairing-names { display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:.95rem; color:#1a2e22; }
.group-pairing-names strong { font-weight:750; color:#172a20; }
.group-pairing-vs { color:#8fa095; font-size:.82rem; font-weight:500; }
.group-pairing-meta { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.group-series-pill { display:inline-flex; align-items:center; padding:1px 7px; border-radius:5px; background:#edf2ee; color:#3b4e42; font-size:.72rem; font-weight:750; border:1px solid #d8e2da; letter-spacing:.02em; }
.group-series-score { display:inline-flex; align-items:center; justify-content:center; min-width:70px; padding:5px 10px; border:1px solid #cce8d3; border-radius:8px; background:#f0faf2; color:#176b37; font-size:.9rem; font-weight:800; line-height:1; white-space:nowrap; font-variant-numeric:tabular-nums; }
.group-pairing-header-right { display:flex; align-items:center; gap:10px; margin-left:auto; flex-shrink:0; }
.group-pairing-toggle { display:inline-flex; align-items:center; gap:6px; padding:6px 12px; font-size:.8rem; font-weight:600; border-radius:6px; cursor:pointer; background:#fff; border:1px solid #dfe8e1; color:#273b30; transition:background .15s ease, border-color .15s ease; }
.group-pairing-toggle:hover { background:#f4f8f5; border-color:#a8cfb7; }
.group-pairing-chevron { width:14px; height:14px; transition:transform .2s ease; }
.group-pairing-toggle[aria-expanded="true"] .group-pairing-chevron { transform:rotate(180deg); }
.group-pairing-games { display:grid; gap:0; border-top:1px solid #edf1ed; background:#fff; }
.group-pairing-games[hidden] { display:none; }
.group-game-row { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px 18px; border-bottom:1px solid #f2f5f3; transition:background .15s ease; }
.group-game-row:last-child { border-bottom:none; }
.group-game-row:hover { background:#fafcfa; }
.group-game-info { display:flex; flex-direction:column; gap:3px; min-width:0; }
.group-game-title { font-size:.85rem; font-weight:700; color:#1d3025; }
.group-game-result { font-size:.8rem; color:#63756a; }
.group-game-actions { flex-shrink:0; }
.group-game-action-btn { display:inline-flex; align-items:center; gap:4px; padding:5px 12px; font-size:.78rem; font-weight:600; border-radius:6px; }
.group-game-unavailable { font-size:.75rem; color:#8c9b91; font-style:italic; }
.knockout-view { display:grid; gap:18px; min-width:0; }
.knockout-heading { margin-bottom:0; }
.knockout-round-options { display:flex; gap:8px; overflow-x:auto; padding:2px 0 4px; }
.knockout-round-tab { flex:0 0 auto; min-width:112px; padding:10px 13px; border:1px solid #dfe8e1; border-radius:9px; background:#fff; color:#617168; font:inherit; font-size:.75rem; font-weight:750; cursor:pointer; transition:border-color .18s ease, background .18s ease, color .18s ease; }
.knockout-round-tab:hover, .knockout-round-tab:focus-visible { border-color:#a9cfb7; color:#176b50; }
.knockout-round-tab.is-active { border-color:#176b50; background:#edf7f1; color:#176b50; }
.knockout-round-select { display:none; width:100%; min-height:40px; padding:9px 11px; border:1px solid #dfe8e1; border-radius:8px; background:#fff; color:#203329; font:inherit; font-size:.8rem; }
.knockout-bracket { position:relative; display:grid; grid-auto-flow:column; grid-auto-columns:220px; width:100%; min-width:0; gap:48px; min-height:var(--knockout-bracket-height,220px); overflow-x:auto; padding:8px 10px 18px; }
.knockout-connectors { position:absolute; z-index:0; inset:0; width:100%; height:100%; overflow:visible; pointer-events:none; }
.knockout-connector { fill:none; stroke:#9ab8a3; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; vector-effect:non-scaling-stroke; }
.knockout-round { position:relative; z-index:1; display:flex; min-width:220px; flex-direction:column; gap:14px; }
.knockout-champion-column { position:relative; z-index:1; display:flex; min-width:180px; flex-direction:column; gap:14px; }
.knockout-champion-column h4 { margin:0; color:#556a5d; font-size:.8rem; font-weight:800; text-transform:uppercase; letter-spacing:.05em; }
.knockout-round h4 { margin:0; color:#556a5d; font-size:.8rem; font-weight:800; text-transform:uppercase; letter-spacing:.05em; }
.knockout-match-list { display:flex; flex:1 1 auto; min-height:var(--knockout-bracket-height,220px); flex-direction:column; justify-content:space-around; gap:18px; }
.knockout-match-node { position:relative; display:flex; flex-direction:column; box-sizing:border-box; width:220px; gap:14px; min-height:0; padding:0; border:none; background:transparent; box-shadow:none; }
.knockout-match-code { align-self:flex-start; margin-bottom:-6px; color:#52705d; font-size:.7rem; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.knockout-match-node:focus-visible { outline:none; }
.knockout-player { position:relative; display:flex; align-items:center; justify-content:space-between; gap:12px; min-width:0; width:100%; box-sizing:border-box; padding:10px 14px; border:1.5px solid #dce5e0; border-radius:10px; background:#fafbfb; color:#2e3d36; cursor:pointer; transition:border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.knockout-player:hover, .knockout-player:focus-visible, .knockout-player.is-selected-match { border-color:#8abf9a; box-shadow:0 2px 8px rgba(23,107,80,.08); outline:none; }
.knockout-player.is-winner { background:#edf5ef; border-color:#9dc4a7; color:#12472d; }
.knockout-player.is-winner:hover, .knockout-player.is-winner:focus-visible, .knockout-player.is-winner.is-selected-match { border-color:#5ea876; box-shadow:0 2px 10px rgba(23,107,80,.14); }
.knockout-player-identity { display:flex; flex-direction:column; min-width:0; gap:2px; flex:1 1 auto; }
.knockout-player-name { color:#2e3d36; font-size:.88rem; font-weight:750; line-height:1.25; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.knockout-player.is-winner .knockout-player-name { color:#12472d; }
.knockout-player-seed { color:#728279; font-size:.72rem; font-weight:500; line-height:1.2; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.knockout-player.is-winner .knockout-player-seed { color:#4d6d59; }
.knockout-player-score { flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; min-width:26px; height:26px; padding:0 6px; border-radius:6px; background:#e8ecea; color:#5a6861; font-size:.86rem !important; font-weight:750; line-height:1; }
.knockout-player.is-winner .knockout-player-score { background:#d2e5d7; color:#12472d; }
.knockout-champion-card { display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; gap:4px; margin:auto 0; padding:14px 18px; min-width:150px; min-height:64px; box-sizing:border-box; border:1.5px solid #9dc4a7; border-radius:10px; background:#edf5ef; color:#12472d; box-shadow:0 2px 8px rgba(23,107,80,.05); }
.knockout-champion-kicker { color:#396a4d; font-size:.78rem; font-weight:700; letter-spacing:.02em; }
.knockout-champion-card strong { color:#12472d; font-size:1.05rem; font-weight:800; line-height:1.25; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:100%; }
.knockout-detail-slot { min-width:0; }
.knockout-match-detail-panel { display:grid; gap:12px; padding:16px; border:1px solid #dfe8e1; border-radius:10px; background:#f7faf8; }
.knockout-detail-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
.knockout-detail-copy { display:grid; gap:4px; min-width:0; }
.knockout-detail-kicker { margin:0; color:#718078; font-size:.66rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.knockout-detail-copy h4 { margin:0; overflow:hidden; color:#203329; font-size:.9rem; text-overflow:ellipsis; white-space:nowrap; }
.knockout-detail-copy p, .knockout-detail-empty, .knockout-match-detail-panel > span { margin:0; color:#68786e; font-size:.75rem; }
.knockout-detail-games { display:grid; gap:6px; }
.knockout-match-in_progress .knockout-player { border-color:#a9cfb7; }
.knockout-match-pending_tiebreaker { border-color:#e7c97b; background:#fffdf6; }
.knockout-match-pending_tiebreaker .knockout-player { border-color:#e7c97b; }
.knockout-match-failed .knockout-player { border-color:#efc9c3; }
.knockout-empty { min-height:210px; }
.knockout-pagination { justify-content:center; }
.pending-tiebreaker-panel { display:grid; gap:14px; padding:20px 22px; border:1px solid #ead28a; border-radius:11px; background:#fffdf5; }
.pending-tiebreaker-panel .multi-stage-section-heading { margin-bottom:0; }
.pending-tiebreaker-empty { color:#776b4b; font-size:.78rem; }
.pending-tiebreaker-list { display:grid; gap:8px; }
.pending-tiebreaker-item { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 12px; border:1px solid #f0e3b7; border-radius:8px; background:#fff; }
.pending-tiebreaker-copy { display:grid; gap:4px; min-width:0; }
.pending-tiebreaker-copy strong { overflow:hidden; color:#493f27; font-size:.8rem; text-overflow:ellipsis; white-space:nowrap; }
.pending-tiebreaker-copy small { color:#9a8b61; font-size:.68rem; }
.pending-tiebreaker-actions { display:flex; flex:0 0 auto; gap:7px; }
.pending-tiebreaker-actions .primary-btn, .pending-tiebreaker-actions .secondary-btn, .pending-tiebreaker-panel > .secondary-btn { width:auto; min-width:0; padding:7px 10px; font-size:.7rem; }
.tiebreaker-resolution-panel { width:min(92vw, 520px); }
.tiebreaker-resolution-body { display:grid; gap:12px; }
.tiebreaker-resolution-match { margin:0; padding:11px 12px; border-radius:8px; background:#fff8df; color:#5e512f; font-size:.82rem; font-weight:700; }
.tiebreaker-resolution-options { display:grid; gap:8px; }
.tiebreaker-resolution-option { display:flex; align-items:center; gap:9px; padding:11px 12px; border:1px solid #dfe8e1; border-radius:8px; color:#203329; cursor:pointer; }
.tiebreaker-resolution-option:has(input:checked) { border-color:#176b50; background:#edf7f1; color:#176b50; }
.tiebreaker-resolution-reason { width:100%; min-height:96px; resize:vertical; }
.tiebreaker-resolution-replay { width:auto; }
.multi-stage-pagination { display:flex; align-items:center; justify-content:flex-end; gap:8px; margin-top:14px; color:#718078; font-size:.7rem; }
.multi-stage-pagination .secondary-btn { width:auto; min-width:52px; min-height:32px; flex:0 0 auto; padding:6px 8px; border-radius:7px; font-size:.68rem; line-height:1.1; }
.multi-stage-pagination .secondary-btn:disabled { cursor:not-allowed; opacity:.42; background:#f3f6f3; color:#9aa79e; border-color:#dfe7e1; }
.multi-stage-empty, .multi-stage-error-state { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:7px; min-height:160px; padding:24px; border:1px dashed #d7e3da; border-radius:9px; color:#87958c; text-align:center; }
.multi-stage-empty strong, .multi-stage-error-state strong { color:#55675b; font-size:.9rem; }
.multi-stage-empty span, .multi-stage-error-state span { max-width:440px; font-size:.78rem; }
.multi-stage-empty .td-icon, .multi-stage-error-state .td-icon { color:#8fa095; }
.multi-stage-error-state .primary-btn { margin-top:6px; }
.multi-stage-inline-loading, .multi-stage-inline-error { display:flex; align-items:center; justify-content:center; gap:9px; min-height:76px; color:#718078; font-size:.8rem; }
.multi-stage-inline-error { justify-content:space-between; color:#a24c3d; }
.multi-stage-spinner { width:16px; height:16px; border:2px solid #cfe4d4; border-top-color:#176b50; border-radius:50%; animation:multi-stage-spin .7s linear infinite; }
.multi-stage-loading-skeleton { min-height:430px; border-radius:11px; background:linear-gradient(90deg,#f4f8f5 25%,#edf4ef 37%,#f4f8f5 63%); background-size:400% 100%; animation:multi-stage-shimmer 1.4s ease infinite; }
@keyframes multi-stage-spin { to { transform:rotate(360deg); } }
@keyframes multi-stage-shimmer { 0% { background-position:100% 0; } 100% { background-position:-100% 0; } }
@media (max-width: 980px) {
  .regional-region-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 620px) {
  .multi-stage-workspace { margin-top:18px; }
  .multi-stage-progress-summary, .regional-qualifiers-view, .regional-pairings-panel, .group-standings-panel, .group-pairings-panel { padding:16px; }
  .multi-stage-progress-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .multi-stage-section-heading { align-items:flex-start; flex-direction:column; gap:8px; }
  .multi-stage-current-stage, .multi-stage-pairing-count { align-self:flex-start; }
  .regional-region-grid { grid-template-columns:1fr; }
  .regional-pairing-row { align-items:flex-start; flex-wrap:wrap; }
  .regional-pairing-names { flex:1 1 100%; }
  .regional-pairing-result { margin-left:auto; }
  .group-stage-grid { grid-template-columns:1fr; }
  .knockout-round-options { display:none; }
  .knockout-round-select { display:block; }
  .knockout-bracket { display:block; min-height:0; overflow:visible; padding:0; }
  .knockout-connectors { display:none; }
  .knockout-round { display:flex; min-width:0; }
  .knockout-champion-column { display:none; }
  .knockout-match-node { width:100%; }
  .group-pairing-row { align-items:flex-start; flex-wrap:wrap; }
  .group-pairing-row .regional-pairing-names { flex:1 1 100%; }
  .group-pairing-card-header { flex-direction:column; align-items:stretch; gap:12px; padding:12px 14px; }
  .group-pairing-main { flex-wrap:wrap; gap:10px 14px; }
  .group-pairing-names { flex:1 1 100%; }
  .group-pairing-header-right { width:100%; justify-content:space-between; margin-left:0; }
  .group-game-row { padding:10px 14px; }
  .pending-tiebreaker-item { align-items:flex-start; flex-direction:column; }
  .pending-tiebreaker-actions { width:100%; }
  .pending-tiebreaker-actions button { flex:1 1 0; }
  .multi-stage-pagination { justify-content:space-between; }
}
@media (prefers-reduced-motion: reduce) {
  .multi-stage-tab, .regional-region-card, .group-stage-card, .knockout-round-tab, .multi-stage-progress-fill, .regional-region-track span, .group-stage-track span { transition:none; }
  .multi-stage-spinner, .multi-stage-loading-skeleton { animation:none; }
}

#tournaments .tournament-scope-tab {
  min-height: 34px;
  padding: 7px 14px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #637168;
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

#tournaments .tournament-scope-tab:hover,
#tournaments .tournament-scope-tab:focus-visible {
  color: #176b50;
  background: #edf7f0;
}

#tournaments .tournament-scope-tab.active {
  color: #176b50;
  background: #e4f4ea;
  box-shadow: inset 0 0 0 1px rgba(23, 107, 80, .08), 0 2px 8px rgba(23, 107, 80, .08);
}

@media (max-width: 600px) {
  #tournaments .tournament-scope-tabs {
    width: 100%;
  }

  #tournaments .tournament-scope-tab {
    flex: 1 1 0;
    padding-inline: 8px;
    font-size: .72rem;
  }
}

/* Knockout Sibling Cards */
.knockout-bracket-card {
  margin-top: 18px;
  margin-bottom: 20px;
}
.knockout-detail-card {
  margin-top: 20px;
  margin-bottom: 24px;
}
.knockout-detail-heading {
  margin-bottom: 16px;
}

/* Tournament Lifecycle Phase Architectures */
.tournament-lifecycle-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 18px;
  margin-bottom: 24px;
  width: 100%;
}

.phase-section-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 6px;
}
.phase-section-header h3 {
  margin: 0;
  color: #173827;
  font-size: 1.25rem;
  font-weight: 750;
}
.phase-section-header .dialog-copy {
  margin: 0;
  color: #556a5d;
  font-size: 0.88rem;
}

.phase-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
  align-items: start;
}

.phase-card {
  background: #ffffff;
  border: 1px solid #dce5e0;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.phase-info-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
}
.phase-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f4f1;
}
.phase-info-row dt {
  color: #556a5d;
  font-size: 0.84rem;
  font-weight: 600;
}
.phase-info-row dd {
  margin: 0;
  color: #173827;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: right;
  display: flex;
  align-items: center;
  gap: 6px;
}

.phase-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  background: #e5f1e9;
  color: #176b4d;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
}
.phase-pill.is-locked {
  background: #fdf2e9;
  color: #a35200;
}

.phase-checklist {
  display: flex;
  flex-direction: column;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.phase-check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.phase-check-item.is-ready svg {
  color: #176b4d;
}
.phase-check-item.is-pending svg {
  color: #a35200;
}
.phase-check-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.phase-check-text strong {
  color: #2e3d36;
  font-size: 0.86rem;
}
.phase-check-text span {
  color: #6a7c72;
  font-size: 0.78rem;
}

.phase-action-banner {
  margin-top: 18px;
  padding: 14px 16px;
  background: #f3f8f5;
  border: 1px solid #d4e8db;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.phase-action-banner p {
  margin: 0;
  color: #174f35;
  font-size: 0.84rem;
  font-weight: 600;
}

.phase-notice-banner {
  margin-top: 14px;
  padding: 12px 16px;
  background: #fafbfb;
  border: 1px solid #e1e8e4;
  border-radius: 8px;
}
.phase-notice-banner p {
  margin: 0;
  color: #63756c;
  font-size: 0.82rem;
}

/* Phase 1 & Phase 2 Hero Header Layout */
.tournament-detail-redesign.is-phase-1 .tournament-detail-hero,
.tournament-detail-redesign.is-phase-2 .tournament-detail-hero {
  align-items: flex-start;
  margin-bottom: 8px;
}
.tournament-detail-redesign.is-phase-1 #td-subtitle,
.tournament-detail-redesign.is-phase-2 #td-subtitle {
  display: none !important;
}
.tournament-detail-redesign.is-phase-1 .tournament-detail-title,
.tournament-detail-redesign.is-phase-2 .tournament-detail-title {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}
.tournament-detail-redesign.is-phase-1 .tournament-status-row,
.tournament-detail-redesign.is-phase-2 .tournament-status-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.tournament-detail-redesign.is-phase-1 #td-actions,
.tournament-detail-redesign.is-phase-2 #td-actions {
  align-self: flex-start;
  padding-top: 4px;
}
.tournament-detail-redesign.is-phase-1 #td-lifecycle,
.tournament-detail-redesign.is-phase-2 #td-lifecycle {
  margin: 12px 0 24px;
}

/* Phase 1: Tournament Setup Workspace (Single Column) */
.phase-cards-grid.phase-setup-workspace-grid,
.phase-setup-workspace-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 960px) {
  .phase-cards-grid.phase-setup-workspace-grid,
  .phase-setup-workspace-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.phase-setup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.phase-setup-head-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}
.phase-setup-head-title h4 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #17251d;
}
.phase-setup-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.phase-setup-actions > button {
  width: auto !important;
  flex: 0 0 auto;
  min-width: max-content;
  white-space: nowrap;
}

.phase-config-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 6px;
  border-bottom: 1px solid #edf1ee;
}
.phase-config-tabs .phase-filter-tab {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9999px;
  padding: 6px 16px;
  font-size: 0.84rem;
  font-weight: 500;
  color: #5d6c63;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.phase-config-tabs .phase-filter-tab:hover {
  background: #f1f5f2;
  color: #17251d;
}
.phase-config-tabs .phase-filter-tab.is-active {
  background: #ebebeb !important;
  color: #17251d !important;
  font-weight: 600 !important;
  border-color: transparent !important;
}

.phase-tab-pane {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.phase-info-multiline {
  white-space: pre-wrap;
  line-height: 1.5;
  text-align: left !important;
  font-weight: 400 !important;
  color: #4b5e53 !important;
  max-width: 720px;
}

.phase-setup-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 720px;
}
.phase-setup-form .dialog-input {
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #aebfb2;
  border-radius: 8px;
  background: #ffffff;
  color: #203329;
  font: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.phase-setup-form .dialog-input:focus {
  border-color: #176b50;
  box-shadow: 0 0 0 3px rgba(23, 107, 80, 0.14);
}
.phase-setup-form .dialog-input::placeholder {
  color: #839188;
}
.phase-setup-form textarea.dialog-input {
  min-height: 100px;
}
.phase-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.phase-form-group .form-label {
  margin-bottom: 3px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #17251d;
}
.phase-form-group .form-hint {
  font-size: 0.74rem;
  color: #6a7c72;
}
.phase-textarea {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.5;
  padding: 10px 12px;
  border: 1px solid #d4dfd7;
  border-radius: 8px;
  background: #ffffff;
}

.phase-rules-articles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 12px;
}
.phase-rule-article {
  background: #fbfdfc;
  border: 1px solid #e4ece6;
  border-radius: 10px;
  padding: 14px 18px;
}
.rule-article-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.rule-badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  white-space: nowrap;
  background: #e4f1eb;
  color: #176b50;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
}
.rule-article-head h5 {
  min-width: 0;
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: #17251d;
}
.phase-rule-article p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: #4b5e53;
}
.phase-rule-detail-list {
  display: grid;
  gap: 6px;
  margin: 10px 0;
  padding: 0;
  list-style: none;
}
.phase-rule-detail-list li {
  display: grid;
  grid-template-columns: minmax(0, 11rem) minmax(0, 1fr);
  gap: 8px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #4b5e53;
}
.phase-rule-detail-list strong {
  color: #17251d;
}
.phase-rule-outcome {
  padding-top: 10px;
  border-top: 1px solid #e4ece6;
  color: #176b50 !important;
  font-weight: 600;
}
@media (max-width: 560px) {
  .phase-rule-detail-list li {
    grid-template-columns: 1fr;
    gap: 1px;
  }
}
.phase-rule-callout {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fef8ee;
  border: 1px solid #f6e4c7;
  border-radius: 10px;
  padding: 12px 16px;
  margin-top: 14px;
  color: #8a5b14;
  font-size: 0.82rem;
  line-height: 1.45;
}
.phase-rule-callout svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #b27a0b;
  margin-top: 1px;
}
.phase-extra-section {
  margin-top: 16px;
  padding: 14px 18px;
  background: #f7faf8;
  border: 1px solid #e2ece5;
  border-radius: 10px;
}
.phase-extra-section h5 {
  margin: 0 0 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #17251d;
}
.phase-multiline-text {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: #4b5e53;
  white-space: pre-wrap;
}

.phase-policy-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.phase-policy-card {
  background: #fbfdfc;
  border: 1px solid #e4ece6;
  border-radius: 10px;
  padding: 14px 18px;
}
.phase-policy-card h5 {
  margin: 0 0 6px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #17251d;
}
.phase-policy-card p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: #4b5e53;
}

.phase-setup-readiness {
  background: #ffffff;
  border: 1px solid #dfe8e1;
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 1px 4px rgba(21, 49, 34, 0.03);
}
.phase-setup-readiness .phase-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}
.phase-setup-readiness .phase-check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fbfdfc;
  border: 1px solid #e4ece6;
  border-radius: 10px;
  padding: 12px 14px;
}
@media (max-width: 640px) {
  .phase-setup-readiness .phase-checklist {
    grid-template-columns: 1fr;
  }
}
.phase-setup-guidance {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #edf1ee;
  font-size: 0.82rem;
  color: #5d6c63;
  line-height: 1.5;
}

.phase-open-reg-cta {
  background: #111827 !important;
  color: #ffffff !important;
  border-radius: 9999px !important;
  padding: 9px 20px !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  border: none !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
  cursor: pointer;
}
.phase-open-reg-cta:hover {
  background: #1f2937 !important;
}
.phase-edit-btn {
  padding: 6px 14px !important;
  border-radius: 8px !important;
  font-size: 0.82rem !important;
}
.phase-save-btn {
  background: #176b50 !important;
  color: #ffffff !important;
  padding: 6px 16px !important;
  border-radius: 8px !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  border: 1px solid #176b50 !important;
}
.phase-cancel-btn {
  padding: 6px 14px !important;
  border-radius: 8px !important;
  font-size: 0.82rem !important;
}

/* Phase 2: Registration */
.phase-cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, #eaf5ee, #f3f9f5);
  border: 1.5px solid #9dc4a7;
  border-radius: 12px;
  padding: 18px 24px;
}
.phase-cta-card svg {
  color: #176b4d;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.phase-cta-content {
  flex: 1 1 auto;
}
.phase-cta-content strong {
  display: block;
  color: #12472d;
  font-size: 1rem;
  margin-bottom: 2px;
}
.phase-cta-content p {
  margin: 0;
  color: #385544;
  font-size: 0.84rem;
}

.phase-reg-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.phase-reg-stat-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 22px;
  background: #ffffff;
  border: 1px solid #dfe8e1;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(21, 49, 34, 0.03);
}
.phase-reg-stat-card .reg-stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: #17251d;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.phase-reg-stat-card .reg-stat-label {
  font-size: 0.84rem;
  color: #5d6c63;
  font-weight: 500;
}

.phase-requests-workspace {
  background: #ffffff;
  border: 1px solid #dfe8e1;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(21, 49, 34, 0.03);
}
.phase-workspace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.phase-workspace-head h3 {
  font-size: 1.12rem;
  font-weight: 700;
  color: #17251d;
  margin: 0;
}
.phase-workspace-head .panel-count {
  background: #edf5ef;
  color: #176b50;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
}
.phase-filter-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  border-bottom: 1px solid #edf1ee;
  padding-bottom: 14px;
}
.phase-filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 16px;
  border-radius: 9999px;
  border: 1px solid transparent;
  background: transparent;
  color: #5d6c63;
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.phase-filter-tab:hover {
  background: #f1f5f2;
  color: #17251d;
}
.phase-filter-tab.is-active {
  background: #f1f5f2;
  color: #17251d;
  font-weight: 600;
  border-color: #dce5de;
}

.phase-bot-rows-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.phase-bot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 18px;
  border: 1px solid #e5e9e6;
  border-radius: 12px;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.phase-bot-row:hover {
  border-color: #cde0d5;
  box-shadow: 0 2px 6px rgba(23, 107, 80, 0.04);
}
.bot-row-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.bot-row-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: #f1f6f3;
  color: #176b50;
  flex-shrink: 0;
}
.bot-row-avatar svg {
  width: 20px;
  height: 20px;
}
.bot-row-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.bot-row-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #17251d;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bot-row-subtitle {
  font-size: 0.8rem;
  color: #6a7c72;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bot-row-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.bot-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.bot-status-pill.is-pending {
  background: #f1f5f2;
  color: #5d6c63;
}
.bot-status-pill.is-approved {
  background: #e4f1eb;
  color: #176b50;
}
.bot-status-pill.is-rejected {
  background: #fff0ef;
  color: #a0463e;
}
.bot-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.req-approve-btn {
  background: #176b50 !important;
  color: #ffffff !important;
  border: 1px solid #176b50 !important;
  padding: 6px 16px !important;
  border-radius: 8px !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: all 0.15s ease;
}
.req-approve-btn:hover {
  background: #12553f !important;
  border-color: #12553f !important;
}
.req-reject-btn {
  background: #ffffff !important;
  color: #a0463e !important;
  border: 1px solid #e1e8e4 !important;
  padding: 6px 14px !important;
  border-radius: 8px !important;
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  cursor: pointer;
  transition: all 0.15s ease;
}
.req-reject-btn:hover {
  background: #fff0ef !important;
  border-color: #f7c5c2 !important;
}
.phase-close-cta {
  background: #111827 !important;
  color: #ffffff !important;
  border-radius: 9999px !important;
  padding: 9px 20px !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  border: none !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}
.phase-close-cta:hover {
  background: #1f2937 !important;
}

.phase-registration-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.phase-inbox-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.phase-inbox-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #fafbfb;
  border: 1px solid #e1e8e4;
  border-radius: 8px;
}
.inbox-copy strong {
  display: block;
  color: #2e3d36;
  font-size: 0.88rem;
}
.inbox-meta {
  color: #6a7c72;
  font-size: 0.78rem;
}
.inbox-actions {
  display: flex;
  gap: 8px;
}

.phase-empty-inbox, .phase-inbox-competitor {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px 16px;
  text-align: center;
  color: #6a7c72;
}

.phase-organizer-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: #f8faf8;
  border: 1px solid #dce5e0;
  border-radius: 10px;
}
.phase-organizer-action-bar p {
  margin: 0;
  color: #485c51;
  font-size: 0.86rem;
  font-weight: 500;
}

/* Phase 3: Roster Final */
.phase-roster-table {
  width: 100%;
}
.phase-roster-table .seed-cell {
  font-weight: 750;
  color: #176b4d;
}

/* Phase 4: Scheduling Preview */
.phase3-workspace-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  margin: 0 0 16px;
  padding: 0 2px;
}
.phase3-header-copy h3 { margin-top: 4px; }
.phase3-header-copy .dialog-copy { display: none; }
.phase3-header-meta { display: flex; align-items: center; gap: 10px; margin-top: 8px; color: #66766c; font-size: .78rem; }
.phase3-workspace-header > .primary-btn { align-self: start; min-height: 40px; padding: 9px 16px; border-radius: 999px; }
.phase3-workspace-header + .phase3-readiness-summary,
.phase3-readiness-summary + .phase3-official-roster { max-width: none; }


.phase3-readiness-summary {
  margin-bottom: 20px;
  padding: 15px 16px;
  border-color: #cfe1d4;
  box-shadow: 0 2px 8px rgba(23, 107, 77, .035);
}

.phase3-summary-head,
.phase3-roster-head,
.phase3-summary-action,
.phase3-roster-controls,
.phase3-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.phase3-readiness-conclusion {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.phase3-readiness-conclusion > svg {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: #176b4d;
  flex: 0 0 auto;
}

.phase3-readiness-conclusion.is-blocked > svg { color: #b42318; }
.phase3-readiness-conclusion.is-checking > svg { color: #a35200; }
.phase3-readiness-conclusion strong { display: block; color: #173827; font-size: .94rem; }
.phase3-readiness-conclusion p { margin: 2px 0 0; color: #556a5d; font-size: .72rem; }
.phase3-state-pill.is-ready { background: #e5f1e9; color: #176b4d; }
.phase3-state-pill.is-blocked { background: #fff0ef; color: #a0463e; }
.phase3-state-pill.is-checking { background: #fff5df; color: #87611b; }
.phase3-readiness-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; margin-top: 13px; padding-top: 13px; border-top: 1px solid #edf2ee; }
.phase3-readiness-checks .phase-check-item { min-width: 0; }
.phase3-readiness-checks .phase-check-item svg { width: 14px; height: 14px; flex: 0 0 auto; }
.phase3-readiness-checks .phase-check-item.is-blocked svg { color: #b42318; }
.phase3-readiness-checks .phase-check-item.is-checking svg { color: #a35200; }
.phase3-summary-action { margin-top: 20px; padding-top: 18px; border-top: 1px solid #edf2ee; }
.phase3-summary-action p { margin: 0; color: #174f35; font-size: .86rem; font-weight: 600; }
.phase3-official-roster { padding: 16px; }
.phase3-roster-head { align-items: flex-end; }
.phase3-roster-head h4 { margin: 2px 0 0; color: #173827; font-size: 1.05rem; }
.phase3-roster-controls { justify-content: flex-start; margin: 13px 0 4px; }
.phase3-roster-search, .phase3-roster-filter { min-height: 44px; border: 1px solid #cfded4; border-radius: 8px; background: #fff; color: #263a2e; font: inherit; }
.phase3-roster-search { width: min(420px, 100%); min-height: 36px; padding: 0 11px; font-size: .78rem; }
.phase3-roster-filter { min-height: 36px; padding: 0 28px 0 10px; font-size: .78rem; }
.phase3-roster-search:focus-visible, .phase3-roster-filter:focus-visible { outline: 3px solid rgba(23, 107, 77, .22); outline-offset: 2px; border-color: #176b4d; }
.phase3-roster-table-region { overflow-x: auto; }
.phase3-roster-table { margin-top: 8px; min-width: 620px; }
.phase3-roster-table td, .phase3-roster-table th { vertical-align: middle; }
.phase-roster-table .name-cell { display: table-cell; vertical-align: middle; }
.phase-roster-table .name-cell small { display: block; margin-top: 6px; line-height: 1.35; color: #718177; font-size: .75rem; }
.phase3-roster-table code { color: #52655b; font-size: .78rem; }
.phase3-pagination { justify-content: flex-end; margin-top: 12px; color: #5d6c63; font-size: .76rem; }
.phase3-pagination .secondary-btn { width: auto; min-width: 72px; min-height: 40px; }

/* Phase 4: Tournament Schedule Preview Workspace */
.tournament-detail-redesign.is-phase-4 #td-lifecycle {
  margin: 12px 0 24px;
}

.phase4-schedule-workspace {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

/* 1. Schedule Summary Metrics */
.phase4-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.phase-schedule-banner.phase4-summary-grid {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}
.phase4-stat-card {
  background: #ffffff;
  border: 1px solid #dfe8e1;
  border-radius: 12px;
  padding: 18px 22px;
  box-shadow: 0 1px 3px rgba(21, 49, 34, 0.03);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.phase4-stat-number {
  font-size: 1.85rem;
  font-weight: 750;
  color: #17251d;
  line-height: 1.1;
}
.phase4-stat-label {
  font-size: 0.86rem;
  color: #5d6c63;
  font-weight: 500;
}
.phase4-stat-sub {
  font-size: 0.76rem;
  color: #7b8d82;
  margin-top: 2px;
}

/* 2. Group Overview */
.phase4-groups-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.phase4-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.phase4-section-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #17251d;
}
.phase4-section-subtitle {
  margin: 0;
  font-size: 0.82rem;
  color: #6a7c72;
}

.phase4-groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.phase4-group-card {
  background: #ffffff;
  border: 1.5px solid #dfe8e1;
  border-radius: 12px;
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: inherit;
  color: inherit;
}
.phase4-group-card:hover {
  border-color: #a3c4b0;
  background: #fbfdfc;
  transform: translateY(-1px);
}
.phase4-group-card.is-selected {
  border-color: #176b50;
  background: #edf5ef;
  box-shadow: 0 0 0 2px rgba(23, 107, 80, 0.12);
}
.phase4-group-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #17251d;
}
.phase4-group-card.is-selected .phase4-group-title {
  color: #176b50;
}
.phase4-group-bots {
  font-size: 1.15rem;
  font-weight: 750;
  color: #17251d;
}
.phase4-group-desc {
  font-size: 0.8rem;
  color: #6a7c72;
}

/* 3. Schedule Explorer */
.phase4-schedule-explorer {
  background: #ffffff;
  border: 1px solid #dfe8e1;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 1px 4px rgba(21, 49, 34, 0.03);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.phase4-explorer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #edf1ee;
}
.phase4-explorer-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.phase4-explorer-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #17251d;
}
.phase4-explorer-note {
  margin: 0;
  font-size: 0.82rem;
  color: #6a7c72;
}
.phase4-format-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: #e4f1eb;
  color: #176b50;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Toolbar */
.phase4-explorer-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
}
.phase4-search-box {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}
.phase4-search-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: #7d8f84;
  pointer-events: none;
}
.phase4-search-input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  background: #ffffff;
  border: 1px solid #d4dfd7;
  border-radius: 8px;
  font-size: 0.86rem;
  color: #17251d;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease;
}
.phase4-search-input:focus {
  border-color: #176b50;
  box-shadow: 0 0 0 3px rgba(23, 107, 80, 0.12);
}
.phase4-round-select {
  min-width: 150px;
  padding: 9px 12px;
  background: #ffffff;
  border: 1px solid #d4dfd7;
  border-radius: 8px;
  font-size: 0.86rem;
  color: #17251d;
  font-family: inherit;
  cursor: pointer;
  outline: none;
}
.phase4-round-select:focus {
  border-color: #176b50;
}

/* Rounds & Pairings List */
.phase4-rounds-list,
.phase-rounds-preview {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.phase4-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: fit-content;
  gap: 8px;
  padding-top: 4px;
  color: #6a7c72;
  font-size: 0.72rem;
}
.phase4-pagination .secondary-btn {
  min-width: 56px;
  min-height: 30px;
  padding: 5px 9px;
  font-size: 0.72rem;
  line-height: 1.1;
}
.phase4-pagination > span {
  white-space: nowrap;
}
.phase4-round-group,
.phase-round-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.phase4-round-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 4px;
}
.phase4-round-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #17251d;
}
.phase4-round-sub {
  font-size: 0.78rem;
  color: #7b8d82;
}
.phase4-round-pairings,
.phase-round-pairings {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.phase4-pairing-row,
.phase-preview-pairing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fbfdfc;
  border: 1px solid #e4ece6;
  border-radius: 10px;
  padding: 12px 18px;
  transition: background 0.15s ease;
}
.phase4-pairing-row:hover {
  background: #f5f9f6;
}
.phase4-pairing-code {
  flex: 0 0 auto;
  min-width: 2.5rem;
  padding: 3px 7px;
  border: 1px solid #c9ddd0;
  border-radius: 999px;
  background: #eef7f1;
  color: #176b50;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}
.phase4-pairing-players {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
}
.phase4-player-name {
  font-weight: 600;
  color: #17251d;
}
.phase4-vs {
  font-size: 0.78rem;
  font-weight: 700;
  color: #8b9c92;
  text-transform: uppercase;
}
.phase4-bye-text {
  font-size: 0.82rem;
  color: #6a7c72;
  font-style: italic;
}
.phase4-pairing-status {
  flex-shrink: 0;
}
.phase4-empty-search {
  padding: 32px 16px;
  text-align: center;
  color: #6a7c72;
  font-size: 0.88rem;
}

.status-badge.status-bye {
  background: #f0f4f1;
  color: #4b6b56;
  border: 1px solid #d4dfd7;
}

.status-badge.status-pending {
  background: #f7faf8;
  color: #63756b;
  border: 1px solid #dce5e0;
}

@media (max-width: 768px) {
  .phase4-explorer-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .phase4-round-select {
    width: 100%;
  }
  .phase4-pairing-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .phase4-pairing-status {
    align-self: flex-start;
  }
}


/* Phase 5: Running - Tournament Live Operations Workspace */
.tournament-detail-redesign.is-phase-5 #td-stepper,
.tournament-detail-redesign.is-phase-5 .tournament-stepper-row,
.tournament-detail-redesign.is-phase-5 #td-next-step {
  display: none !important;
}

.phase5-execution-overview {
  border: 1px solid #d1fae5;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  padding: 20px 24px;
  margin-bottom: 20px;
}
.phase5-progress-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.phase5-progress-title-wrap {
  display: flex;
  flex-direction: column;
}
.phase5-progress-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.phase5-progress-title-row h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
}
.phase5-progress-subtitle {
  margin: 4px 0 0 0;
  font-size: 0.8rem;
  color: #64748b;
}
.phase-progress-percent {
  font-size: 0.88rem;
  font-weight: 700;
  color: #10b981;
}

.phase-live-stats-grid,
.phase5-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.phase-stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  text-align: center;
}
.phase-stat-val {
  color: #0f172a;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.1;
}
.phase-stat-lbl {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 4px;
}
.phase-stat-box.is-completed .phase-stat-val {
  color: #16a34a;
}
.phase-stat-box.is-running .phase-stat-val {
  color: #0284c7;
}
.phase-stat-box.is-waiting .phase-stat-val {
  color: #64748b;
}
.phase-stat-box.is-failed .phase-stat-val {
  color: #c0392b;
}
.phase-stat-box.is-tiebreaker .phase-stat-val {
  color: #d97706;
}
.phase5-progress-note {
  margin: 12px 0 0 0;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.4;
}

.phase-live-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #eef3f0;
}
.phase-live-action-row p {
  margin: 0;
  color: #556a5d;
  font-size: 0.82rem;
}

.phase-active-spotlight,
.phase5-active-spotlight {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 20px;
  background: #fef8f7;
  border: 1.5px solid #f4c2be;
  border-radius: 12px;
  margin-bottom: 24px;
  transition: all 0.2s ease;
}
.phase-active-spotlight.is-idle,
.phase5-active-spotlight.is-idle {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.phase5-spotlight-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.live-pulse-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #e74c3c;
  box-shadow: 0 0 0 rgba(231, 76, 60, 0.4);
  animation: live-pulse 1.8s infinite;
  flex-shrink: 0;
}
.live-pulse-dot.is-idle {
  background: #94a3b8;
  box-shadow: none;
  animation: none;
}
@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(231, 76, 60, 0); }
  100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); }
}
.phase-spotlight-copy {
  flex: 1 1 auto;
}
.phase-spotlight-copy strong {
  display: block;
  color: #78281f;
  font-size: 0.92rem;
}
.phase-active-spotlight.is-idle .phase-spotlight-copy strong {
  color: #1e293b;
}
.phase-spotlight-copy p {
  margin: 2px 0 0 0;
  font-size: 0.8rem;
  color: #64748b;
}

.phase5-active-matches-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px dashed rgba(239, 68, 68, 0.25);
}
.phase5-active-match-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 10px 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.phase5-active-card-main {
  min-width: 0;
}
.phase5-active-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.phase5-active-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: #991b1b;
  background: #fee2e2;
  padding: 2px 6px;
  border-radius: 4px;
}
.phase5-active-format {
  font-size: 0.72rem;
  color: #64748b;
}
.phase5-active-card-players {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.phase5-player-name {
  color: #0f172a;
  font-weight: 700;
}
.phase5-vs {
  color: #94a3b8;
  font-size: 0.75rem;
  font-style: italic;
}
.phase5-live-btn {
  font-size: 0.8rem;
  padding: 6px 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

.phase5-stage-nav-wrap {
  margin-bottom: 16px;
}
.phase5-stage-nav-title {
  margin: 0 0 10px 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

/* Regional Preliminaries Workspace */
.regional-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 16px 0 20px 0;
}
.regional-stat-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 14px 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.regional-stat-val {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
}
.regional-stat-lbl {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  margin-top: 6px;
}
.regional-detail-card {
  margin-top: 20px;
  background: #fff;
  border: 1px solid #dfe8e1;
  border-radius: 11px;
  padding: 22px;
}
.regional-unselected-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 20px;
  color: #64748b;
  text-align: center;
}
.regional-unselected-prompt p {
  margin: 10px 0 0 0;
  font-size: 0.9rem;
}
.regional-action-link,
.group-stage-action-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #16a34a;
}
.regional-qualifiers-note {
  margin: 14px 0 0 0;
  font-size: 0.78rem;
  color: #64748b;
}

/* Knockout Workspace */
.knockout-bracket-card {
  background: #fff;
  border: 1px solid #dfe8e1;
  border-radius: 11px;
  padding: 22px;
  margin-bottom: 20px;
}
.knockout-detail-card {
  background: #fff;
  border: 1px solid #dfe8e1;
  border-radius: 11px;
  padding: 22px;
}
.knockout-detail-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 20px;
  color: #64748b;
  text-align: center;
}
.knockout-detail-empty-state strong {
  display: block;
  color: #1e293b;
  font-size: 0.95rem;
  margin-top: 10px;
}
.knockout-detail-empty-state p {
  margin: 4px 0 0 0;
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .regional-overview-grid {
    grid-template-columns: 1fr;
  }
}

/* Phase 6: Results Review Workspace */
.tournament-detail-redesign.is-phase-6 #td-stepper,
.tournament-detail-redesign.is-phase-6 .tournament-stepper-row,
.tournament-detail-redesign.is-phase-6 #td-next-step,
.tournament-detail-redesign.is-phase-6 #multi-stage-workspace {
  display: none !important;
}

.tournament-detail-redesign.is-phase-6 #td-lifecycle {
  margin: 12px 0 24px;
}

/* Final Match Summary (Chung kết BO3) */
.phase6-final-match-card {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  border-radius: 12px;
  padding: 20px 24px;
}

.phase6-final-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.phase6-final-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.phase6-final-title-row h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
}

.phase6-final-subtitle {
  margin: 4px 0 0 0;
  font-size: 0.82rem;
  color: #64748b;
}

.phase6-final-match-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 20px;
}

.phase6-finalist-card {
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  position: relative;
}

.phase6-finalist-card.is-winner {
  border-color: #f59e0b;
  background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.12);
}

.phase6-finalist-seed {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
}

.phase6-finalist-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin: 4px 0 2px 0;
}

.phase6-finalist-wins {
  font-size: 0.82rem;
  color: #64748b;
}

.phase6-winner-badge {
  align-self: flex-start;
  margin-top: 8px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fde68a;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.phase6-final-vs-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.phase6-final-score-display {
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
}

.phase6-final-format-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
  background: #e2e8f0;
  padding: 2px 8px;
  border-radius: 4px;
}

.phase6-games-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.phase6-game-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.phase6-game-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.phase6-game-title strong {
  font-size: 0.88rem;
  color: #0f172a;
  min-width: 60px;
}

.phase6-game-winner-label {
  font-size: 0.85rem;
  color: #334155;
  font-weight: 600;
}

.phase6-game-meta {
  font-size: 0.8rem;
  color: #64748b;
}

.phase6-game-actions .secondary-btn,
.phase6-replay-btn {
  padding: 6px 14px;
  font-size: 0.8rem;
}

@media (max-width: 768px) {
  .phase6-final-match-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .phase6-finalist-card {
    align-items: center;
  }
  .phase6-winner-badge {
    align-self: center;
  }
}

/* Phase 6: consolidated results by stage */
.phase6-results-board {
  display: grid;
  gap: 18px;
}
.phase6-results-board-head {
  display: grid;
  gap: 4px;
}
.phase6-results-board-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.phase6-results-board-title h4,
.phase6-results-board-subtitle,
.phase6-stage-result-card h5,
.phase6-substage-card h6 {
  margin: 0;
}
.phase6-results-board-title svg {
  width: 18px;
  height: 18px;
}
.phase6-results-board-subtitle,
.phase6-substage-meta,
.phase6-stage-status {
  color: #64748b;
  font-size: 0.82rem;
}
.phase6-stage-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 4px;
}
.phase6-stage-tab {
  flex: 0 0 auto;
  min-width: 190px;
}
.phase6-results-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin: 2px 0 4px;
}
.phase6-results-tab {
  display: grid;
  align-content: start;
  gap: 9px;
  min-width: 0;
  min-height: 126px;
  padding: 14px;
  border: 1px solid #dfe8e1;
  border-radius: 10px;
  background: #fff;
  color: #203329;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.phase6-results-tab:hover {
  border-color: #a9cfb7;
  background: #f7fbf8;
  transform: translateY(-1px);
}
.phase6-stage-tab:focus-visible,
.phase6-results-tab:focus-visible {
  outline: 2px solid #176b50;
  outline-offset: 2px;
}
.phase6-results-tab.is-active {
  border-color: #176b50;
  background: #edf7f1;
  box-shadow: 0 0 0 2px rgba(23,107,80,.1);
}
.phase6-results-tab-top,
.phase6-results-tab-details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.phase6-results-tab-top strong {
  overflow: hidden;
  font-size: .9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.phase6-results-tab-status,
.phase6-results-tab-details {
  color: #718078;
  font-size: .72rem;
}
.phase6-results-tab-track {
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: #e8f0ea;
}
.phase6-results-tab-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #58a87d;
}
.phase6-results-tab-action {
  color: #16a34a;
  font-size: .8rem;
  font-weight: 600;
}
.phase6-results-tab-panels {
  display: grid;
  gap: 12px;
}
.phase6-group-result-detail {
  display: grid;
  gap: 16px;
}
.phase6-results-tab-panel[hidden],
.phase6-stage-result-card[hidden] {
  display: none;
}
.phase6-stage-results-list,
.phase6-substage-grid {
  display: grid;
  gap: 14px;
}
.phase6-stage-result-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}
.phase6-stage-result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eef2f7;
}
.phase6-stage-result-head > div {
  display: grid;
  gap: 4px;
}
.phase6-stage-count {
  color: #334155;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}
.phase6-substage-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.phase6-substage-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}
.phase6-qualifier-list {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border-left: 3px solid #70b98a;
  background: #edf8f0;
  color: #245c38;
  font-size: 0.8rem;
}
.phase6-qualifier-list span {
  overflow-wrap: anywhere;
}
.phase6-stage-standings-scroll {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
}
.phase6-stage-standings-table {
  min-width: 570px;
}
.phase6-stage-standings-table th,
.phase6-stage-standings-table td {
  padding: 8px 10px;
  font-size: 0.78rem;
  white-space: nowrap;
}
.phase6-result-match-list {
  display: grid;
  gap: 6px;
}
.phase6-result-match-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
}
.phase6-result-match-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.phase6-result-match-identity strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #0f172a;
  font-size: 0.82rem;
}
.phase6-result-match-code {
  flex: 0 0 auto;
  color: #64748b;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 700;
}
.phase6-result-match-status {
  color: #334155;
  font-size: 0.78rem;
  text-align: right;
}
.phase6-result-match-status.is-completed,
.phase6-result-match-status.is-finished {
  color: #166534;
  font-weight: 700;
}
.phase6-result-match-status.is-failed,
.phase6-result-match-status.is-error {
  color: #b42318;
  font-weight: 700;
}
.phase6-result-match-actions {
  min-width: 96px;
  text-align: right;
}
.phase6-result-match-actions .phase6-replay-btn {
  padding: 5px 10px;
  font-size: 0.75rem;
}
.phase6-knockout-results {
  display: grid;
  gap: 16px;
}
.phase6-knockout-round {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #dfe8e1;
  border-radius: 10px;
  background: #f8fbf9;
}
.phase6-knockout-round h4 {
  margin: 0;
  color: #203329;
  font-size: .92rem;
}
.phase6-knockout-match-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
}
.phase6-knockout-branch .knockout-round {
  background: transparent;
  border: 0;
  padding: 0;
}
.phase6-knockout-branch .phase6-knockout-match-list {
  display: flex;
  min-height: var(--knockout-bracket-height, 220px);
  flex-direction: column;
  justify-content: space-around;
  gap: 18px;
}
.phase6-knockout-detail-card {
  margin-top: 16px;
}
.phase6-knockout-match-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 13px;
  border: 1px solid #dfe8e1;
  border-radius: 9px;
  background: #fff;
}
.phase6-knockout-match-head,
.phase6-knockout-match-footer,
.phase6-knockout-player {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.phase6-knockout-match-head .knockout-match-code {
  position: static;
  padding: 0;
  background: none;
  color: #176b50;
}
.phase6-knockout-players {
  display: grid;
  gap: 5px;
}
.phase6-knockout-player {
  padding: 8px 10px;
  border: 1px solid #edf1ed;
  border-radius: 6px;
  color: #334155;
  font-size: .82rem;
}
.phase6-knockout-player.is-winner {
  border-color: #a9cfb7;
  background: #edf7f1;
  color: #176b50;
}
.phase6-knockout-match-footer {
  color: #64748b;
  font-size: .78rem;
}
.phase6-knockout-match-footer .phase6-replay-btn {
  padding: 5px 10px;
  font-size: .75rem;
}
.phase6-replay-unavailable {
  color: #94a3b8;
  font-size: 0.72rem;
  white-space: nowrap;
}
.phase6-results-empty {
  padding: 22px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #64748b;
  text-align: center;
}
@media (max-width: 700px) {
  .phase6-stage-result-head,
  .phase6-result-match-row {
    align-items: flex-start;
  }
  .phase6-result-match-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .phase6-result-match-status {
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: left;
  }
  .phase6-result-match-actions {
    grid-column: 2;
    grid-row: 1;
  }
}

/* Phase 7: History Podium */
.phase7-overview-card { margin-bottom: 18px; }
.phase7-overview-card .tournament-panel-head > div { display:flex; align-items:center; gap:8px; }
.phase7-overview-card .tournament-panel-head svg { width:18px; height:18px; color:#176b4d; }
.phase-official-podium .tournament-panel-head > div { display:flex; align-items:center; gap:8px; }
.phase-official-podium .tournament-panel-head svg { width:18px; height:18px; flex:0 0 18px; color:#176b4d; }
.phase7-overview-status { color:#176b4d; font-size:.74rem; font-weight:750; }
.phase7-overview-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:10px; }
.phase7-overview-stat { display:flex; flex-direction:column; gap:4px; min-width:0; padding:13px 12px; border:1px solid #e1e9e3; border-radius:10px; background:#fbfdfb; }
.phase7-overview-stat strong { color:#203329; font-size:1.25rem; line-height:1; font-variant-numeric:tabular-nums; }
.phase7-overview-stat span { color:#718078; font-size:.7rem; line-height:1.3; }
.phase-podium-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 12px;
}
.phase-podium-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 16px;
  border-radius: 12px;
  border: 1.5px solid;
  gap: 6px;
}
.phase-podium-step.step-gold {
  background: #fffdf5;
  border-color: #ebd38a;
  color: #7d5e0a;
}
.phase-podium-step.step-gold svg {
  color: #c98a0c;
  width: 36px;
  height: 36px;
}
.phase-podium-step.step-silver {
  background: #f8fafb;
  border-color: #cbd5e1;
  color: #334155;
}
.phase-podium-step.step-silver svg {
  color: #64748b;
  width: 30px;
  height: 30px;
}
.phase-podium-step.step-bronze {
  background: #fdfaf7;
  border-color: #e5cfbe;
  color: #794c25;
}
.phase-podium-step.step-bronze svg {
  color: #a36534;
  width: 28px;
  height: 28px;
}
.podium-rank {
  font-size: 0.74rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.podium-name {
  font-size: 1rem;
  font-weight: 800;
}
.podium-score {
  font-size: 0.78rem;
  opacity: 0.85;
}
.phase-podium-tied-names { display:flex; flex-direction:column; gap:3px; max-width:100%; }

.phase-archive-matches {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.phase-archive-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  background: #f8faf9;
  border: 1px solid #e1e9e3;
  border-radius: 8px;
}
.archive-match-names {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
}
.archive-vs {
  color: #8b9c92;
  font-size: 0.76rem;
  font-weight: 700;
}
.archive-match-score {
  font-weight: 750;
  color: #176b4d;
  font-size: 0.88rem;
}
.phase-replay-btn {
  font-size: 0.78rem;
  padding: 6px 14px;
}

/* Mobile Responsiveness for Lifecycle Phases */
@media (max-width: 800px) {
  .phase-registration-columns {
    grid-template-columns: 1fr;
  }
  .phase-cards-grid {
    grid-template-columns: 1fr;
  }
  .phase3-readiness-checks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phase-podium-grid {
    grid-template-columns: 1fr;
  }
  .phase7-overview-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .phase-reg-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
  .phase-reg-stat-card {
    padding: 14px 16px;
  }
  .phase-reg-stat-card .reg-stat-number {
    font-size: 1.6rem;
  }
}

@media (max-width: 520px) {
  .phase7-overview-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 620px) {
  .phase3-summary-head, .phase3-roster-head, .phase3-summary-action { align-items: flex-start; flex-direction: column; }
  .phase3-roster-controls { align-items: stretch; flex-direction: column; }
  .phase3-roster-search, .phase3-roster-filter { width: 100%; }
  .phase3-readiness-checks { grid-template-columns: 1fr; }
  .phase3-pagination { justify-content: space-between; }
  .phase-reg-stats-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .phase-filter-tabs {
    overflow-x: auto;
    padding-bottom: 8px;
  }
  .phase-filter-tab {
    white-space: nowrap;
    padding: 6px 12px;
  }
  .phase-bot-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .bot-row-right {
    justify-content: space-between;
    width: 100%;
    border-top: 1px solid #f1f5f2;
    padding-top: 10px;
  }
  .bot-row-actions {
    margin-left: auto;
  }
  .phase-cta-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .phase-schedule-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .phase-organizer-action-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .phase-live-action-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .phase-archive-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* Keep all seven lifecycle phases visible, including on narrow screens. */
@media (max-width: 820px) {
  .tournament-detail-redesign .tournament-lifecycle {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
    overflow: visible;
    min-height: 74px;
    margin: 18px 0 24px;
  }
  .tournament-detail-redesign .tournament-lifecycle li,
  .tournament-detail-redesign .tournament-lifecycle li.is-current,
  .tournament-detail-redesign .tournament-lifecycle li.is-complete:last-of-type {
    display: flex;
    flex: initial;
    min-width: 0;
  }
  .tournament-detail-redesign .tournament-lifecycle li {
    gap: 5px;
    font-size: .62rem;
    overflow-wrap: anywhere;
  }
  .tournament-detail-redesign .tournament-lifecycle .lifecycle-marker {
    width: 28px;
    height: 28px;
    box-shadow: 0 0 0 3px #f7f9f8;
  }
  .tournament-detail-redesign .tournament-lifecycle li.is-current .lifecycle-marker {
    width: 30px;
    height: 30px;
    box-shadow: 0 0 0 3px #f7f9f8, 0 0 0 5px #d9eee2;
  }
  .tournament-detail-redesign .tournament-lifecycle::before,
  .tournament-detail-redesign .tournament-lifecycle::after {
    left: 7%;
    right: 7%;
    top: 13px;
    width: auto;
  }
  .tournament-detail-redesign .tournament-lifecycle::after {
    right: auto;
    width: calc(var(--progress, 0) * .86%);
  }
}

.phase-request-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}
.phase-request-pagination .secondary-btn {
  min-width: 72px;
  padding: 7px 12px;
}
.phase-request-page-status {
  min-width: 84px;
  color: #5d6c63;
  font-size: .78rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.phase-requests-workspace,
.phase-request-list,
.phase-bot-rows-list {
  overflow: visible;
}

/* Registration inbox: compact, dense rows with stable action layout. */
.phase-reg-stat-card,
.phase-requests-workspace,
.phase-bot-row,
.phase-cta-card,
.phase-card {
  border-radius: 8px;
}
.phase-filter-tab {
  border-radius: 6px;
}
.phase-workspace-head .panel-count,
.bot-status-pill {
  border-radius: 4px;
}
.bot-status-pill {
  flex: 0 0 auto;
  white-space: nowrap;
  line-height: 1.1;
}
.phase-request-pagination {
  gap: 6px;
  margin: 10px 0 0;
  min-height: 30px;
}
.phase-request-pagination .secondary-btn {
  width: 56px;
  min-width: 56px;
  height: 30px;
  min-height: 30px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: .72rem;
  line-height: 1;
}
.phase-request-pagination .secondary-btn:disabled {
  cursor: not-allowed;
  opacity: .42;
  background: #f3f6f3;
  color: #9aa79e;
  border-color: #dfe7e1;
}
.phase-request-page-status {
  min-width: 68px;
  font-size: .7rem;
}
.tournament-detail-title .phase-indicator-label:empty {
  display: none;
}
.inbox-actions {
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  flex-wrap: nowrap;
  gap: 6px;
  white-space: nowrap;
  justify-content: flex-end;
}
.phase-inbox-item > .inbox-copy {
  flex: 1 1 auto;
  min-width: 0;
}
.inbox-actions .req-approve-btn,
.inbox-actions .req-reject-btn,
.inbox-actions .req-undo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto !important;
  min-width: 76px;
  height: 26px;
  padding: 4px 8px !important;
  border-radius: 4px !important;
  font-size: .8rem !important;
  white-space: nowrap;
  line-height: 1.1;
}
.phase-request-bulk-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  margin: -4px 0 10px;
  padding: 6px 8px;
  border: 1px solid #e5e9e6;
  border-radius: 6px;
  background: #f8fbf9;
  cursor: pointer;
}
.phase-request-select-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #34483d;
  font-size: .86rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.phase-request-checkbox {
  width: 16px;
  height: 16px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: #176b50;
}
.phase-request-selection-count {
  margin-left: 8px;
  margin-right: auto;
  color: #6b7b71;
  font-size: .72rem;
  white-space: nowrap;
}
.phase-request-bulk-btn {
  width: auto !important;
  min-width: 0;
  height: 26px;
  min-height: 30px;
  padding: 4px 9px !important;
  border-radius: 4px !important;
  font-size: .82rem !important;
  line-height: 1.1;
  white-space: nowrap;
}
.phase-request-bulk-reject-btn {
  background: #ffffff !important;
  color: #a0463e !important;
  border-color: #e1e8e4 !important;
}
.phase-request-bulk-reject-btn:hover {
  background: #fff0ef !important;
  border-color: #f7c5c2 !important;
  color: #a0463e !important;
}
.phase-requests-workspace button:active {
  transform: none !important;
}
#tournament-detail.tournament-detail-redesign .phase-card,
#tournament-detail.tournament-detail-redesign .phase-requests-workspace,
#tournament-detail.tournament-detail-redesign .tournament-panel {
  animation: none !important;
  transition: border-color .18s ease, box-shadow .18s ease;
}
#tournament-detail.tournament-detail-redesign .phase-card:hover,
#tournament-detail.tournament-detail-redesign .phase-requests-workspace:hover,
#tournament-detail.tournament-detail-redesign .tournament-panel:hover {
  transform: none !important;
}
.phase-inbox-item > .phase-request-checkbox {
  margin-right: 2px;
}
.phase-inbox-item.is-selectable {
  cursor: pointer;
}
.phase-inbox-item.is-selectable:hover,
.phase-inbox-item.is-selectable.is-selected {
  border-color: #b7d8c4;
  background: #f3faf5;
}
.phase-inbox-item.is-selectable:focus-visible {
  outline: 2px solid #176b50;
  outline-offset: 2px;
}
@media (max-width: 620px) {
  .phase-request-bulk-toolbar {
    flex-wrap: wrap;
  }
  .phase-request-selection-count {
    margin-right: 0;
  }
}

/* Shared tournament header: title on top, status + phase below. */
#tournament-detail.tournament-detail-redesign .tournament-detail-title {
  display: block;
}
#tournament-detail.tournament-detail-redesign .tournament-detail-title h2 {
  margin: 0;
}
#tournament-detail.tournament-detail-redesign .tournament-status-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 7px;
}
