:root {
    --bg: #0f172a;
    --panel: #1e293b;
    --accent: #38bdf8;
    --text: #e2e8f0;
    --muted: #94a3b8;
}

/* O padding passa a ser incluído na largura declarada, em vez de se
   somar a ela — sem isto, qualquer elemento com "width:100%" e algum
   padding fica sempre um pouco mais largo do que o ecrã (foi isto que
   estava a cortar ligeiramente o lado direito do cabeçalho e do body
   em ecrãs pequenos). */
*, *::before, *::after {
    box-sizing: border-box;
}



body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
}

.body-entrada {
     background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
         url('/images/stadium-1137e9c5202d7a03205f60aa1712f764.jpg') no-repeat center center/cover;
     place-items: center;
 }

.body-jogo {
     background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
         url('/images/stadium-1137e9c5202d7a03205f60aa1712f764.jpg') no-repeat center center/cover;
 }

.hero {
    margin-top: 24px;
}

.hero-eyebrow {
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--muted);
    margin-bottom: 6px;
}

.hero-titulo {
    font-size: 52px;
    font-weight: 700;
    font-family: 'Fredoka', 'Segoe UI', sans-serif;
    text-align: center;
    margin: 0 0 10px;
    background: linear-gradient(135deg, var(--accent) 0%, #a78bfa 60%, #f59e0b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.1;
}

.hero p {
    font-size: 18px;
    margin-bottom: 40px;
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
    text-align: left;
    display: flex;
}

.form-group label {
    width: 140px; /* espaço fixo para todas as labels */
    text-align: left;
    margin-right: 10px;
}

.form-group-registo {
    margin-bottom: 15px;
    text-align: left;
    display: flex;
}

.form-group-registo label {
    width: 240px; /* espaço fixo para todas as labels */
    text-align: left;
    margin-right: 10px;
}

.form-group-registo input {
    width: 232px; /* espaço fixo para todas as labels */
}

.form-group-registo select {
    width: 240px; /* espaço fixo para todas as labels */
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: black !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__rendered {
    color: black !important;
}

.select2-container--default .select2-results__option {
    color: black !important;
}

.social-login {
    margin-top: 20px;
}

.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    padding: 10px;
    border-radius: 5px;
    text-decoration: none;
    color: white;
    font-weight: bold;

    transition: 0.3s;
}

.social-btn i {
    font-size: 18px;
}

/* Google */
.google {
    background-color: #db4437;
}

.google:hover {
    background-color: #c23321;
}

/* Facebook */
.facebook {
    background-color: #1877f2;
}

.facebook:hover {
    background-color: #145dbf;
}

.register-btn {
    display: inline-block;
    margin-top: 15px;

    padding: 10px 15px;
    border-radius: 6px;

    background: var(--bg);
    color: white;
    font-weight: bold;
    text-decoration: none;

    transition: all 0.3s ease;
}

/* Hover */
.register-btn:hover {
    background: var(--bg);
    transform: scale(1.05);
}

/* Clique */
.register-btn:active {
    transform: scale(0.97);
}

/* 🔴 ERRO */
.error {
    background-color: #ff4d4d;
    color: white;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    text-align: center;
    font-weight: bold;
    border-left: 5px solid #cc0000;
    width: 450px;
}

/* SUCESSO */
.sucess {
    background-color: #4db34d;
    color: white;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    text-align: center;
    font-weight: bold;
    border-left: 5px solid #00cc00;
    width: 450px;
}

/* Layout */
.container {
    display: flex;
}

.sidebar {
    width: 250px;
    background: #020617;
    min-height: 100vh;
    padding: 20px;
    position: sticky;
    top: 0;
    align-self: flex-start;
    height: 100vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #334155 transparent;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}
.sidebar::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 3px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

.sidebar a {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    color: var(--text);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 5px;
    border-left: 3px solid transparent;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.sidebar a:hover {
    background: var(--panel);
    transform: translateX(2px);
}

.sidebar-reportar {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #1e293b;
    width: 100%;
    background: none;
    border-left: none;
    border-right: none;
    border-bottom: none;
    font-family: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    color: var(--muted);
    display: flex;
    align-items: center;
    padding-left: 12px;
    padding-right: 12px;
    padding-bottom: 10px;
    border-radius: 8px;
    transition: color 0.15s, background 0.15s;
}
.sidebar-reportar:hover {
    color: var(--accent);
    background: var(--panel);
}

.reporte-contador {
    font-size: 11px;
    color: var(--muted);
    text-align: right;
    margin-top: -4px;
}
.reporte-contador-limite {
    color: #f87171;
    font-weight: bold;
}

/* Item correspondente à página actual */
.sidebar a.sidebar-ativo {
    background: var(--panel);
    border-left-color: var(--accent);
    font-weight: bold;
    color: var(--accent);
}

/* Alerta (bolinha) — ex: receitas de patrocinadores por recolher */
.sidebar-alerta {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    margin-left: auto;
    box-shadow: 0 0 4px rgba(239, 68, 68, 0.7);
}

/* Separador visual antes dos itens soltos finais (Transferências) */
a.sidebar-link[href="/transferencias"] {
    margin-top: 14px;
    position: relative;
}
a.sidebar-link[href="/transferencias"]::before {
    content: '';
    position: absolute;
    top: -9px;
    left: 4px;
    right: 4px;
    border-top: 1px solid #1e293b;
}

/* ── Grupos "Clube" / "Competições" — abrem submenu ao passar o rato ──── */
.sidebar-grupo {
    position: relative;
    margin-bottom: 5px;
}

.sidebar-grupo-titulo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    color: var(--text);
    border-radius: 8px;
    cursor: default;
    user-select: none;
    border-left: 3px solid transparent;
    transition: background 0.15s;
    font-weight: 600;
}

.sidebar-grupo-titulo::after {
    content: '▸';
    color: var(--muted);
    font-size: 12px;
    margin-left: 8px;
    transition: transform 0.15s;
}

.sidebar-grupo:hover > .sidebar-grupo-titulo {
    background: var(--panel);
}

.sidebar-grupo:hover > .sidebar-grupo-titulo::after {
    transform: rotate(90deg);
}

/* Grupo que contém a página actual fica sempre visivelmente marcado */
.sidebar-grupo.sidebar-grupo-ativo > .sidebar-grupo-titulo {
    border-left-color: var(--accent);
    color: var(--accent);
}

.sidebar-submenu {
    display: none;
    flex-direction: column;
    padding-left: 14px;
    border-left: 2px solid #1e293b;
    margin: 2px 0 2px 12px;
}

.sidebar-grupo:hover .sidebar-submenu,
.sidebar-grupo.sidebar-grupo-ativo .sidebar-submenu {
    display: flex;
}

.sidebar-submenu a {
    font-size: 14px;
    padding: 8px 10px;
}

/* Header */
.header {
    background: var(--panel);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #1e293b;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 10;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 20px;
    margin-bottom: 16px;
    border-bottom: 1px solid #1e293b;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.15s;
}
.sidebar-logo:hover {
    opacity: 0.85;
}

/* Mesmo emblema usado no cabeçalho da página de entrada */
.sidebar-logo-emblema {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fredoka', 'Segoe UI', sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.03em;
    color: #0f172a;
    background: linear-gradient(135deg, var(--accent) 0%, #a78bfa 60%, #f59e0b 100%);
    box-shadow: 0 3px 10px rgba(56,189,248,0.35), inset 0 1px 0 rgba(255,255,255,0.4);
}

.sidebar-logo-nome {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.header-equipa {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.team-name {
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 0.02em;
}

.manager-name {
    font-size: 13px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.manager-icon {
    font-size: 12px;
    opacity: 0.8;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logout-btn {
    background: transparent;
    color: #f87171;
    border: 1px solid #7f1d1d;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.logout-btn:hover {
    background: #7f1d1d;
    border-color: #ef4444;
    color: #fff;
}

.general-btn {
    background: #0f172a;
    color: var(--text);
    border: 1px solid #334155;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    position: relative;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.header-badge-nao-lidas {
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    margin-left: -2px;
}

.general-btn span {
    white-space: nowrap;
}

.general-btn:hover {
    background: #1e293b;
    border-color: var(--accent);
    transform: translateY(-1px);
}

.general-btn:active {
    transform: translateY(0);
}

.general-btn-premium {
    border-color: #f59e0b;
    color: #fbbf24;
}
.general-btn-premium:hover {
    background: #422f0a;
    border-color: #f59e0b;
}

/* Ecrãs mais estreitos — esconder o texto dos botões, manter só o ícone */
@media (max-width: 900px) {
    .general-btn span { display: none; }
    .general-btn { padding: 8px 10px; }
}

.link-btn {
    color: var(--accent);
}

/* Cards */
.card {
    background: var(--panel);
    padding: 15px;
    border-radius: 10px;
    margin: 10px;
}

.grid {
    display: flex;
    flex-wrap: wrap;
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
}

td, th {
    padding: 8px;
    border-bottom: 1px solid #334155;
}

/* Buttons */

button {
    background: var(--accent);
    border: none;
    padding: 8px 12px;
    color: black;
    border-radius: 6px;
    cursor: pointer;
}

.entrada-btn {
    width: 100%;
    padding: 10px;
    background-color: #00c853;
    border: none;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

/* Modal — aberta via style="display:flex" pelo JS */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    overflow-y: auto;
    z-index: 1000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 10px;
    box-sizing: border-box;
}

/* A modal do jogador deve aparecer sempre por cima de outras modais
   (ex.: aberta a partir do relatório do jogo, das formações, etc.),
   que usam o z-index base de 1000 */
#playerModal {
    z-index: 1050;
}

/* Bloqueia o scroll do fundo enquanto uma modal está aberta — evita que
   o utilizador perca a modal de vista ao arrastar a página por baixo,
   sobretudo em ecrãs pequenos */
body.modal-aberta {
    overflow: hidden;
}

.modal-content {
    background: var(--panel);
    margin: 0 auto;
    padding: 20px;
    width: 90%;
    max-width: 1100px;
    border-radius: 10px;
    flex-shrink: 0;
}


.badge-posicao {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    background: #334155;
    color: var(--text);
}

.badge-posicao.GR { background: #7c3aed; }
.badge-posicao.DC,
.badge-posicao.DD,
.badge-posicao.DE { background: #0369a1; }
.badge-posicao.MC,
.badge-posicao.MD,
.badge-posicao.ME { background: #065f46; }
.badge-posicao.AV { background: #b45309; }

/* Estrelas */
.estrelas {
    display: inline-flex;
    gap: 1px;
    line-height: 1;
}

.estrela { font-size: 16px; }
.estrela.cheia { color: #f59e0b !important; }
.estrela.meia  { color: #f59e0b !important; opacity: 0.55; }
.estrela.vazia { color: #334155 !important; }

/* Cabeçalho da modal */
.player-modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.player-modal-header .badge-posicao {
    font-size: 16px;
    padding: 4px 12px;
}

/* Grelha de duas colunas */
.player-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 16px;
}

/* Secção dentro da modal */
.player-modal-section h4 {
    color: var(--accent);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    border-bottom: 1px solid #334155;
    padding-bottom: 6px;
}

/* Linha de detalhe */
.player-modal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 14px;
    border-bottom: 1px solid #1e293b;
}

.player-modal-row > span:first-child { color: var(--muted); }
.player-modal-row > span:last-child  { font-weight: bold; }

/* Atributos com barra */
.atributo-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
    font-size: 14px;
}

.atributo-label {
    width: 130px;
    color: var(--muted);
    flex-shrink: 0;
}

.atributo-barra {
    flex: 1;
    height: 8px;
    background: #334155;
    border-radius: 4px;
    overflow: hidden;
}

.atributo-barra-fill {
    height: 100%;
    border-radius: 4px;
    background: var(--accent);
}

.atributo-barra-fill.alto  { background: #22c55e; }
.atributo-barra-fill.medio { background: #f59e0b; }
.atributo-barra-fill.baixo { background: #ef4444; }

.atributo-val {
    width: 28px;
    text-align: right;
    font-weight: bold;
    font-size: 13px;
}

/* Botão fechar modal (✕) — partilhado */
.btn-fechar-tatica {
    background: transparent;
    border: 1px solid #334155;
    color: var(--muted);
    font-size: 16px;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 6px;
    line-height: 1;
    flex-shrink: 0;
}

.btn-fechar-tatica:hover {
    color: var(--text);
    border-color: var(--text);
}

/* overflow-x for tatica modal scroll */
.modal {
    overflow-x: auto;
}

/* Condição física — partilhado entre plantel, treino, tática e modal */
.cond-alta  { color: #22c55e; font-weight: bold; }
.cond-media { color: #f59e0b; font-weight: bold; }
.cond-baixa { color: #ef4444; font-weight: bold; }

/* Valores monetários com tooltip — partilhado */
.valor-monetario {
    cursor: help;
    border-bottom: 1px dotted var(--muted);
    text-decoration: none;
}

/* ── Tags de jogador — formação, transferência, lesão ──── */
.tag-formacao,
.tag-transferencia,
.tag-lesao,
.tag-amarelos,
.tag-suspensao {
    font-size: 13px;
    cursor: help;
    vertical-align: middle;
    white-space: nowrap;
}

.tag-lesao {
    color: #fca5a5;
    font-weight: bold;
    font-size: 12px;
}

.tag-amarelos {
    color: #f59e0b;
    font-weight: bold;
    font-size: 12px;
}

.tag-suspensao {
    color: #ef4444;
    font-weight: bold;
    font-size: 12px;
}

/* ── Histórico do jogador na modal ──────────────────────── */
.player-modal-historico {
    margin-top: 20px;
    padding-top: 0;
}

.player-modal-historico h4 {
    color: var(--accent);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 12px;
    border-bottom: 1px solid #334155;
    padding-bottom: 6px;
}

.tabela-historico {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.tabela-historico th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    padding: 6px 8px;
    border-bottom: 2px solid #334155;
    font-weight: bold;
    text-align: left;
}

.tabela-historico th[title] { cursor: help; }

.tabela-historico td {
    padding: 6px 8px;
    border-bottom: 1px solid #1e293b;
    vertical-align: middle;
}

.tabela-historico .col-num {
    text-align: center;
    width: 40px;
}

.tabela-historico tbody tr:hover { background: #1e293b; }

.hist-transfer-null { color: var(--muted); font-style: italic; }

/* ── Ações de transferência na modal do jogador ─────────── */
.pm-transferencia-acoes-header {
    display: flex;
    gap: 6px;
    align-items: center;
}

.btn-pm-transfer {
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s;
    white-space: nowrap;
}
.btn-pm-transfer:hover { opacity: 0.85; }

.btn-pm-vender  { background: #f59e0b; color: #0f172a; }
.btn-pm-remover { background: #475569; color: #f1f5f9; }
.btn-pm-comprar { background: #15803d; color: #f0fdf4; }

/* ── Modais de confirmação ──────────────────────────────── */
.modal-confirm { z-index: 1100; } /* acima da modal do jogador */

.modal-confirm-content {
    max-width: 420px;
    padding: 20px 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-confirm-content h3 { margin: 0; font-size: 16px; }

.modal-confirm-content p {
    margin: 0;
    font-size: 14px;
    color: var(--text);
}

.confirm-nota {
    font-size: 12px;
    color: var(--muted);
    background: #1e293b;
    border: 1px solid #334155;
    border-left: 3px solid #f59e0b;
    padding: 8px 12px;
    border-radius: 6px;
    line-height: 1.5;
}

.confirm-acoes {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-bottom: 0;
}

.btn-confirm-ok {
    background: var(--accent);
    color: #0f172a;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    padding: 8px 18px;
    cursor: pointer;
    font-size: 13px;
}
.btn-confirm-ok:hover { opacity: 0.85; }

.confirm-erro {
    font-size: 12px;
    color: #fca5a5;
    background: #7f1d1d;
    border: 1px solid #ef4444;
    border-radius: 6px;
    padding: 8px 12px;
}

/* ══════════════════════════════════════════════════════
   Caixa de selecção com setas de navegação (anterior/seguinte)
   — usado em Campeonato, Taça, Mundial de Clubes, Jogos,
   Transferências (Histórico) e Finanças.
   ══════════════════════════════════════════════════════ */
.select-com-setas {
    display: flex;
    align-items: center;
    gap: 0;
}

.select-com-setas select {
    flex: 1;
    border-radius: 0;
}

.select-com-setas .btn-seta-select:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}

.select-com-setas select + .btn-seta-select {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: none;
}

.btn-seta-select {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    background: #0f172a;
    color: var(--text);
    border: 1px solid #334155;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
    z-index: 1;
}

.btn-seta-select:hover:not(:disabled) {
    border-color: var(--accent);
    background: #1e293b;
    z-index: 2;
}

.btn-seta-select:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Cabeçalho da página de entrada ──────────────────────────── */
.entrada-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 28px;
    background: var(--panel);
    border-bottom: 1px solid #1e293b;
}

.entrada-header-titulo {
    font-weight: 800;
    font-size: 15px;
    color: var(--text);
}

.entrada-header-esquerda {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Emblema "ECM" no cabeçalho da entrada — pensado para parecer um
   pequeno ícone/logótipo da aplicação, não apenas texto */
.entrada-header-logo {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fredoka', 'Segoe UI', sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.03em;
    color: #0f172a;
    background: linear-gradient(135deg, var(--accent) 0%, #a78bfa 60%, #f59e0b 100%);
    box-shadow: 0 3px 10px rgba(56,189,248,0.35), inset 0 1px 0 rgba(255,255,255,0.4);
}

.entrada-header-manual {
    color: var(--accent);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 7px 14px;
    transition: background 0.15s, color 0.15s;
}
.entrada-header-manual:hover {
    background: var(--accent);
    color: #0f172a;
}

/* ── Banner de consentimento de cookies/RGPD ─────────────────── */
.cookie-consent-banner {
    display: none;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 900;
    background: #0f172a;
    border-top: 1px solid #334155;
    padding: 16px 24px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
}
.cookie-consent-banner p {
    margin: 0;
    font-size: 13px;
    color: var(--text);
    max-width: 760px;
    line-height: 1.5;
}
.cookie-consent-botoes {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}
.cookie-consent-aceitar, .cookie-consent-recusar {
    padding: 9px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid #334155;
}
.cookie-consent-aceitar {
    background: var(--accent);
    color: #0f172a;
    border-color: var(--accent);
}
.cookie-consent-recusar {
    background: transparent;
    color: var(--muted);
}
.cookie-consent-recusar:hover {
    color: var(--text);
}

/* ── Espaços reservados para publicidade (passiva, futura) ──────
   Marcados de forma bem visível de propósito, para se perceber já
   o impacto no layout — quando os anúncios reais forem activados,
   este estilo passa a discreto/neutro. Nunca aparecem para
   utilizadores com Premium activo. */
.ad-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: repeating-linear-gradient(45deg, #1e293b, #1e293b 10px, #172033 10px, #172033 20px);
    border: 2px dashed #475569;
    border-radius: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.ad-placeholder-topo {
    height: 90px;
    margin: 16px 20px 0;
}

.ad-placeholder-sidebar {
    height: 250px;
    margin: 16px 0;
}

.ad-placeholder-label {
    background: rgba(15,23,42,0.75);
    padding: 6px 12px;
    border-radius: 6px;
}

/* ══════════════════════════════════════════════════════════════
   MENU LATERAL — painel deslizante em ecrãs pequenos
   ══════════════════════════════════════════════════════════════ */
.sidebar-toggle-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 6px;
    margin-right: 10px;
    flex-shrink: 0;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 999;
}
.sidebar-backdrop-visivel {
    display: block;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVO — tablets e telemóveis
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    /* Impede que a PÁGINA (não um elemento em particular) fique alguma
       vez mais larga do que o ecrã. É esse arrastamento horizontal do
       documento todo — normalmente causado por algum conteúdo largo
       nalgum sítio — que faz o cabeçalho "fixed" parecer deslizar
       junto com o resto da página em vários browsers móveis. Qualquer
       conteúdo demasiado largo passa a ser cortado aqui, em vez de
       alargar a página; os elementos que já têm o próprio scroll
       interno (tabelas, timeline, etc.) continuam a funcionar na mesma. */
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }
    .container {
        overflow-x: hidden;
    }

    .sidebar-toggle-btn {
        display: block;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: 4px 0 20px rgba(0,0,0,0.4);
    }
    .sidebar.sidebar-aberta {
        transform: translateX(0);
    }

    .header {
        padding: 8px 10px;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 10px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 500;
    }
    /* Espaço reservado no topo do conteúdo, já que o cabeçalho passou a
       "fixed" (fica sempre no mesmo sítio, mesmo com arrastamento
       horizontal do resto da página) e sai do fluxo normal */
    .main-content {
        padding-top: var(--altura-header-mobile, 90px);
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        overflow-y: visible;
    }
    .main-content .ad-placeholder-topo {
        margin-top: 0 !important;
    }
    .sidebar-toggle-btn {
        padding: 4px;
        margin-right: 6px;
    }
    .sidebar-toggle-btn svg {
        width: 18px;
        height: 18px;
    }
    .team-name {
        font-size: 15px;
    }
    .manager-name {
        font-size: 11px;
    }
    /* Botão "Sair" mais pequeno, para caber junto com o resto dos
       botões (incluindo o de Fóruns) sem ficar cortado */
    .logout-btn {
        padding: 6px 8px;
        font-size: 11px;
    }
    .logout-btn svg {
        width: 13px;
        height: 13px;
        margin-right: 0 !important;
    }
    .header-actions {
        gap: 3px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    .header-actions .general-btn span {
        display: none;
    }
    .header-actions .general-btn {
        padding: 6px;
        font-size: 12px;
    }
    .logout-btn span {
        display: none;
    }

    .body-jogo {
        padding: 12px !important;
        width: 100%;
        max-width: 100vw;
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
    }

    .card {
        margin: 6px 0;
        padding: 12px;
    }

    .grid {
        gap: 10px;
    }

    /* Formulários — label por cima do campo em vez de lado a lado */
    .form-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .form-group label {
        width: auto;
        margin-right: 0;
    }

    /* Tabelas largas — scroll horizontal em vez de sobreposição/esmagamento */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* Modais — nunca mais largas do que o ecrã */
    .modal-content {
        width: 94vw;
        max-width: 94vw;
        max-height: 90vh;
        overflow-y: auto;
        padding: 16px;
    }

    .ad-placeholder-topo {
        height: 60px;
        margin: 10px 12px 0;
        font-size: 10px;
    }

    /* Estatísticas do hero (Informação Geral / Equipa) — menos colunas */
    .geral-hero-stats {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Modal do jogador — botões de transferência só com o ícone, para
       não espremerem o resto da linha do cabeçalho (nome, posição) */
    .player-modal-header {
        flex-wrap: wrap;
    }
    .btn-pm-transfer span {
        display: none;
    }
    .btn-pm-transfer {
        padding: 7px 10px;
        font-size: 14px;
    }

    /* Modal do jogador — barras de atributos maiores e mais legíveis */
    .atributo-row {
        gap: 8px;
    }
    .atributo-label {
        width: 92px;
        font-size: 12px;
    }
    .atributo-barra {
        height: 14px;
    }
    .player-modal-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .team-name {
        font-size: 15px;
    }
    .hero-titulo {
        font-size: 34px;
    }
    .header-actions .general-btn-premium span {
        display: none;
    }

    .geral-hero-stats {
        grid-template-columns: 1fr !important;
    }
}

/* ── Botão de táctica de um jogo — partilhado por Informação Geral,
   Jogos, Campeonato, Taça e Mundial de Clubes (estava só em
   campeonato.css, por isso não aparecia estilizado nas páginas que
   não carregam esse ficheiro) ─────────────────────────────────── */
.btn-jornada-tatica {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    white-space: nowrap;
    background: var(--accent);
    color: #0f172a;
}

.btn-jornada-tatica:hover { opacity: 0.85; }

.btn-jornada-tatica.btn-tatica-definida {
    background: #065f46;
    color: #6ee7b7;
    border: 1px solid #22c55e;
}

.btn-jornada-tatica.btn-tatica-definida:hover {
    background: #047857;
    opacity: 1;
}

.btn-jornada-tatica:disabled {
    background: #334155;
    color: var(--muted);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Botão de relatório de um jogo — partilhado (estava só em
   campeonato.css, com o mesmo problema do botão de táctica acima) */
.btn-jornada-relatorio {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    border-radius: 5px;
    padding: 3px 8px;
    font-size: 12px;
    cursor: pointer;
    margin-left: 4px;
}
.btn-jornada-relatorio:hover { background: rgba(56,189,248,0.1); }

/* ── Aviso com o "title" de um elemento, mostrado também ao toque
   (telemóvel/tablet) — ver jogo-utils.js ────────────────────────── */
.toque-title-toast {
    display: none;
    position: fixed;
    z-index: 99999;
    max-width: 260px;
    background: #0f172a;
    color: var(--text);
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1.4;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    pointer-events: none;
}
.toque-title-toast.toque-title-toast-visivel {
    display: block;
}

/* ── Etiqueta Casa/Fora/Neutro de um jogo — partilhada por Informação
   Geral, Jogos, Consulta de Outras Equipas (estava só em jogos.css,
   por isso não aparecia com fundo nas páginas que não carregam esse
   ficheiro, como a Informação Geral) ─────────────────────────────── */
.badge-local {
    display: inline-block;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 6px;
    vertical-align: middle;
    text-transform: uppercase;
}

.badge-local.casa {
    background: #065f46;
    color: #6ee7b7;
}

.badge-local.fora {
    background: #1e3a5f;
    color: #93c5fd;
}

.badge-local.neutro {
    background: #422f0a;
    color: #fbbf24;
}

/* ── Rodapé com links legais (Privacidade/Termos) — entrada e layout ── */
.rodape-legal {
    text-align: center;
    padding: 16px 10px;
    font-size: 12px;
    color: var(--muted);
}
.rodape-legal a {
    color: var(--muted);
    text-decoration: none;
}
.rodape-legal a:hover {
    color: var(--accent);
    text-decoration: underline;
}
.rodape-legal span {
    margin: 0 8px;
}

/* ── Aceitação dos Termos/Privacidade no registo ─────────────────── */
.form-group-aceitar-termos {
    display: block;
}
.form-group-aceitar-termos label.label-aceitar-termos {
    display: flex;
    width: auto;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    font-weight: normal;
    cursor: pointer;
    line-height: 1.5;
    margin-right: 0;
}
.label-aceitar-termos input[type="checkbox"] {
    width: auto;
    margin-top: 3px;
    flex-shrink: 0;
    cursor: pointer;
}
.label-aceitar-termos a {
    color: var(--accent);
}

/* ── Aviso de versão de testes — página de Entrada ───────────────── */
.aviso-versao-testes {
    background: #422f0a;
    color: #fbbf24;
    border-bottom: 1px solid #78350f;
    text-align: center;
    padding: 10px 16px;
    font-size: 13px;
    line-height: 1.5;
}
.aviso-versao-testes strong {
    color: #fde68a;
}
