.standings-page { max-width: 1160px; }

.standings-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.standings-sidebar {
  position: sticky;
  top: 82px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: transparent;
}

.standings-sidebar-heading {
  margin: 0;
  padding: 13px 14px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 680;
  letter-spacing: 0.035em;
}

.standings-league-nav { display: grid; }

.standings-league-button {
  position: relative;
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--muted-strong);
  cursor: pointer;
  text-align: left;
  font-size: 0.84rem;
  font-weight: 620;
}

.standings-league-button:last-child { border-bottom: 0; }
.standings-league-button:hover { background: rgba(255, 255, 255, 0.022); color: var(--text); }

.standings-league-button.is-active {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 680;
}

.standings-league-button.is-active::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--accent);
  content: "";
}

.standings-mobile-picker { display: none; }

.standings-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: transparent;
  box-shadow: none;
}

.standings-panel-header {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.standings-panel-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 700;
}

.standings-season {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
}

.standings-content { min-height: 360px; }

.standings-state {
  display: grid;
  min-height: 360px;
  place-content: center;
  padding: 28px;
  text-align: center;
}

.standings-state strong {
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 690;
}

.standings-state p {
  max-width: 390px;
  margin: 8px auto 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.standings-state--error strong { color: var(--danger); }

.standings-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-variant-numeric: tabular-nums;
}

.standings-table th,
.standings-table td {
  height: 49px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted-strong);
  text-align: center;
  font-size: 0.8rem;
}

.standings-table th {
  height: 40px;
  background: #0a0d0a;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 670;
  letter-spacing: 0.015em;
}

.standings-table th abbr {
  text-decoration: none;
  cursor: help;
}

.standings-table tbody tr:last-child td { border-bottom: 0; }
.standings-table tbody tr:hover td { background: rgba(255, 255, 255, 0.015); }

.standings-position {
  width: 46px;
  color: var(--muted) !important;
  font-weight: 650;
}

.standings-team-column,
.standings-team-cell {
  width: auto;
  text-align: left !important;
}

.standings-team {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.standings-team img,
.standings-team-fallback {
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
}

.standings-team img { object-fit: contain; }

.standings-team-fallback {
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.56rem;
  font-weight: 720;
}

.standings-team-name {
  min-width: 0;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 640;
  line-height: 1.2;
  word-break: normal;
  overflow-wrap: normal;
}

.standings-table th:not(.standings-team-column),
.standings-table td:not(.standings-team-cell) { width: 52px; }

.standings-points {
  color: var(--text) !important;
  font-weight: 760;
}

@media (min-width: 901px) {
  .standings-league-button { font-size: 0.88rem; }
  .standings-table th,
  .standings-table td { font-size: 0.86rem; }
  .standings-table th { font-size: 0.72rem; }
  .standings-team-name { font-size: 0.92rem; }
  .standings-panel-header h2 { font-size: 1.16rem; }
}

@media (max-width: 760px) {
  .standings-layout { display: block; }
  .standings-sidebar { display: none; }

  .standings-mobile-picker {
    display: grid;
    gap: 6px;
    margin-bottom: 12px;
  }

  .standings-mobile-picker label {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 650;
  }

  .standings-mobile-picker select {
    width: 100%;
    min-height: 44px;
    padding: 0 40px 0 12px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    appearance: none;
    -webkit-appearance: none;
    background-color: var(--surface);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23c0c6bd' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px 8px;
    color: var(--text);
    font-size: 0.84rem;
    font-weight: 620;
  }

  .standings-panel { box-shadow: none; }

  .standings-panel-header {
    min-height: 58px;
    padding: 13px 13px;
  }

  .standings-panel-header h2 { font-size: 0.98rem; }
  .standings-season { font-size: 0.7rem; }
  .standings-content,
  .standings-state { min-height: 300px; }

  .standings-table { min-width: 0; table-layout: fixed; }
  .standings-col-desktop { display: none; }

  .standings-table th,
  .standings-table td {
    height: 47px;
    padding: 7px 5px;
    font-size: 0.74rem;
  }

  .standings-table th { height: 37px; font-size: 0.64rem; }
  .standings-position { width: 31px !important; }
  .standings-col-played { width: 34px !important; }
  .standings-col-gd { width: 40px !important; }
  .standings-points { width: 34px !important; }
  .standings-team-column,
  .standings-team-cell { width: auto !important; }
  .standings-team { gap: 7px; }
  .standings-team img,
  .standings-team-fallback { width: 24px; height: 24px; flex-basis: 24px; }
  .standings-team-name { font-size: 0.76rem; }
  .standings-team-fallback { font-size: 0.5rem; }
}
