/* Estilos de layout das páginas internas do app.
   Tokens, reset e fonte ficam em tokens.css (carregado antes deste arquivo). */
body {
    background: var(--bg);
    color: var(--ink)
}

.layout {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh
}

.sidebar {
    width: 220px;
    background: var(--grad-sidebar);
    color: var(--mist);
    padding: var(--space-20);
    flex-shrink: 0;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 400;
}

.sidebar .brand {
    font-size: 24px;
    margin-bottom: var(--space-14);
    color: var(--surface)
}

.nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-4)
}

.nav a {
    display: block;
    color: var(--nav-link);
    padding: var(--space-10);
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 400
}

.nav a:hover {
    background: color-mix(in srgb, var(--surface-white) 3%, transparent);
    color: var(--surface)
}

.nav a.active {
    background: var(--grad-coral);
    color: var(--surface);
    box-shadow: 0 6px 14px color-mix(in srgb, var(--coral) 12%, transparent)
}

.content {
    flex: 1;
    /* Sem min-width:0 o flex item cresce pra caber tabela larga (ex.: Meus palpites
       no mobile) e estoura a viewport -> a página "zooma". Isso segura no lugar e
       deixa o overflow ir pro .table-scroll. */
    min-width: 0;
    padding: var(--space-28)
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-8)
}

.card {
    background: var(--surface-white);
    border-radius: var(--radius-lg);
    padding: var(--space-10) var(--space-20);
    box-shadow: 0 6px 20px color-mix(in srgb, var(--slate) 6%, transparent)
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0 0 var(--space-8) 0;
    font-family: var(--font-display);
}

/* Tamanho canônico do h1 de conteúdo: sem isso o desktop herdava o default
   do navegador (2em) enquanto o mobile força 1.4rem - 3 tamanhos pro mesmo papel. */
h1 {
    font-size: 1.9rem;
}

.card form {
    display: flex;
    flex-direction: column;
    gap: var(--space-12)
}

.card label {
    font-size: 0.9rem;
    color: var(--ink)
}

.card input[type="text"],
.card input[type="datetime-local"],
.card input[type="number"],
.card textarea,
.card select {
    width: 100%;
    padding: var(--space-10);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    font-size: 1rem
}

.card button[type="submit"] {
    padding: var(--space-10) var(--space-14);
    border-radius: var(--radius);
    border: 0;
    background: var(--grad-coral);
    color: var(--surface);
    font-weight: 600;
    cursor: pointer;
    align-self: flex-start
}

.form-row {
    display: flex;
    gap: var(--space-12);
    align-items: center
}

.form-row .col {
    flex: 1
}

.form-row .col-narrow {
    width: 120px
}

.form-row .col input,
.form-row .col select,
.form-row .col textarea {
    width: 100%
}

@media (max-width:720px) {
    .form-row {
        flex-direction: column
    }

    .form-row .col-narrow {
        width: 100%
    }
}

.card input[type="date"] {
    padding: var(--space-10) var(--space-32) var(--space-10) var(--space-12);
    background-color: var(--surface);
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%239ca3af' d='M7 2h2v2h6V2h2v4H7V2zM5 7h14v13H5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-10) center;
    background-size: 20px 20px;
    -webkit-appearance: none;
    appearance: none;
}

.card input[type="datetime-local"]:focus {
    outline: none;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--coral) 8%, transparent);
    border-color: var(--coral)
}

.topbar .username {
    color: var(--ink);
    background: transparent;
    padding: var(--space-6) var(--space-8);
    margin-right: var(--space-8)
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: var(--space-8)
}

.btn-logout {
    background: var(--grad-coral);
    color: var(--surface);
    padding: var(--space-8) var(--space-10);
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600
}

.link-muted {
    color: var(--muted);
    text-decoration: none;
    padding: var(--space-6) var(--space-8)
}

@media (max-width:880px) {
    .sidebar { display: none; }

    .content {
        padding: var(--space-16) var(--space-14);
        padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px) + var(--space-16));
    }
}

.ranking-section {
    margin-top: var(--space-24);
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-top: var(--space-16);
}

.ranking-table th,
.ranking-table td {
    padding: var(--space-14) var(--space-20);
    text-align: left;
    border-bottom: 1px solid var(--line);
}

.ranking-table th {
    background: var(--surface);
    color: var(--muted);
    font-size: 1rem;
    text-transform: uppercase;
    font-weight: 400;
    font-family: var(--font-display);
}

.ranking-table tr:last-child td {
    border-bottom: none;
}

.ranking-table tr:hover {
    background: var(--surface);
}

.ranking-table .pos {
    font-weight: 700;
    color: var(--ink);
    width: 40px;
}

.ranking-table .pts {
    font-weight: 700;
    color: var(--coral);
    text-align: right;
}

.ranking-table th.pts {
    text-align: right;
}

.ranking-table .is-current-user {
    background: var(--coral-bg);
}

.ranking-table .is-current-user td {
    border-bottom-color: var(--coral);
}

.home-content-layout {
    display: flex;
    gap: var(--space-32);
    margin-top: var(--space-24);
}

.home-content-layout>.card {
    flex: 3;
}

.home-content-layout>.odds-section {
    flex: 7;
}

@media (max-width: 1024px) {
    .home-content-layout {
        flex-direction: column;
    }
}

.odds-section {
    margin-top: 0;
}

.odds-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-top: 0;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--slate) 5%, transparent);
    table-layout: fixed;
}

.odds-table th,
.odds-table td {
    padding: var(--space-12) var(--space-16);
    text-align: center;
    border-bottom: 1px solid var(--line);
}

.odds-table th {
    background: var(--surface);
    color: var(--muted);
    font-size: 1rem;
    text-transform: uppercase;
    font-weight: 400;
    font-family: var(--font-display)
}

.odds-table .match-info {
    text-align: left;
    font-weight: 600;
    width: 40%;
    overflow: auto;
    text-overflow: ellipsis;
}

.odds-table th:not(.match-info) {
    width: 15%;
}

.odds-table .odd-value {
    font-family: var(--font-display);
    font-variant-numeric: tabular-nums;
    color: var(--odd);
    font-weight: 600;
    background: var(--odd-bg);
    padding: var(--space-6) var(--space-12);
    border-radius: var(--radius-sm);
}

@media (hover: hover) {
    .odds-table .odds-row:hover {
        background: var(--surface);

    }
}

.odds-table .no-odds {
    color: var(--muted);
    font-size: 0.8rem;
    font-style: italic;
}

.odds-table .guess-cta {
    background: var(--coral-bg);
    border-radius: var(--radius-sm);
    color: var(--coral);
    font-size: 1rem;
    font-weight: 600;
    padding: var(--space-6) var(--space-8);
    text-decoration: none;
    white-space: nowrap;
}

.odds-table .guess-cta:hover {
    text-decoration: underline;
}

.odds-table .odd-picked {
    box-shadow: inset 0 0 0 2px var(--coral);
    font-weight: 700;
}

.score-pill {
    display: inline-block;
    font-family: inherit;
    font-weight: 600;
    padding: var(--space-4) var(--space-14);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    background: var(--bg);
    color: var(--slate);
}

.score-pill--result {
    background: var(--mist);
    color: var(--ink);
}

.score-pill.is-exact {
    background: var(--green-strong);
    color: var(--green-soft);
}

.score-pill.is-diff {
    background: var(--green-soft);
    color: var(--green-deep);
}

.score-pill.is-winner {
    background: var(--yellow-soft);
    color: var(--brown-deep);
}

.score-pill.is-miss {
    background: var(--red-soft);
    color: var(--red-deep);
}

.score-pill .penalty-line {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0.8;
    margin-top: var(--space-2);
    padding-top: var(--space-2);
    border-top: 1px solid color-mix(in srgb, var(--slate) 12%, transparent);
}

.tabs-container {
    margin-top: var(--space-20);
}

.tabs-header {
    display: flex;
    gap: var(--space-10);
    border-bottom: 2px solid var(--mist);
    margin-bottom: var(--space-20);
}

.tab-button {
    padding: var(--space-10) var(--space-20);
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 600;
    color: var(--muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tab-button:hover {
    color: var(--ink);
}

.tab-button.active {
    color: var(--coral);
    border-bottom-color: var(--coral);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.match-today-highlight {
    border-left: 4px solid var(--coral);
    background-color: var(--coral-bg);
}

.odds-table .chip-sym {
    display: none;
}

.odds-table .day-header-cell {
    text-align: left;
    background: var(--surface);
    font-weight: 400;
    padding: var(--space-12);
    color: var(--muted);
    border-bottom: 2px solid var(--line);
    font-size: 1rem;
    font-family: var(--font-display);

}

/* ===== Mobile (≤640px) tabelas legíveis no celular ===== */
@media (max-width:640px) {
    .content {
        padding: var(--space-14) var(--space-12);
        padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px) + var(--space-16));
    }

    h1 {
        font-size: 1.4rem;
        font-family: var(--font-display);
    }

    .ranking-table th,
    .ranking-table td {
        padding: var(--space-10) var(--space-12)
    }

    .odds-table {
        box-shadow: none;
        overflow: visible
    }

    .odds-table thead {
        display: none
    }

    .odds-table tbody,
    .odds-table tr,
    .odds-table td {
        display: block;
        width: 100%
    }

    .odds-table .odds-row {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        column-gap: var(--space-6);
        row-gap: var(--space-8);
        align-items: stretch;
        padding: var(--space-12) var(--space-10);
        border-bottom: 1px solid var(--line)
    }

    .odds-row td {
        border: none;
        padding: 0;
        width: auto
    }

    .odds-row .match-info {
        grid-column: 1 / 3;
        grid-row: 1;
        align-self: baseline;
        width: auto;
        min-width: 0;
        font-size: 1rem;
        font-weight: 600
    }

    .odds-row .col-time {
        grid-column: 3;
        grid-row: 1;
        align-self: baseline;
        text-align: right;
        color: var(--muted);
        font-size: 0.9rem
    }

    .odds-row .col-odd,
    .odds-row .col-guess-cell {
        grid-row: 2;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: var(--space-4);
        min-height: 28px;
        border-radius: var(--radius-sm);
        font-size: 0.9rem
    }

    .odds-row .col-odd {
        background: var(--odd-bg);
        padding: var(--space-4)
    }

    .odds-row .col-odd.is-pick {
        box-shadow: inset 0 0 0 2px var(--coral);
        font-weight: 700
    }

    .odds-row .chip-sym {
        display: inline;
        font-size: 0.9rem;
        line-height: 1
    }

    .odds-row .col-odd .odd-value {
        background: none;
        padding: 0;
        box-shadow: none
    }

    .odds-row .col-odd .no-odds {
        font-size: 0.9rem
    }

    .odds-row .col-guess-cell {
        flex-direction: column;
        gap: var(--space-2);
    }

    .odds-row .col-guess-cell>* {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 28px;
        margin: 0;
        font-size: 0.9rem
    }

    .odds-row .col-guess-cell .score-pill {
        padding: 0 var(--space-4)
    }

    .odds-row .col-guess-cell .pens-winner {
        min-height: auto;
        width: auto;
        margin-left: 0;
    }

    .odds-row .col-guess-cell .guess-cta {
        background: var(--coral-bg);
        color: var(--coral);
        border-radius: var(--radius-sm);
        padding: 0 var(--space-4)
    }

    /* Só a tabela de ODDS da Home esconde o placar no mobile (ele reaparece na
       coluna de horário). A tabela de Partidas (.data-table) também usa
       .col-score e NÃO pode sumir - por isso o escopo em .odds-row. */
    .odds-row .col-score { display: none; }

    .odds-row .score-mobile {
        display: block;
        font-size: 0.9rem;
        font-weight: 700;
        color: var(--coral);
    }

    .odds-row .col-time:has(.score-mobile) time { display: none; }

}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead tr {
    text-align: left;
    border-bottom: 2px solid var(--line);
}

.data-table th,
.data-table td {
    padding: var(--space-12) var(--space-8);
}

.data-table tbody tr {
    border-bottom: 1px solid var(--line);
}

.data-table .center {
    text-align: center;
}

.data-table tbody tr.is-previous {
    background-color: var(--surface);
}

.data-table tbody tr.is-pending {
    background-color: var(--coral-bg);
}

.btn {
    display: inline-block;
    border: 0;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.btn-success {
    background-color: var(--green-strong);
    color: var(--surface);
    padding: var(--space-8) var(--space-16);
}

.btn-sm {
    padding: var(--space-6) var(--space-14);
}

.row-actions {
    align-items: center;
    display: flex;
    gap: var(--space-12);
    justify-content: center;
}

.action-edit {
    background: var(--odd-bg);
    border-radius: var(--radius-sm);
    color: var(--odd);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    padding: var(--space-8);
    text-decoration: none;
}

.card button.action-delete,
.action-delete {
    background: var(--red-soft);
    border-radius: var(--radius-sm);
    color: var(--red-strong);
    font-family: inherit;
    font-size: 0.9rem;
    padding: var(--space-8);
}

.form-inline {
    display: inline;
    margin: 0;
}

.link-add {
    margin-left: var(--space-12);
    color: var(--coral);
    font-weight: 600;
    text-decoration: none;
}

.empty-state {
    text-align: center;
    color: var(--muted);
    padding: var(--space-20);
}

.placeholder {
    color: var(--muted-2);
    font-style: italic;
}

.placeholder.is-small {
    font-size: 0.75rem;
}

.badge-you {
    font-size: 0.75rem;
    color: var(--coral);
    font-weight: 700;
}

.icon-muted {
    color: var(--muted-2);
    cursor: default;
}

.table-scroll {
    overflow-x: auto;
}

.score-pill.is-help {
    cursor: help;
}

.score-pill--lg {
    font-size: 1.05rem;
    padding: var(--space-8) var(--space-20);
}

/* Placar real - coluna desktop; no mobile o score-mobile substitui a hora no col-time */
.odds-row .score-mobile { display: none; }

.odds-table th.col-score-head,
.odds-table td.col-score,
.odds-table th.col-guess,
.odds-table td.col-guess-cell { text-align: right; }

.col-score .score-real { font-weight: 700; color: var(--ink); }

/* Selo "ao vivo" ao lado do placar em andamento (Partidas/Home). Deixa claro
   que o placar é atual, não final - o jogo ficava com cara de "Agendado". */
.live-tag {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--coral);
}
.live-tag::before {
    content: "● ";
}

.cell-muted {
    color: var(--muted);
    font-size: 0.85rem;
}

/* Badge do classificado nos pênaltis (desktop: inline ao lado; mobile: abaixo) */
.pens-winner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2) var(--space-6);
    border-radius: 999px;
    font-size: 0.95rem;
    line-height: 1;
    background: var(--coral-bg);
    border: 1px solid var(--coral);
    margin-left: var(--space-6);
}

.topbar h2 {
    margin: 0;
}

.form-actions {
    margin-top: var(--space-20);
    display: flex;
    gap: var(--space-12);
    align-items: center;
}

.winner-section {
    margin-top: var(--space-16);
}

.col-vs {
    text-align: center;
    align-self: flex-end;
    padding-bottom: var(--space-10);
    font-weight: 700;
}

.readonly-field {
    padding: var(--space-10);
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    font-weight: 600;
}

.filter-block {
    margin-bottom: var(--space-16);
}

.filter-label {
    font-weight: 700;
    margin-bottom: var(--space-8);
    display: block;
}

.match-summary {
    margin-bottom: var(--space-16);
    text-align: center;
}

.summary-meta {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: var(--space-8);
}

/* --- Calendário de palpites (tela cadastrar palpite) --------------------- */
.cal-card {
    margin-bottom: var(--space-20);
}

.cal-head h2 {
    margin: 0;
    color: var(--ink);
}

.cal-sub {
    margin: var(--space-4) 0 var(--space-16);
    font-size: 0.85rem;
    color: var(--muted);
}

.cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-12);
    margin-bottom: var(--space-12);
}

.cal-nav-label {
    flex: 1;
    text-align: center;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--slate);
}

.cal-arrow {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--slate);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.cal-arrow:hover:not(:disabled) {
    background: var(--grad-coral);
    border-color: transparent;
    color: var(--surface);
}

.cal-arrow:disabled {
    opacity: 0.4;
    cursor: default;
}

.cal-month {
    display: none;
}

.cal-month.is-active {
    display: block;
}

/* Título do mês: escondido no mobile (o carrossel mostra na nav),
   visível no desktop (onde os dois meses aparecem lado a lado). */
.cal-month-title {
    display: none;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: var(--space-6);
}

.cal-grid+.cal-grid {
    margin-top: var(--space-6);
}

.cal-dow-row {
    margin-bottom: var(--space-6);
}

.cal-dow {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--muted-2);
    padding: var(--space-2) 0;
}

.cal-day {
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
    font-family: inherit;
    padding: 0;
}

.cal-num {
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1;
}

.cal-count {
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1;
    opacity: 0.85;
}

.cal-day.is-blank {
    border-color: transparent;
    background: transparent;
}

/* Folga: dia sem jogo no meio da Copa (buraco entre fases) - visível mas vazio */
.cal-day.is-folga {
    background: var(--surface);
    border-style: dashed;
    color: var(--muted-2);
    cursor: help;
}

.cal-day.is-complete {
    background: var(--green-soft);
    border-color: var(--green-strong);
    color: var(--green-deep);
}

.cal-day.is-open {
    background: var(--coral-bg);
    border-color: var(--coral);
    color: var(--red-strong);
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.cal-day.is-open:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--ink) 10%, transparent);
}

.cal-day.is-open:focus-visible {
    outline: 2px solid var(--coral);
    outline-offset: 2px;
}

.cal-day.is-past {
    background: var(--mist);
    border-color: var(--line);
    color: var(--muted);
}

/* Dia da Copa ainda sem partidas pra palpitar (mata-mata futuro) */
.cal-day.is-fixture {
    background: var(--odd-bg);
    border-color: var(--odd);
    color: var(--odd);
}

.cal-day.is-today {
    box-shadow: 0 0 0 2px var(--coral);
}

/* Dia selecionado no filtro do calendário - anel coral mais forte (clicar de novo limpa) */
.cal-day.is-selected {
    box-shadow: 0 0 0 3px var(--coral), 0 4px 10px color-mix(in srgb, var(--coral) 25%, transparent);
    transform: translateY(-1px);
}

/* Dia da final - dourado da paleta (vence as demais cores de estado) */
.cal-day.is-final {
    background: var(--yellow-soft);
    border-color: var(--brown-deep);
    color: var(--brown-deep);
}

.cal-day.is-final .cal-count {
    font-size: 0.8rem;
    opacity: 1;
}

.cal-empty-month {
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
    padding: var(--space-28) var(--space-10);
}

.cal-legend {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    gap: var(--space-10) var(--space-16);
    margin-top: var(--space-16);
    padding-top: var(--space-14);
    border-top: 1px solid var(--line);
}

.cal-legend-item {
    display: inline-flex;
    align-items: center;
    gap: var(--space-6);
    font-size: 0.78rem;
    color: var(--slate);
}

.cal-dot {
    width: 14px;
    height: 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    flex-shrink: 0;
}

.cal-dot.is-complete {
    background: var(--green-soft);
    border-color: var(--green-strong);
}

.cal-dot.is-open {
    background: var(--coral-bg);
    border-color: var(--coral);
}

.cal-dot.is-past {
    background: var(--mist);
}

.cal-dot.is-fixture {
    background: var(--odd-bg);
    border-color: var(--odd);
}

.cal-dot.is-final {
    background: var(--yellow-soft);
    border-color: var(--brown-deep);
}

@media (max-width: 640px) {
    .cal-grid {
        gap: var(--space-4);
    }

    .cal-num {
        font-size: 0.74rem;
    }
}

/* Maior que mobile: mostra os dois meses lado a lado (versão anterior) e
   dispensa o carrossel. O foco do projeto ainda é mobile. */
@media (min-width: 720px) {
    .cal-nav {
        display: none;
    }

    .cal-panels {
        display: flex;
        gap: var(--space-32);
        align-items: flex-start;
    }

    .cal-month {
        display: block;
        flex: 1 1 0;
        min-width: 0;
    }

    .cal-month+.cal-month {
        border-left: 1px solid var(--line);
        padding-left: var(--space-32);
    }

    .cal-month-title {
        display: block;
        margin: 0 0 var(--space-14);
        font-size: 1rem;
        font-weight: 700;
        color: var(--slate);
        text-align: center;
        letter-spacing: 0.01em;
    }
}

/* --- Placar do palpite (scoreboard) ------------------------------------- */
.sb-caption {
    display: block;
    margin-bottom: var(--space-6);
    font-size: 0.8rem;
    color: var(--muted);
}

.scoreboard {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: var(--space-10);
    margin: 0 0 var(--space-4);
    padding: var(--space-16) var(--space-14);
    background: var(--bg);
    border-radius: var(--radius-lg);
}

.sb-side {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-10);
}

.sb-name {
    max-width: 100%;
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--slate);
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.sb-x {
    flex: 0 0 auto;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--muted-2);
    padding-bottom: var(--space-14);
}

.card .scoreboard .sb-input {
    width: 76px;
    max-width: 100%;
    text-align: center;
    font-size: 1.7rem;
    font-weight: 700;
    padding: var(--space-10) var(--space-6);
    color: var(--ink);
}

.card .scoreboard .sb-input:focus {
    outline: none;
    border-color: var(--coral);
    box-shadow: 0 0 0 3px var(--coral-bg);
}

.sb-input::placeholder {
    color: var(--muted-2);
    font-weight: 600;
    opacity: 1;
}

/* ═══ Ao Vivo - placar de estádio (tela /ao-vivo) ═══════════════════════════ */

/* Link "Ao Vivo" na sidebar, com bolinha pulsante */
.nav a.nav-live {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.nav-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--coral-2);
    flex-shrink: 0;
    animation: navpulse 1.6s ease-out infinite;
}

@keyframes navpulse {
    0% {
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--coral) 60%, transparent);
    }

    70% {
        box-shadow: 0 0 0 6px transparent;
    }

    100% {
        box-shadow: 0 0 0 0 transparent;
    }
}

/* -- Navegação inferior (mobile ≤880px) ------------------------------------ */
.bottom-nav { display: none; }

@media (max-width: 880px) {
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 100;
        background: var(--grad-bottom-nav);
        border-top: 1px solid color-mix(in srgb, white 8%, transparent);
        padding-bottom: env(safe-area-inset-bottom, 0px);
        box-shadow: 0 -4px 24px color-mix(in srgb, var(--ink) 28%, transparent);
    }

    .bottom-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: var(--space-4);
        padding: var(--space-10) var(--space-2) var(--space-8);
        min-height: 58px;
        color: var(--nav-link);
        text-decoration: none;
        font-size: 0.6rem;
        font-family: var(--font-display);
        font-weight: 400;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        transition: color 0.15s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .bottom-nav-item.active { color: var(--coral); }

    .bottom-nav-item svg {
        width: 22px;
        height: 22px;
        flex-shrink: 0;
        transition: transform 0.15s ease;
    }

    .bottom-nav-item.active svg { transform: scale(1.1); }

    /* Ícone "Ao Vivo" - usa o dot pulsante em vez de SVG */
    .bottom-nav-live-icon {
        width: 22px;
        height: 22px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .bottom-nav-item .nav-live-dot {
        width: 12px;
        height: 12px;
    }

    .bottom-nav-item.active .nav-live-dot { background: var(--coral); }
}

/* Barra de transmissão (hero) */
.live-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-12);
    padding: var(--space-16) var(--space-20);
    border-radius: var(--radius-lg);
    background: var(--grad-coral);
    color: var(--surface);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px color-mix(in srgb, var(--ink) 18%, transparent);
}

.live-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(0deg, color-mix(in srgb, var(--surface-white) 3%, transparent) 0 1px, transparent 1px 3px);
}

.live-hero-main {
    display: flex;
    align-items: center;
    gap: var(--space-12);
}

.live-hero-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.9rem;
    letter-spacing: 0.12em;
}

.live-hero-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--coral-2);
    box-shadow: 0 0 14px 2px var(--yellow-soft);
    animation: livepulse 1.3s ease-in-out infinite;
}

@keyframes livepulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(0.65);
        opacity: 0.5;
    }
}

.live-hero-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-2);
    text-align: right;
}

.live-hero-count {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--coral-2);
}

.live-hero-clock {
    font-family: var(--font-display);
    font-weight: 500;
    letter-spacing: 0.08em;
    font-variant-numeric: tabular-nums;
    opacity: 0.85;
}

/* Barra com o toggle de cartões */
.live-bar {
    display: flex;
    justify-content: flex-end;
    margin: var(--space-10) 0 var(--space-16);
}

.live-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-8);
    font-size: 0.8rem;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
}

.live-toggle input {
    width: 16px;
    height: 16px;
    accent-color: var(--coral);
    cursor: pointer;
}

/* Estados */
.live-state {
    text-align: center;
    color: var(--muted);
    padding: var(--space-32) var(--space-16);
}

.live-state.is-error {
    color: var(--red-strong);
}

/* Grade de cards */
.live-matches {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-16);
}

@media (min-width: 720px) {
    .live-matches {
        grid-template-columns: 1fr 1fr;
    }
}

/* Card de jogo (painel de transmissão) */
.live-card {
    background: var(--surface-white);
    color: var(--ink);
    border-radius: var(--radius-lg);
    padding: var(--space-16);
    border: 1px solid var(--line);
    box-shadow: 0 4px 16px color-mix(in srgb, var(--ink) 6%, transparent);
    position: relative;
    overflow: hidden;
}

.live-card.is-live {
    border-color: color-mix(in srgb, var(--coral) 40%, transparent);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--coral) 20%, transparent), 0 8px 20px color-mix(in srgb, var(--coral) 10%, transparent);
}

.live-card.is-finished {
    opacity: 0.92;
}

.live-status {
    display: flex;
    align-items: center;
    gap: var(--space-10);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.live-badge {
    font-family: var(--font-display);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: var(--space-6);
    padding: var(--space-4) var(--space-10);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
}

.live-card.is-live .live-badge {
    background: var(--coral);
    color: var(--surface-white);
}

.live-card.is-finished .live-badge {
    color: var(--muted-2);
}

.live-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--surface-white);
    animation: livepulse 1.1s ease-in-out infinite;
}

.live-min {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--coral);
}

.live-card.is-live .live-min {
    color: var(--coral);
}

.live-round {
    margin-left: auto;
    color: var(--muted-2);
}

/* Placar */
.live-score {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--space-10);
    margin: var(--space-14) 0;
}

.live-team-name {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.live-team-a {
    text-align: right;
}

.live-team-b {
    text-align: left;
}

.live-nums {
    display: flex;
    align-items: center;
    gap: var(--space-10);
    font-family: var(--font-display);
}

.live-num {
    font-weight: 700;
    font-size: 2.6rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.live-sep {
    opacity: 0.4;
    font-size: 1.6rem;
}

.live-nums.is-kickoff .live-kickoff {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--coral);
    letter-spacing: 0.04em;
}

.live-pens {
    text-align: center;
    font-family: var(--font-display);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    color: var(--coral);
    margin: calc(-1 * var(--space-4)) 0 var(--space-8);
}

/* Feed de gols + cartões */
.live-events {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    padding-top: var(--space-12);
    border-top: 1px solid var(--line);
}

.live-event {
    display: inline-flex;
    align-items: center;
    gap: var(--space-4);
    font-size: 0.8rem;
    padding: var(--space-4) var(--space-8);
    border-radius: 999px;
    background: var(--surface);
    color: var(--slate);
}

.live-event b {
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 600;
}

.live-event.side-A {
    align-self: flex-start;
    box-shadow: inset 3px 0 0 var(--coral);
}

.live-event.side-B {
    align-self: flex-end;
    box-shadow: inset -3px 0 0 var(--odd);
}

/* Cartão (mini retângulo amarelo/vermelho - em vez de emoji) */
.live-cardicon {
    display: inline-block;
    width: 8px;
    height: 11px;
    border-radius: 1px;
    flex-shrink: 0;
}

.live-cardicon.is-yellow {
    background: var(--yellow-strong);
}

.live-cardicon.is-red {
    background: var(--red-strong);
}

/* Checkbox desmarcado - esconde cartões (e o feed se só sobraram cartões) */
.hide-cards .live-event.is-card {
    display: none;
}

.hide-cards .live-events:not(:has(.live-event.is-goal)) {
    display: none;
}

/* Comemoração de gol - flash "GOOOL" */
.goal-flash {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.goal-flash[hidden] {
    display: none;
}

.goal-flash::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, color-mix(in srgb, var(--coral) 18%, transparent), transparent 60%);
    animation: goalfade 0.4s ease both;
}

.goal-flash-inner {
    text-align: center;
    position: relative;
}

.goal-flash-word {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(3rem, 18vw, 9rem);
    letter-spacing: 0.04em;
    background: var(--grad-coral);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.goal-flash-scorer {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.4rem;
    color: var(--ink);
    margin-top: var(--space-8);
}

.goal-flash.is-on .goal-flash-word {
    animation: goalpop 0.6s cubic-bezier(0.2, 1.4, 0.3, 1) both;
}

.goal-flash.is-on .goal-flash-scorer {
    animation: goalfade 0.5s 0.2s both;
}

@keyframes goalpop {
    0% {
        transform: scale(0.3) rotate(-6deg);
        opacity: 0;
    }

    60% {
        transform: scale(1.1) rotate(2deg);
        opacity: 1;
    }

    100% {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

@keyframes goalfade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {

    .nav-live-dot,
    .live-hero-dot,
    .live-badge-dot {
        animation: none;
    }

    .goal-flash.is-on .goal-flash-word,
    .goal-flash.is-on .goal-flash-scorer {
        animation: none;
    }

    .goal-flash::before {
        animation: none;
    }
}

/* -- Placar automático (controle em Partidas/Home) --------------------------
   Badge "ao vivo" + botão "Atualizar". Cores via --coral/color-mix, espaços via
   var(--space-N); pílula 999px segue o padrão do .live-badge. */
.placares-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-6);
    padding: var(--space-6) var(--space-12);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--coral);
    background: color-mix(in srgb, var(--coral) 12%, transparent);
    white-space: nowrap;
}

.placares-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--coral-2);
    animation: placarespulse 1.4s ease-in-out infinite;
}

@keyframes placarespulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--coral) 50%, transparent);
    }

    70% {
        box-shadow: 0 0 0 6px color-mix(in srgb, var(--coral) 0%, transparent);
    }
}

.placares-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-6);
    padding: var(--space-8) var(--space-16);
    color: var(--coral);
    background: color-mix(in srgb, var(--coral) 12%, transparent);
}

.placares-btn:hover {
    background: color-mix(in srgb, var(--coral) 20%, transparent);
}

.placares-btn:disabled {
    cursor: progress;
    opacity: 0.7;
}

.placares-ico {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-top-color: transparent;
}

.placares-btn.is-loading .placares-ico {
    animation: placaresspin 0.7s linear infinite;
}

@keyframes placaresspin {
    to {
        transform: rotate(360deg);
    }
}

.placares-toast {
    position: fixed;
    left: 50%;
    bottom: var(--space-24);
    transform: translateX(-50%) translateY(10px);
    padding: var(--space-10) var(--space-16);
    border-radius: var(--radius);
    background: var(--ink);
    color: var(--surface-white);
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 6px 20px color-mix(in srgb, var(--ink) 25%, transparent);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 60;
    pointer-events: none;
}

.placares-toast.is-on {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (prefers-reduced-motion: reduce) {

    .placares-dot,
    .placares-btn.is-loading .placares-ico {
        animation: none;
    }

    .placares-toast {
        transition: none;
    }
}