:root {
  --accent: #2468b3;
  --accent-dark: #184f8e;
  --accent-soft: #e8f1fb;
  --accent-shadow: rgba(28, 74, 123, 0.1);
}

.tournament-panel {
  display: grid;
  gap: 14px;
  border-color: rgba(37, 99, 235, 0.28);
  background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.13), transparent 45%), #fff;
}

.tournament-heading,
.tournament-pairing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tournament-heading h2,
.tournament-heading p,
.tournament-schedule,
.tournament-message {
  margin: 0;
}

.tournament-status-badge {
  border-radius: 999px;
  padding: 6px 10px;
  background: #e5e7eb;
  color: #374151;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.tournament-status-badge[data-status="registration"] { background: #dcfce7; color: #166534; }
.tournament-status-badge[data-status="running"] { background: #dbeafe; color: #1d4ed8; }
.tournament-status-badge[data-status="finished"] { background: #fef3c7; color: #92400e; }

.tournament-schedule,
.tournament-message {
  color: #4b5563;
  line-height: 1.6;
}

.tournament-pairing {
  align-items: flex-start;
  border-radius: 14px;
  padding: 12px;
  background: #eff6ff;
  color: #1e3a8a;
}

.tournament-pairing span { flex: 1; font-weight: 800; }
.tournament-pairing small { color: #2563eb; }

.tournament-match-ready-button {
  min-width: 150px;
  padding: 9px 12px;
}

.tournament-league-wrap {
  display: grid;
  gap: 8px;
}

.tournament-league-table {
  overflow-x: auto;
  border: 1px solid #d7e1ee;
  border-radius: 12px;
  background: #fff;
}

.tournament-league-table.empty {
  padding: 12px;
  color: #6b7280;
}

.tournament-league-table table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.tournament-league-table th,
.tournament-league-table td {
  max-width: 120px;
  padding: 8px;
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tournament-league-table th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #f8fafc;
  text-align: left;
}

.league-result-win { color: #166534; font-weight: 900; }
.league-result-loss { color: #991b1b; font-weight: 900; }
.league-result-playing { background: #dbeafe; color: #1d4ed8; }
.league-result-called { background: #fef3c7; color: #92400e; }
.league-result-self { background: #f1f5f9; color: #64748b; }

.tournament-standings-wrap {
  display: grid;
  gap: 8px;
}

.tournament-standings {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 1.6rem;
}

.tournament-standings li {
  padding: 6px 8px;
  border-radius: 8px;
}

.tournament-standings li.self {
  background: #dbeafe;
  color: #1e40af;
  font-weight: 800;
}

.tournament-standings li.empty {
  color: #6b7280;
  font-style: italic;
}

@media (max-width: 640px) {
  .tournament-heading,
  .tournament-pairing {
    align-items: stretch;
    flex-direction: column;
  }
}
