/* --- Wrapper Principal --- */
.sa-standings-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    color: #333;
}

/* --- Abas --- */
.sa-main-tabs, .sa-sub-tabs {
    display: flex;
    background-color: #f7f7f7;
    padding: 0 10px;
}
.sa-main-tabs {
    border-bottom: 1px solid #e0e0e0;
}
.sa-main-tabs button, .sa-sub-tabs button {
    border: none;
    background: none;
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 600;
    color: #888;
    position: relative;
    font-size: 14px;
}
.sa-main-tabs button.active {
    color: #00529e;
}
.sa-main-tabs button.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: #00529e;
}
.sa-sub-tabs {
    padding-top: 5px;
}
.sa-sub-tabs button {
    font-size: 13px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 15px;
}
.sa-sub-tabs button.active {
    background-color: #e0e0e0;
    color: #333;
}
.sa-main-tabs button:disabled {
    cursor: not-allowed;
    color: #ccc;
}


/* --- Tabela --- */
.sa-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.sa-table th, .sa-table td {
    padding: 12px 8px;
    text-align: center;
}
.sa-table thead {
    background-color: #fff;
    color: #888;
    font-weight: 500;
    font-size: 12px;
}
.sa-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}
.sa-table .sa-team-col, .sa-table .sa-team-name {
    text-align: left;
}
.sa-table .sa-team-name {
    font-weight: 600;
    display: flex;
    align-items: center;
}
.sa-table .sa-team-name img {
    width: 24px;
    height: 24px;
    margin-right: 10px;
}
.sa-table .sa-rank {
    font-weight: 600;
}
.sa-table .sa-points {
    font-weight: 700;
}

/* --- Pílulas de V/E/D --- */
.sa-form-pill {
    display: inline-block;
    width: 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    border-radius: 50%;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    margin: 0 2px;
}
.sa-form-vitoria { background-color: #4caf50; }
.sa-form-empate { background-color: #ffc107; }
.sa-form-derrota { background-color: #f44336; }

/* --- Estilos para Posição e Links --- */
.sa-table .sa-rank {
    position: relative;
    padding-left: 15px; /* Espaço para a barra de cor */
}
.sa-rank-marker {
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}
.sa-team-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit; /* Herda a cor do texto normal */
    transition: color 0.2s ease;
}
.sa-team-link:hover {
    color: #00529e;
}

/* --- Estilos para a Legenda --- */
.sa-legend {
    padding: 15px;
    background-color: #f9f9f9;
    border-top: 1px solid #e0e0e0;
    font-size: 13px;
}
.sa-legend h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 14px;
    color: #555;
}
.sa-legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}
.sa-legend-color-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
}
/* --- Estilos para a Página de Detalhes do Time --- */
.sa-team-details-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
}
.sa-team-header {
    display: flex;
    align-items: center;
    padding: 20px;
    background-color: #f9f9f9;
    border-bottom: 1px solid #e0e0e0;
}
.sa-team-logo {
    width: 80px;
    height: 80px;
    margin-right: 20px;
}
.sa-team-info h1 {
    margin: 0 0 5px 0;
    font-size: 28px;
}
.sa-team-info p {
    margin: 0;
    color: #666;
}
.sa-venue-details {
    display: flex;
    padding: 20px;
}
.sa-venue-image {
    width: 200px;
    height: auto;
    border-radius: 8px;
    margin-right: 20px;
}
.sa-venue-info h3 {
    margin-top: 0;
}
/* --- Estilos para as Abas da Página do Time --- */
.sa-team-tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
}
.sa-team-tabs button {
    border: none;
    background: none;
    padding: 14px 16px;
    cursor: pointer;
    font-weight: 600;
    color: #555;
    position: relative;
}
.sa-team-tabs button.active {
    color: #c00; /* Cor de destaque, ex: vermelho */
}
.sa-team-tabs button.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: #c00;
}

/* --- Estilos para o Calendário --- */
.sa-calendar-wrapper {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
}
.sa-calendar-wrapper h4 {
    margin: 0 0 15px 0;
    font-size: 18px;
}
.sa-cal-item {
    display: grid;
    grid-template-columns: 40px 1fr auto 1fr auto;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}
.sa-cal-item:last-child {
    border-bottom: none;
}
.sa-cal-date, .sa-cal-league {
    font-size: 12px;
    color: #888;
}
.sa-cal-home-team, .sa-cal-away-team {
    text-align: center;
}
.sa-cal-home-team img, .sa-cal-away-team img {
    width: 28px;
    height: 28px;
}
.sa-cal-score { font-weight: bold; }
.sa-cal-time { font-size: 12px; color: #555; }
.sa-cal-league { grid-column: 2 / 5; grid-row: 2; text-align: center; margin-top: 5px; }
/* --- Melhorias no Calendário --- */
.sa-cal-item {
    display: grid;
    /* Colunas: Data | Time Casa | Placar/Hora | Time Fora | Competição */
    grid-template-columns: 45px 1fr auto 1fr;
    align-items: center;
    gap: 10px; /* Espaçamento entre os elementos */
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}
.sa-cal-item.proximo-jogo {
    background-color: #f0f8ff; /* Um azul bem claro para destacar */
    border-left: 3px solid #007bff;
    padding-left: 10px;
}
.sa-cal-team {
    display: flex;
    align-items: center;
    font-weight: 500;
}
.sa-cal-home-team {
    justify-content: flex-end; /* Alinha o time da casa à direita */
}
.sa-cal-away-team {
    justify-content: flex-start; /* Alinha o time de fora à esquerda */
}
.sa-cal-team img {
    width: 28px;
    height: 28px;
}
.sa-cal-home-team span { margin-right: 10px; }
.sa-cal-away-team span { margin-left: 10px; }
.sa-cal-score { font-weight: bold; font-size: 16px; }
.sa-cal-time { font-size: 13px; color: #555; }
.sa-cal-league { 
    grid-column: 2 / 5; /* Ocupa as 3 colunas centrais */
    grid-row: 2; 
    text-align: center; 
    margin-top: 5px; 
    font-size: 11px;
    color: #888;
}
/* --- Estilos para a Página de Elenco --- */
.sa-squad-wrapper {
    /* Opcional: pode adicionar um padding ou borda se desejar */
}
.sa-squad-group {
    margin-bottom: 25px;
}
.sa-squad-group h3 {
    font-size: 16px;
    color: #888;
    text-transform: uppercase;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    margin-bottom: 15px;
}
.sa-player-item {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    gap: 15px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f7f7f7;
}
.sa-player-item:last-child {
    border-bottom: none;
}
.sa-player-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.sa-player-info {
    display: flex;
    flex-direction: column;
}
.sa-player-info strong {
    font-weight: 600;
    font-size: 15px;
}
.sa-player-info span {
    font-size: 13px;
    color: #777;
}
.sa-player-number {
    font-size: 14px;
    color: #aaa;
    border: 1px solid #eee;
    padding: 4px 8px;
    border-radius: 4px;
}
/* --- Estilos para a Artilharia --- */
.sa-topscorers-wrapper {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background-color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.sa-topscorers-wrapper h4 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
}
.sa-topscorers-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: scorer-counter; /* Inicia o contador para o ranking */
}
.sa-scorer-item {
    display: grid;
    grid-template-columns: 1fr 40px 50px;
    gap: 15px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}
.sa-scorer-item:last-child {
    border-bottom: none;
}
.sa-scorer-item::before {
    counter-increment: scorer-counter;
    content: counter(scorer-counter);
    font-weight: 600;
    color: #888;
    width: 20px; /* Alinha o contador */
}
.sa-scorer-player {
    display: flex;
    align-items: center;
}
.sa-scorer-photo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
}
.sa-scorer-name {
    font-weight: 600;
    font-size: 15px;
}
.sa-scorer-team-logo {
    width: 28px;
    height: 28px;
}
.sa-scorer-goals {
    text-align: center;
}
.sa-scorer-goals strong {
    font-size: 18px;
    display: block;
}
.sa-scorer-goals span {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
}
/* --- Estilos para a Artilharia --- */
.sa-topscorers-wrapper {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background-color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.sa-topscorers-wrapper h4 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
}
.sa-topscorers-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: scorer-counter; /* Inicia o contador para o ranking */
}
.sa-scorer-item {
    display: grid;
    grid-template-columns: 1fr 40px 50px;
    gap: 15px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}
.sa-scorer-item:last-child {
    border-bottom: none;
}
.sa-scorer-item::before {
    counter-increment: scorer-counter;
    content: counter(scorer-counter);
    font-weight: 600;
    color: #888;
    width: 20px; /* Alinha o contador */
}
.sa-scorer-player {
    display: flex;
    align-items: center;
}
.sa-scorer-photo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
}
.sa-scorer-name {
    font-weight: 600;
    font-size: 15px;
}
.sa-scorer-team-logo {
    width: 28px;
    height: 28px;
}
.sa-scorer-goals {
    text-align: center;
}
.sa-scorer-goals strong {
    font-size: 18px;
    display: block;
}
.sa-scorer-goals span {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
}
/* --- Estilos para a Tabela de Artilharia e Estatísticas (Substitui os anteriores de .sa-topscorers-wrapper) --- */
.sa-player-stats-wrapper {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    padding: 20px;
    margin-bottom: 25px;
    overflow-x: auto; /* Permite scroll horizontal em telas pequenas */
}
.sa-player-stats-wrapper h4 {
    font-size: 20px;
    color: #333;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}
.sa-stats-table {
    width: 100%;
    border-collapse: collapse;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
}
.sa-stats-table th, .sa-stats-table td {
    padding: 10px 8px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}
.sa-stats-table thead th {
    background-color: #f8f8f8;
    color: #777;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 12px;
}
.sa-stats-table tbody tr:hover {
    background-color: #f9f9f9;
}
.sa-col-player-team {
    width: 250px; /* Ajuste a largura conforme necessário */
    display: flex;
    align-items: center;
}
.sa-player-photo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
}
.sa-player-name {
    font-weight: 600;
    color: #333;
    white-space: nowrap; /* Evita quebra de linha no nome */
}
.sa-team-name-small {
    font-size: 11px;
    color: #999;
    margin-left: 8px;
    display: flex;
    align-items: center;
    white-space: nowrap;
}
.sa-team-name-small img {
    width: 16px;
    height: 16px;
    margin-right: 4px;
}
.sa-rating-col {
    width: 120px; /* Largura para a coluna da nota */
    text-align: center;
}
.sa-rating-cell {
    text-align: center;
}
.sa-rating-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px; /* Largura para a pílula */
    height: 24px;
    border-radius: 4px;
    color: #fff;
    font-weight: 600;
    font-size: 12px;
}
/* Estilos para alinhar o ranking na primeira coluna, como na imagem */
.sa-stats-table th:first-child,
.sa-stats-table td:first-child {
    text-align: center;
    width: 30px;
}
/* --- Ajustes na Tabela de Estatísticas --- */
.sa-stats-table td, .sa-stats-table th {
    text-align: center; /* Centraliza todas as colunas por padrão */
    white-space: nowrap;
}
.sa-stats-table .sa-player-cell {
    text-align: left; /* Alinha a célula do jogador à esquerda */
}
.sa-stat-highlight {
    font-weight: 700;
    font-size: 16px;
    color: #000;
}
/* --- Estilos para a Lista de Resultados --- */
.sa-results-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin-top: 30px;
}
.sa-results-wrapper h4 {
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}
.sa-result-item {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}
.sa-result-item:last-child {
    border-bottom: none;
}
.sa-result-info {
    text-align: center;
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
}
.sa-result-match {
    display: flex;
    align-items: center;
    justify-content: center;
}
.sa-result-team {
    display: flex;
    align-items: center;
    flex: 1; /* Faz com que os times ocupem o espaço disponível */
    font-size: 15px;
    font-weight: 500;
}
.sa-result-home {
    justify-content: flex-end; /* Alinha o time da casa à direita */
}
.sa-result-away {
    justify-content: flex-start; /* Alinha o time visitante à esquerda */
}
.sa-result-team img {
    width: 24px;
    height: 24px;
    margin: 0 10px;
}
.sa-result-score {
    font-size: 18px;
    font-weight: 700;
    padding: 0 20px;
    min-width: 80px; /* Garante espaço para o placar */
    text-align: center;
}
/* --- Estilos para a Nova Tabela de Resultados Agrupados --- */
.sa-results-wrapper-grouped {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.sa-results-month-header {
    font-size: 18px;
    color: #333;
    margin: 25px 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}
.sa-results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.sa-results-table thead th {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    text-align: left;
    padding: 8px;
    font-weight: 500;
}
.sa-results-table tbody td {
    padding: 12px 8px;
    border-top: 1px solid #f0f0f0;
    vertical-align: middle;
}
.sa-table-jogo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
}
.sa-table-jogo img {
    width: 24px;
    height: 24px;
}
.sa-team-home, .sa-team-away {
    display: flex;
    align-items: center;
    flex-basis: 40%; /* Define uma base de largura para os nomes dos times */
}
.sa-team-home {
    justify-content: flex-end;
}
.sa-team-home img {
    margin-left: 10px;
}
.sa-team-away img {
    margin-right: 10px;
}
.sa-table-score {
    font-size: 16px;
    text-align: center;
    flex-grow: 1; /* Ocupa o espaço restante */
}
/* --- Estilos para as Estatísticas do Time --- */
.sa-stats-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
}
.sa-stats-column h3 {
    font-size: 16px;
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
    color: #333;
}
.sa-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}
.sa-stat-item:last-child {
    border-bottom: none;
}
.sa-stat-label {
    color: #666;
}
.sa-stat-value {
    font-weight: 600;
    color: #333;
}