.env-bg-development {
    background-color: #7f878f;
}

.env-bg-staging {
    background-color: #f0d6a4;
}

.asl-blue-table {
    border-color: #9bb8e6;
}

.asl-blue-table thead th {
    background-color: #0f3d8a;
    color: #ffffff;
    border-color: #0b2f6b;
    font-weight: 600;
}

.asl-blue-table tbody tr {
    background-color: #eef4ff;
}

.asl-blue-table tbody tr:nth-child(even) {
    background-color: #dfeaff;
}

.asl-blue-table tbody td {
    border-color: #b8cced;
}

.o50-pool-card-level-0 {
    background-color: #bca6a8;
}

.o50-pool-card-level-1 {
    background-color: #f2b0b5;
}

.o50-pool-card-level-3 {
    background-color: #efe1b6;
}

.o50-pool-card-level-5 {
    background-color: #aef8bf;
}

.roster-table {
    border-color: #9fc2eb;
}

.roster-table thead th {
    background: linear-gradient(180deg, #2f6fb2 0%, #245a92 100%);
    color: #f4f9ff;
    border-color: #1f4e80;
}

.roster-table tbody td {
    background-color: #f7fbff;
    border-color: #c9ddf5;
}

.roster-table tbody tr:nth-child(even) td {
    background-color: #eaf3ff;
}

.roster-table tbody tr:hover td {
    background-color: #d8eaff;
}

.booking-type-yellow {
    background-color: #f5ea80;
    border-color: #f5ea80;
}

.booking-type-red {
    background-color: #ff1919;
    color: #fff;
    border-color: #d02e2e;
}

.table td.booking-type-yellow {
    --bs-table-bg: #f5ea80;
    --bs-table-accent-bg: #f5ea80;
    background-color: #f5ea80;
}

.table td.booking-type-red {
    --bs-table-bg: #ff1919;
    --bs-table-accent-bg: #ff1919;
    background-color: #d02e2e;
    color: #fff;
}

/* ── Playoff bracket ─────────────────────────────────────────── */
/*
 * Layout: .playoff-bracket (flex row, gap: 2rem)
 *   └─ .playoff-round (flex column, min-w 240px)
 *        ├─ .playoff-round-title
 *        └─ .playoff-round-matches (flex column, flex:1)
 *             └─ .bracket-pair  ← wraps every 2 sibling matches
 *                  └─ .playoff-match-card × 2
 *
 * Connector geometry (gap = 2rem = 32px):
 *   Each match card: horizontal line going 16px right (→ gap midpoint)
 *   Each pair ::before: vertical bar at gap midpoint, top 25% → 75%
 *     (space-around with 2 children always places centers at H/4 and 3H/4)
 *   Each pair ::after: horizontal nub from gap midpoint → next round left
 */

.playoff-bracket {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    align-items: stretch;
    padding: 0.5rem 0.25rem 1rem;
}

.playoff-round {
    min-width: 240px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.playoff-round-title {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.75rem;
    color: #334155;
    white-space: nowrap;
}

.playoff-round-matches {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.75rem;
}

/* Two sibling matches that both feed into one match in the next round */
.bracket-pair {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: 0.5rem;
    flex: 1;
    position: relative;
}

/* Vertical bar in the middle of the gap connecting the two match exit lines */
.bracket-pair:not(.bracket-pair--single)::before {
    content: '';
    position: absolute;
    right: -17px;        /* centered in the 32px gap (16px ± 1px for line width) */
    top: 25%;            /* always exact: space-around centers 2 items at H/4 and 3H/4 */
    height: 50%;
    width: 2px;
    background: #94a3b8;
}

/* Horizontal nub from vertical bar to the next round's left edge */
.bracket-pair:not(.bracket-pair--single)::after {
    content: '';
    position: absolute;
    right: -32px;        /* right edge sits at next round's left edge (= 1 full gap) */
    top: calc(50% - 1px);
    width: 16px;         /* spans from gap midpoint to next round left */
    height: 2px;
    background: #94a3b8;
}

/* Each match card: horizontal exit line going right to the gap midpoint */
.playoff-match-card {
    position: relative;
    border: 1px solid #9bb8e6;
    border-radius: 10px;
    background: #eef4ff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
    padding: 0;
    overflow: hidden;
}

.playoff-match-card::after {
    content: '';
    position: absolute;
    top: calc(50% - 1px);
    right: -16px;        /* right edge at gap midpoint */
    width: 16px;
    height: 2px;
    background: #94a3b8;
}

/* No outgoing connectors on the final round */
.playoff-round--last .playoff-match-card::after,
.playoff-round--last .bracket-pair::before,
.playoff-round--last .bracket-pair::after {
    display: none;
}

.playoff-match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0.55rem;
    font-size: 0.78rem;
    font-weight: 600;
    background-color: #0f3d8a;
    color: #ffffff;
    border-bottom: 1px solid #0b2f6b;
}

.playoff-match-side {
    padding: 0.45rem 0.55rem;
    border-bottom: 1px solid #b8cced;
    background: #eef4ff;
    /* font-weight: 600; */
    color: #1e293b;
}

.playoff-match-side + .playoff-match-side {
    background: #dfeaff;
    border-bottom: none;
}

.playoff-start-time-text,
.playoff-leg2-start-time-text {
    padding: 0.25rem 0.55rem;
    font-size: 0.65rem;
    font-style: italic;
    color: #1e4d8c;
    background: #c9dcf8;
    border-bottom: 1px solid #b8cced;
    letter-spacing: 0.01em;
}

.playoff-match-winner {
    background-color: #aef8bf;
    font-weight: 700;
}

.playoff-match-side + .playoff-match-winner {
    background-color: #aef8bf;
    font-weight: 700;
}