@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,wght@0,400;0,500;0,600;1,500&family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  /* --- Terre Battue Club design tokens --- */
  --color-primary: #c2410c;
  --color-primary-hover: #ea580c;
  --color-primary-wash: rgba(194, 65, 12, 0.08);
  --color-primary-container: #ffedd5;
  --color-on-primary-container: #9a3412;

  --color-secondary: #15803d;
  --color-secondary-hover: #166534;
  --color-secondary-container: #dcfce7;
  --color-on-secondary-container: #166534;

  --color-bg: #faf9f6;
  --color-surface: #ffffff;
  --color-surface-sunken: #f8f6f2;

  --color-text: #0f172a;
  --color-text-muted: #64748b;
  --color-text-faint: #94a3b8;

  --color-border: #e2e8f0;
  --color-border-soft: rgba(15, 23, 42, 0.06);

  --color-amber: #b45309;
  --color-crimson: #be123c;

  --radius-card: 16px;
  --radius-tile: 10px;
  --radius-pill: 9999px;

  --shadow-card: 0 4px 16px -2px rgba(15, 23, 42, 0.05), 0 1px 2px 0 rgba(15, 23, 42, 0.03);
  --shadow-float: 0 12px 32px -4px rgba(194, 65, 12, 0.1), 0 4px 8px -2px rgba(15, 23, 42, 0.06);

  --font-serif: 'Newsreader', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-score: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;

  /* zachowane nazwy dla zgodności z istniejącym CSS/HTML */
  --color-card: var(--color-surface);
  --color-muted: var(--color-text-muted);
  --color-success: var(--color-secondary);
  --color-danger: var(--color-crimson);
  --radius: var(--radius-card);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  -webkit-text-size-adjust: 100%;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.num, .score-type {
  font-family: var(--font-score);
  font-variant-numeric: tabular-nums;
}

/* --- header --- */
.topbar {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border-soft);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  max-width: 720px;
  margin: 0 auto;
  text-decoration: none;
  color: inherit;
}
.logo-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-tile);
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border-soft);
}
.logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.brand-block { display: flex; flex-direction: column; line-height: 1.15; justify-content: center; }
.logo { font-family: var(--font-serif); font-weight: 600; font-size: 20px; color: var(--color-text); }

.content {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 110px 16px;
}

.page-title {
  font-size: 26px;
  margin: 4px 0 18px 0;
  color: var(--color-text);
}

.section-title {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  margin: 26px 0 12px 0;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.empty-state {
  color: var(--color-text-muted);
  text-align: center;
  padding: 48px 16px;
  font-size: 14px;
}

/* --- floating bottom nav --- */
.tabbar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius-pill);
  padding: 6px;
  box-shadow: var(--shadow-float);
  padding-bottom: max(6px, env(safe-area-inset-bottom));
  z-index: 20;
  max-width: 720px;
  margin: 0 auto;
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 0 6px 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  border-radius: var(--radius-pill);
  position: relative;
}
.icon {
  width: 20px;
  height: 20px;
  display: block;
}
.icon-sm { width: 14px; height: 14px; }
.hint-with-icon { display: flex; align-items: center; gap: 5px; }
.tab-icon { line-height: 1; display: flex; }
.tab-icon .icon { width: 20px; height: 20px; }
.tab.active { color: var(--color-primary); }
.tab.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-primary);
}

.footer {
  text-align: center;
  padding: 8px 16px 130px 16px;
  font-size: 12px;
}
.footer a {
  color: var(--color-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.footer-copy { display: block; margin-top: 6px; color: var(--color-text-faint); font-size: 11px; }

/* --- flash messages --- */
.flash-wrap { margin-bottom: 14px; }
.flash {
  padding: 11px 14px;
  border-radius: var(--radius-tile);
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
}
.flash-success { background: var(--color-secondary-container); color: var(--color-secondary-hover); }
.flash-error { background: #fde8e8; color: var(--color-crimson); }

/* --- pill selector (turniej / liga) --- */
.tournament-select {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.tournament-select label { color: var(--color-text-muted); font-weight: 600; white-space: nowrap; }
.tournament-select select {
  flex: 1;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13px;
  color: var(--color-text);
}
.tournament-header { margin-bottom: 18px; }
.tournament-header h2 { margin: 0 0 4px 0; font-size: 22px; }
.tournament-date {
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
}
.tournament-date .icon, .stat-date-pill .icon, .end-date-pill .icon { width: 14px; height: 14px; flex-shrink: 0; }
.end-date-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--color-surface-sunken);
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  margin-left: 8px;
  white-space: nowrap;
}
.champion-badge {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-primary-container);
  color: var(--color-on-primary-container);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
}

/* --- generic card chassis --- */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border-soft);
  box-shadow: var(--shadow-card);
  padding: 16px;
  margin-bottom: 14px;
}

/* --- stat / progress card --- */
.stat-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.stat-card-main { flex: 1; min-width: 0; }
.stat-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.stat-value {
  font-family: var(--font-score);
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
}
.stat-value small { font-family: var(--font-sans); font-size: 13px; font-weight: 500; color: var(--color-text-muted); }
.stat-date-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--color-primary-container);
  color: var(--color-on-primary-container);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.progress-track {
  margin-top: 10px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--color-border);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: var(--radius-pill);
}
.progress-caption {
  margin-top: 8px;
  font-size: 11px;
  color: var(--color-text-muted);
  display: flex;
  justify-content: space-between;
}

/* --- leader card --- */
.leader-card {
  background: linear-gradient(135deg, #9b2f00, #c2410c 65%);
  border-radius: var(--radius-card);
  padding: 16px;
  margin-bottom: 14px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-float);
}
.leader-avatar {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-score);
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.leader-main { flex: 1; min-width: 0; }
.leader-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  background: rgba(255, 255, 255, 0.2);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  margin-bottom: 6px;
}
.leader-name {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.leader-meta { font-size: 12px; opacity: 0.88; margin-top: 2px; }
.leader-points { text-align: right; flex-shrink: 0; }
.leader-points .num { font-size: 26px; font-weight: 700; display: block; }
.leader-points .pts-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.85; }

/* --- ranking list --- */
.ranking-list { display: flex; flex-direction: column; gap: 8px; }
.ranking-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-card);
  padding: 11px 14px;
  box-shadow: var(--shadow-card);
}
.ranking-row.top-row { border-left: 3px solid var(--color-primary); }
.rk-rank { width: 18px; font-family: var(--font-score); font-weight: 700; color: var(--color-text-faint); font-size: 13px; flex-shrink: 0; }
.rk-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: var(--color-surface-sunken);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-score);
  font-weight: 700;
  font-size: 12px;
  color: var(--color-text-muted);
  flex-shrink: 0;
}
.rk-main { flex: 1; min-width: 0; }
.rk-name {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rk-meta { font-size: 11px; color: var(--color-text-muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-points {
  font-family: var(--font-score);
  font-weight: 700;
  font-size: 15px;
  color: var(--color-primary);
  background: var(--color-primary-wash);
  min-width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ranking-row.top-row .rk-points { background: var(--color-primary); color: #fff; }

/* --- bracket --- */
.bracket-scroll {
  overflow-x: auto;
  margin: 0 -16px;
  padding: 0 16px 8px 16px;
  -webkit-overflow-scrolling: touch;
}
.bracket {
  display: flex;
  gap: 22px;
  min-width: 900px;
}
.bracket-round {
  display: flex;
  flex-direction: column;
  min-width: 190px;
}
.round-title {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 10px;
  text-align: center;
}
.round-matches {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  flex: 1;
  gap: 16px;
}
.bracket-match {
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-tile);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  font-size: 13px;
}
.bracket-match.bye { opacity: 0.6; box-shadow: none; }
.bm-player {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid var(--color-border-soft);
  font-weight: 500;
}
.bm-player:last-of-type { border-bottom: none; }
.bm-player.winner {
  font-weight: 700;
  background: var(--color-secondary-container);
  border-left: 3px solid var(--color-secondary);
  color: var(--color-on-secondary-container);
}
.bm-player.loser { color: var(--color-text-faint); }
.bm-player.loser .bm-name { text-decoration: line-through; text-decoration-color: var(--color-border); }
.bm-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.bm-winner-icon { color: var(--color-secondary); font-weight: 700; margin-right: 4px; }
.bm-score { font-family: var(--font-score); font-weight: 700; margin-left: 6px; }
.bm-player.winner .bm-score { color: var(--color-secondary-hover); }
.bm-sets {
  text-align: center;
  font-family: var(--font-score);
  font-size: 11px;
  color: var(--color-text-muted);
  padding: 4px 0;
  border-top: 1px solid var(--color-border-soft);
}

/* --- league grid (każdy z każdym) --- */
.grid-scroll {
  overflow-x: auto;
  margin: 0 -16px;
  padding: 0 16px 8px 16px;
  -webkit-overflow-scrolling: touch;
}
.league-grid {
  border-collapse: collapse;
  font-size: 11px;
  background: var(--color-surface);
  border-radius: var(--radius-tile);
  overflow: hidden;
}
.league-grid th, .league-grid td {
  border: 1px solid var(--color-border-soft);
  text-align: center;
  white-space: nowrap;
}
.lg-corner {
  background: var(--color-surface-sunken);
  min-width: 30px;
}
.lg-col-header {
  background: var(--color-surface-sunken);
  padding: 6px 4px;
  font-size: 10px;
  font-weight: 700;
  min-width: 62px;
  max-width: 62px;
}
.lg-firstname {
  font-weight: 400;
  color: var(--color-text-muted);
  font-size: 9px;
  text-transform: capitalize;
}
.lg-row-header {
  background: var(--color-surface-sunken);
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 700;
  text-align: left;
  position: sticky;
  left: 0;
  min-width: 110px;
  max-width: 110px;
  white-space: normal;
}
.lg-rank { color: var(--color-text-muted); font-weight: 400; margin-right: 2px; }
.lg-diagonal { background: var(--color-text); }
.lg-cell { padding: 4px 2px; min-width: 62px; }
.lg-cell.lg-empty { background: var(--color-bg); }
.lg-score { font-family: var(--font-score); font-weight: 700; font-size: 11px; }
.lg-points { font-size: 9px; color: var(--color-text-muted); }
.lg-pkt-header {
  background: var(--color-secondary);
  color: #fff;
  min-width: 42px;
  font-size: 10px;
}
.lg-pkt-total {
  background: var(--color-secondary-container);
  color: var(--color-secondary-hover);
  font-family: var(--font-score);
  font-weight: 700;
  font-size: 14px;
}

/* --- standings table (kept for narrow contexts / print-like view) --- */
.table-wrap {
  background: var(--color-surface);
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border-soft);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.standings-table th {
  text-align: left;
  padding: 12px 10px;
  background: var(--color-surface-sunken);
  border-bottom: 1px solid var(--color-border-soft);
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.standings-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--color-border-soft);
  font-family: var(--font-score);
}
.standings-table tr:last-child td { border-bottom: none; }
.standings-table .player-name { font-weight: 700; font-family: var(--font-sans); }
.standings-table .points { font-weight: 700; color: var(--color-primary); }
.standings-table th:nth-child(1), .standings-table td:nth-child(1) { width: 32px; }

/* --- match history --- */
.match-list { display: flex; flex-direction: column; gap: 10px; }
.match-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 13px 15px;
}
.match-card-top {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 9px;
}
.match-round { color: var(--color-primary); text-transform: uppercase; letter-spacing: 0.04em; font-size: 10px; }
.match-card-players {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
}
.mc-player { flex: 1; display: flex; align-items: center; gap: 6px; }
.mc-player:last-child { justify-content: flex-end; text-align: right; }
.mc-player.winner { font-weight: 700; font-size: 15px; color: var(--color-secondary-hover); }
.mc-player.loser { color: var(--color-text-faint); }
.mc-trophy { font-size: 13px; }
.mc-score { font-family: var(--font-score); font-weight: 700; white-space: nowrap; padding: 0 8px; }
.match-card-date { margin-top: 7px; font-size: 11px; color: var(--color-text-faint); }
.match-card-pending { opacity: 0.85; border-style: dashed; }
.mc-score-pending { color: var(--color-text-faint); font-weight: 600; }
.match-card-deadline {
  margin-top: 7px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-primary);
}
.match-card-deadline.overdue { color: var(--color-text-faint); }

/* --- rozwijane panele: ukończone / oczekujące --- */
.mecze-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  margin-bottom: 14px;
  overflow: hidden;
}
.mecze-panel-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  font-weight: 700;
  font-size: 15px;
  color: var(--color-text);
  user-select: none;
}
.mecze-panel-summary::-webkit-details-marker { display: none; }
.mecze-panel-summary::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border-right: 2px solid var(--color-text-muted);
  border-bottom: 2px solid var(--color-text-muted);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
  flex-shrink: 0;
}
.mecze-panel[open] > .mecze-panel-summary::before { transform: rotate(45deg); }
.mecze-panel-summary > span:first-child { display: flex; align-items: center; }
.mecze-panel-count {
  background: var(--color-surface-sunken);
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: var(--radius-pill, 999px);
}
.mecze-panel-body {
  padding: 0 14px 14px 14px;
  border-top: 1px solid var(--color-border-soft);
  padding-top: 14px;
}

/* --- points legend / rules card --- */
.points-legend {
  margin-top: 28px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-card);
  padding: 16px;
}
.points-legend h3 {
  margin: 0 0 10px 0;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  font-family: var(--font-sans);
}
.points-legend-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.points-legend-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  padding: 6px 0;
  border-bottom: 1px solid var(--color-border-soft);
}
.points-legend-row:last-child { border-bottom: none; }
.points-legend-badge {
  font-family: var(--font-score);
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-primary-wash);
  border-radius: var(--radius-pill);
  padding: 3px 11px;
  font-size: 13px;
  white-space: nowrap;
}

/* --- forms / buttons (shared with admin) --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--color-text);
  background: transparent;
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn-primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(194, 65, 12, 0.3);
}
.btn-primary:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); }
.btn-danger { color: var(--color-crimson); border-color: var(--color-crimson); }
.btn-small { padding: 7px 13px; font-size: 12px; }

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-card);
  padding: 16px;
  margin-bottom: 18px;
}
.admin-form label { font-size: 12px; font-weight: 700; color: var(--color-text-muted); margin-top: 8px; text-transform: uppercase; letter-spacing: 0.03em; }
.admin-form label:first-child { margin-top: 0; }
.admin-form input, .admin-form select {
  padding: 11px 14px;
  border-radius: var(--radius-tile);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  font-size: 15px;
  font-family: var(--font-sans);
}
.admin-form input:focus, .admin-form select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-wash);
}
.admin-form button { margin-top: 14px; }
.admin-form-inline { flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
.admin-form-inline input { flex: 1; min-width: 120px; }
.admin-form-inline button { margin-top: 0; }

.admin-login-wrap { max-width: 360px; margin: 40px auto 0 auto; }

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.link-muted { color: var(--color-text-muted); font-size: 14px; font-weight: 600; }

.admin-quicklinks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
}
.admin-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-card);
  padding: 16px;
}
.admin-card-title { font-weight: 700; margin-bottom: 4px; font-family: var(--font-serif); font-size: 16px; }
.admin-card-sub { font-size: 12px; color: var(--color-text-muted); }

.admin-tournament-list { display: flex; flex-direction: column; gap: 8px; }
.admin-tournament-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-card);
  padding: 12px 14px;
}
.att-name { font-weight: 700; }
.att-date { font-size: 12px; color: var(--color-text-muted); }

.badge {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--color-surface-sunken);
  color: var(--color-text-muted);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge-live { background: var(--color-primary-container); color: var(--color-on-primary-container); }
.badge-done { background: var(--color-secondary-container); color: var(--color-on-secondary-container); }

.player-list { display: flex; flex-direction: column; gap: 6px; }
.player-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-tile);
  padding: 10px 12px;
  font-size: 14px;
}
.player-row.inactive { opacity: 0.55; }
.player-row-actions { display: flex; gap: 6px; }

.players-select-label { display: flex; justify-content: space-between; align-items: center; }
.selected-count { font-size: 12px; color: var(--color-text-muted); font-weight: 600; text-transform: none; }
.players-checklist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-tile);
  padding: 8px;
  background: var(--color-bg);
}
.player-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  padding: 4px;
  font-weight: 500;
}

.admin-tournament-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }

.admin-match-list { display: flex; flex-direction: column; gap: 8px; }
.admin-match-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-tile);
  padding: 10px 12px;
  font-size: 13px;
  flex-wrap: wrap;
}
.admin-match-row.bye { opacity: 0.6; box-shadow: none; }
.amr-players { display: flex; flex-direction: column; gap: 2px; }
.amr-players .winner { font-weight: 700; color: var(--color-secondary-hover); }
.amr-vs { color: var(--color-text-faint); font-size: 11px; }
.amr-result { display: flex; align-items: center; gap: 8px; }
.amr-score { font-family: var(--font-score); font-weight: 700; }

.match-edit-subtitle { color: var(--color-text-muted); margin-bottom: 12px; font-weight: 500; }
.set-score-form .set-score-header, .set-score-form .set-score-row {
  display: grid;
  grid-template-columns: 1fr 70px 70px;
  gap: 8px;
  align-items: center;
}
.set-score-header { font-size: 11px; color: var(--color-text-muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.03em; }
.set-score-row { margin-bottom: 6px; }
.set-label { font-size: 13px; font-weight: 600; text-transform: none; color: var(--color-text); }
.hint-text { font-size: 12px; color: var(--color-text-muted); }

@media (min-width: 600px) {
  .content { padding-bottom: 40px; }
  .tabbar { position: static; border-radius: var(--radius-card); margin-top: 24px; box-shadow: var(--shadow-card); background: var(--color-surface); }
}
