.add-match-button {
  margin: 0 0 16px;
}

.league-filters { display:flex; gap:20px; flex-wrap:wrap; margin:24px 0; }
.league-filters label { flex:1; min-width:180px; max-width:350px; }
.league-banner { background:#061a38; color:white; padding:24px; border-radius:12px; }
.view-switch { display:flex; gap:10px; flex-wrap:wrap; margin:20px 0; }
.calendar-round-form { margin:16px 0; max-width:680px; }
.active-round-label { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin:16px 0; padding:14px 16px; background:#eef5fc; border-left:4px solid #ffc515; border-radius:8px; }
.active-round-label small { flex-basis:100%; color:#52657c; }
.active-round-label button { margin-left:auto; }
.calendar-history { display:block; margin:16px 0; }
.calendar-history input { width:auto; }
.knockout-tree { display:flex; gap:36px; overflow-x:auto; padding:24px 16px 32px; background:#eaf0f7; border-radius:16px; margin:24px 0; }
.knockout-stage { flex:1; min-width:245px; display:flex; flex-direction:column; }
.knockout-stage h3 { text-align:center; color:#061a38; }
.knockout-column { flex:1; display:flex; flex-direction:column; justify-content:space-around; gap:24px; }
.knockout-card { position:relative; border-radius:12px; background:#061a38; color:#fff; padding:18px; }
.knockout-card::after { content:'→'; position:absolute; right:-29px; top:45%; color:#4379aa; font-size:25px; }
.knockout-stage:last-child .knockout-card::after { display:none; }
.knockout-card > div { display:flex; gap:16px; justify-content:space-between; padding:13px 0; border-bottom:1px solid #43607d; }
.knockout-card b { overflow-wrap:anywhere; }
.knockout-card .won,.knockout-card p { color:#ffc515; }
.knockout-card small { color:#bdd5f1; }
.knockout-card button { margin-top:10px; }
.third-place { max-width:420px; margin:32px auto; }
.third-place .knockout-card::after { display:none; }
@media(max-width:600px) { .knockout-tree { flex-direction:column; } .knockout-stage { min-width:0; } .knockout-card::after { display:none; } }
@media(max-width:600px) { .active-round-label button { width:100%; margin-left:0; } }
.bracket-round-label { max-width:350px; display:block; margin:20px 0; }
.round-brackets { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.round-bracket { background:#061a38; color:white; padding:22px; border-radius:14px; }
.bracket-path { display:flex; align-items:center; margin:20px 0; }
.bracket-entrants { flex:1.4; min-width:0; border:1px solid #40668c; border-radius:8px; overflow:hidden; }
.bracket-entrants > div { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:15px 10px; background:#122f50; }
.bracket-entrants > div + div { border-top:1px solid #40668c; }
.bracket-entrants b,.bracket-winner strong { overflow-wrap:anywhere; }
.bracket-entrants .winner { background:#3f412c; color:#ffc515; }
.bracket-connector { width:25px; flex-shrink:0; border-top:2px solid #82b8eb; }
.bracket-winner { flex:1; min-width:0; border:1px solid #40668c; border-radius:8px; padding:12px; }
.bracket-winner small { display:block; font-size:.6rem; margin-bottom:8px; }
.bracket-winner.confirmed { border-color:#ffc515; color:#ffc515; }
.bracket-caption { font-size:.8rem; color:#b7cfe6; }
@media(max-width:800px) { .round-brackets { grid-template-columns:1fr; } .round-bracket { padding:16px; } }
.league-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; margin:24px 0; }
.league-card { background:white; border:1px solid #dae4ef; border-top:5px solid #83bdf3; border-radius:12px; padding:22px; color:#061a38; text-align:center; box-shadow:0 4px 12px #061a3808; }
.league-card.available { border-top-color:#ffc515; }
.league-card.postponed { border-top-color:#f39a48; }
.league-card.finished { border-top-color:#53b67f; }
.league-status { display:block; text-align:left; font-size:.85rem; font-weight:bold; }
.league-teams { display:flex; justify-content:space-around; align-items:center; gap:16px; margin:26px 0; font-size:1.15rem; }
.league-teams b { flex:1; overflow-wrap:anywhere; }
.league-card p { color:#52657c; font-size:.9rem; }
.match-edit-row > td { padding:8px; vertical-align:top; background:#fffbea; }
.match-edit-row label { display:block; font-size:.75rem; margin:0; }
.match-edit-row input,.match-edit-row select { min-width:115px; width:100%; }
.match-edit-row button { margin:4px 0; white-space:normal; }
.match-edit-row .quick-times { display:block; }
.match-edit-row .quick-times span { display:none; }
@media(max-width:700px) {
  .league-grid { grid-template-columns:1fr; }
  .match-edit-row { display:flex; flex-wrap:wrap; width:calc(100vw - 65px); }
  .match-edit-row > td { display:block; width:50%; box-sizing:border-box; }
  .match-edit-row > td:last-child { width:100%; }
  .match-edit-row > td:nth-child(6) { display:none; }
}

.standings-table {
  min-width: 1180px;
}

#match-editor {
  width: min(680px, 94vw);
  max-height: 94vh;
}

#match-editor .panel {
  max-height: 90vh;
  overflow: auto;
  border: 0;
  box-shadow: none;
}

#match-editor.inline-match-editor[open] {
  position: static;
  width: 100%;
  max-width: none;
  margin: 16px 0;
  border: 2px solid #ffc515;
}

.quick-times,
.pairing-counts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.quick-times button {
  background: #eaf2fb;
  color: #0754a6;
}

.quick-times span {
  color: #69788a;
  font-size: 0.78rem;
}

.pairing-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.pairing-counts span {
  padding: 8px;
  border-radius: 7px;
  background: #eaf2fb;
  font-size: 0.8rem;
}
