/* League stats panel + results archive — SwiftScore dark theme. */

/* ---- League stats panel (free aggregate) ---- */
.league-stats h3 { font-size: .92rem; margin: 0 0 .4rem; }

.ls-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: .6rem;
  margin: .25rem 0 1rem;
}
.ls-metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .65rem .5rem;
  text-align: center;
}
.ls-num { display: block; font-size: 1.25rem; font-weight: 800; color: var(--brand); line-height: 1.1; }
.ls-lbl { display: block; font-size: .72rem; color: var(--muted); margin-top: .2rem; }

.ls-split {
  display: flex;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin: .2rem 0 .35rem;
}
.ls-seg { display: block; height: 100%; }
.ls-seg-h { background: var(--brand); }
.ls-seg-d { background: var(--muted); }
.ls-seg-a { background: var(--warn, #e0a23b); }
.ls-split-key { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }

.ls-lists {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.ls-rank { list-style: none; margin: 0; padding: 0; counter-reset: ls; }
.ls-rank li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .35rem 0;
  border-bottom: 1px solid var(--line);
  counter-increment: ls;
}
.ls-rank li:last-child { border-bottom: 0; }
.ls-rank li::before {
  content: counter(ls);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  min-width: 1.4rem;
  height: 1.4rem;
  margin-right: .5rem;
  font-size: .72rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 50%;
}
.ls-rank li a { flex: 1; text-decoration: none; color: inherit; }
.ls-rank li a:hover { color: var(--brand); }
.ls-val { font-weight: 700; font-variant-numeric: tabular-nums; }
.ls-biggest { margin-top: 1rem; }

/* ---- Results archive ---- */
.archive-filter {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1rem;
}
.archive-filter label { color: var(--muted); font-size: .85rem; }
.archive-filter select {
  background: var(--surface);
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .45rem .6rem;
  font: inherit;
}

.archive-table th, .archive-table td { vertical-align: middle; }
.archive-table .ar-sc { text-align: center; width: 5.5rem; }
.archive-table .ar-se { text-align: right; white-space: nowrap; }
.ar-team a { text-decoration: none; color: inherit; }
.ar-team a:hover { color: var(--brand); }
.ar-row { cursor: pointer; }
.ar-row:hover { background: var(--surface); }
.ar-score {
  display: inline-block;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  padding: .1rem .45rem;
  border-radius: 6px;
}

.archive-pager {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  margin-top: 1rem;
}
.archive-pager .is-disabled { opacity: .4; pointer-events: none; }
.archive-note { margin-top: 1rem; }
.archive-note a { color: var(--brand); }

/* Season-by-season history table (canonical club, all seasons) */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.season-table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 520px; }
.season-table th, .season-table td { padding: .5rem .55rem; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
.season-table th { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
.season-table td.st-season { text-align: left; font-weight: 700; }
.season-table tbody tr:hover { background: var(--surface-2); }
.form-mini { display: inline-flex; gap: 2px; }
.form-mini i { width: 16px; height: 16px; border-radius: 4px; font-style: normal; font-size: .62rem; font-weight: 800; line-height: 16px; color: #0b0f14; }
.form-mini .fm-W { background: var(--brand); }
.form-mini .fm-D { background: var(--warn); }
.form-mini .fm-L { background: var(--danger); }
@media (max-width: 600px) { .season-table .hide-sm { display: none; } .season-table { min-width: 0; } }
