@charset "UTF-8";

/* ============================================
   CAMPEONATO DE CLUBES - ESTILO PRINCIPAL
   Tema: Verde claro moderno + cards arredondados
   ============================================ */

/* ---------- VARIÁVEIS GLOBAIS ---------- */
:root {
    --verde-principal: #2e7d64;
    --verde-claro: #e6f7ec;
    --verde-destaque: #166534;
    --verde-hover: #1f5e4a;
    --verde-fundo: #f0fdf4;
    --cinza-texto: #1e3a2f;
    --cinza-suave: #4b6b5c;
    --branco: #ffffff;
    --borda-card: #c7e9d0;
    --sombra-leve: 0 10px 20px rgba(0, 0, 0, 0.05);
    --sombra-media: 0 8px 20px rgba(0, 0, 0, 0.08);
    --raio-card: 32px;
    --raio-botao: 40px;
}

/* ---------- RESET E BASE ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background-color: var(--verde-fundo);
    color: var(--cinza-texto);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ---------- TIPOGRAFIA ---------- */
h1, h2, h3, h4 {
    font-weight: 600;
    letter-spacing: -0.3px;
}
h1 { font-size: 2.5rem; color: var(--verde-destaque); }
h2 { font-size: 1.8rem; margin-bottom: 1rem; }
h3 { font-size: 1.4rem; }

/* ---------- CONTAINER ---------- */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ---------- HERO (TÍTULO CENTRALIZADO) ---------- */
.hero {
    text-align: center;
    padding: 3rem 1rem;
}
.hero .btn-primary {
    margin-top: 1.2rem;
}

/* ---------- BOTÕES ---------- */
.btn, .btn-primary, .btn-outline, .btn-plano {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border-radius: var(--raio-botao);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 0.95rem;
}
.btn-primary {
    background-color: var(--verde-principal);
    color: var(--branco);
}
.btn-primary:hover {
    background-color: var(--verde-hover);
    transform: scale(1.02);
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--verde-principal);
    color: var(--verde-principal);
}
.btn-outline:hover {
    background-color: var(--verde-principal);
    color: var(--branco);
}
.btn-plano {
    background-color: var(--verde-principal);
    color: var(--branco);
    text-decoration: none;
}
.btn-plano:hover:not(:disabled) {
    background-color: var(--verde-hover);
    transform: scale(1.02);
}
.btn-plano:disabled {
    background: #b8dec5;
    cursor: not-allowed;
}
.btn-danger {
    background-color: #dc2626;
    color: white;
}
.btn-danger:hover {
    background-color: #b91c1c;
}
.btn-sm {
    padding: 0.3rem 1rem;
    font-size: 0.8rem;
}

/* Remove sublinhado de todos os estados dos botões */
.btn-primary, .btn-primary:link, .btn-primary:visited, .btn-primary:active,
.btn-plano, .btn-plano:link, .btn-plano:visited, .btn-plano:active {
    text-decoration: none;
    color: white;
}

/* ---------- NAVBAR (responsiva) ---------- */
.navbar {
    background-color: var(--verde-principal);
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.nav-container {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.logo a {
    font-size: 1.7rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}
.logo span {
    color: #d9f99d;
}
.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}
.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: 0.2s;
}
.nav-links a:hover {
    color: #d9f99d;
}
.btn-outline-light {
    border: 1px solid white;
    padding: 0.4rem 1rem;
    border-radius: 30px;
}
.btn-outline-light:hover {
    background-color: white;
    color: var(--verde-principal);
}
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}
@media (max-width: 768px) {
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 1rem;
        margin-top: 1rem;
        text-align: center;
    }
    .nav-links.show {
        display: flex;
    }
    .nav-toggle {
        display: block;
    }
    .navbar {
        padding: 0.8rem 1rem;
    }
}

/* ---------- CARDS DE FACILIDADES ---------- */
.features {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    margin: 3rem 0;
}
.feature-card {
    background: var(--branco);
    border-radius: var(--raio-card);
    padding: 1.8rem;
    width: 260px;
    text-align: center;
    box-shadow: var(--sombra-leve);
    border: 1px solid var(--borda-card);
    transition: transform 0.2s;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--sombra-media);
}
.feature-card .icon {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}
.feature-card h3 {
    margin-bottom: 0.8rem;
    color: var(--verde-destaque);
}
.feature-card p {
    color: var(--cinza-suave);
}

/* ---------- PLANOS ---------- */
.planos {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    margin: 3rem 0;
}
.plano-card {
    background: var(--branco);
    border-radius: var(--raio-card);
    padding: 2rem;
    width: 280px;
    text-align: center;
    border: 1px solid var(--borda-card);
    transition: transform 0.2s;
    box-shadow: var(--sombra-leve);
}
.plano-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--sombra-media);
}
.plano-card .preco {
    font-size: 2rem;
    font-weight: bold;
    margin: 1rem 0;
    color: var(--verde-destaque);
}
.plano-card .preco small {
    font-size: 0.7rem;
}
.plano-card ul {
    list-style: none;
    margin: 1rem 0;
}
.plano-card li {
    margin: 0.5rem 0;
    color: var(--cinza-suave);
}
.plano-destaque {
    border-color: var(--verde-principal);
    background: #f9fff9;
}
.plano-atual-badge {
    background: var(--verde-principal);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    display: inline-block;
    margin-bottom: 1rem;
}

/* ---------- LIGAS PÚBLICAS ---------- */
.ligas-publicas {
    background: #e9f9ef;
    border-radius: 48px;
    padding: 2rem;
    margin-top: 2rem;
    text-align: center;
}
.ligas-publicas h2,
.ligas-publicas p {
    text-align: center;
}
.ligas-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
}
.liga-btn {
    background: var(--branco);
    border: 1px solid var(--borda-card);
    padding: 0.6rem 1.4rem;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}
.liga-btn.ativa, .liga-btn:hover {
    background-color: var(--verde-principal);
    color: var(--branco);
    border-color: var(--verde-principal);
}
.info-liga {
    text-align: left;
    background: white;
    border-radius: 28px;
    padding: 1.5rem;
    margin-top: 1rem;
    box-shadow: var(--sombra-leve);
}
.liga-detalhes-ajax .classificacao-table,
.liga-detalhes-ajax table {
    width: 100%;
    display: block;
    overflow-x: auto;
}

/* ---------- FORMULÁRIOS ---------- */
input, select, textarea {
    width: 100%;
    padding: 0.8rem;
    margin: 0.5rem 0 1rem;
    border: 1px solid var(--borda-card);
    border-radius: 16px;
    font-size: 1rem;
    background: var(--branco);
}
label {
    font-weight: 600;
    margin-top: 0.5rem;
    display: block;
}
form .btn {
    margin-top: 1rem;
}

/* ---------- TABELAS ---------- */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--branco);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--sombra-leve);
}
.table th, .table td {
    padding: 0.8rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--borda-card);
}
.table th {
    background-color: var(--verde-claro);
    color: var(--verde-destaque);
}
.table tr:hover {
    background-color: #f9fff9;
}
.table-responsive {
    overflow-x: auto;
}

/* ---------- CLASSIFICAÇÃO ---------- */
.classificacao-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 24px;
    overflow: hidden;
}
.classificacao-table th, .classificacao-table td {
    padding: 0.75rem;
    text-align: center;
    border-bottom: 1px solid #d4eade;
}
.classificacao-table th {
    background: #e6f7ec;
    color: #166534;
}
.classificacao-table td:first-child, .classificacao-table th:first-child {
    text-align: left;
}

/* ---------- DASHBOARD ---------- */
.dashboard-header {
    background: white;
    border-radius: 32px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--sombra-leve);
    border: 1px solid var(--borda-card);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.welcome {
    font-size: 1.4rem;
    color: var(--verde-destaque);
}
.plano-info {
    background: var(--verde-claro);
    padding: 0.8rem 1.2rem;
    border-radius: 24px;
    font-size: 0.9rem;
}
.dashboard-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.liga-card {
    background: white;
    border-radius: 24px;
    padding: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    border: 1px solid #d4eade;
    transition: 0.2s;
}
.liga-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.liga-nome {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--verde-principal);
}
.liga-data {
    font-size: 0.8rem;
    color: #6c8b7a;
}
.liga-actions a {
    margin-left: 0.8rem;
    padding: 0.4rem 1rem;
    border-radius: 30px;
    text-decoration: none;
    font-size: 0.85rem;
    display: inline-block;
}
.btn-sm-primary {
    background: var(--verde-principal);
    color: white;
}
.btn-sm-outline {
    border: 1px solid var(--verde-principal);
    color: var(--verde-principal);
    background: transparent;
}
.btn-excluir {
    border-color: #dc2626;
    color: #dc2626;
}
.btn-small-danger {
    background: #dc2626;
    border: none;
    color: white;
    border-radius: 30px;
    cursor: pointer;
    padding: 0.3rem 0.8rem;
    font-size: 0.75rem;
    text-decoration: none;
    display: inline-block;
    margin-left: 0.5rem;
}
.btn-small-danger:hover {
    background: #b91c1c;
}
.btn-small-warning {
    background: #f59e0b;
    border: none;
    color: white;
    border-radius: 30px;
    cursor: pointer;
}
.status-badge {
    display: inline-block;
    padding: 0.2rem 0.8rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: bold;
}
.status-planejado { background: #fef3c7; color: #92400e; }
.status-andamento { background: #d1fae5; color: #065f46; }
.status-finalizado { background: #fee2e2; color: #991b1b; }

/* ---------- ADMIN ---------- */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}
.admin-container h1 {
    text-align: center;
    color: #166534;
    margin-bottom: 2rem;
}
.stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 2rem;
}
.stat-card {
    background: white;
    border-radius: 32px;
    padding: 1.5rem;
    text-align: center;
    min-width: 200px;
    box-shadow: var(--sombra-leve);
    border: 1px solid var(--borda-card);
}
.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--verde-destaque);
    margin: 0.5rem 0;
}
.stat-label {
    color: var(--cinza-suave);
    margin-bottom: 1rem;
}
.btn-stat {
    background-color: var(--verde-principal);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    text-decoration: none;
    display: inline-block;
    font-size: 0.9rem;
}
.badge-admin {
    background: #2e7d64;
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
}
.badge-user {
    background: #e6f7ec;
    color: #166534;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* ---------- SÚMULA ---------- */
.placar-header {
    text-align: center;
    background: linear-gradient(135deg, #2e7d64 0%, #166534 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 32px;
    margin-bottom: 2rem;
}
.placar-numeros {
    font-size: 2rem;
    font-weight: bold;
    margin: 0.5rem 0;
}
.evento-item {
    background: #f9fff9;
    border-left: 4px solid #2e7d64;
    padding: 0.8rem;
    margin-bottom: 0.8rem;
    border-radius: 16px;
    position: relative;
}
.evento-gol { border-left-color: #059669; }
.evento-amarelo { border-left-color: #f59e0b; }
.evento-vermelho { border-left-color: #dc2626; }
.evento-minuto {
    font-weight: bold;
    display: inline-block;
    min-width: 50px;
}
.delete-evento {
    float: right;
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    font-size: 1rem;
}

/* ---------- MENSAGENS (ALERTAS) ---------- */
.alert {
    padding: 1rem;
    border-radius: 20px;
    margin-bottom: 1rem;
}
.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 5px solid #059669;
}
.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 5px solid #dc2626;
}
.alert-warning {
    background: #fed7aa;
    color: #9a3412;
    border-left: 5px solid #f59e0b;
}
.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 5px solid #3b82f6;
}
.forgot-password {
    text-align: center;
    margin-top: 1rem;
}
.forgot-password a {
    color: #2e7d64;
    font-size: 0.85rem;
    text-decoration: none;
}
.forgot-password a:hover {
    text-decoration: underline;
}

/* ---------- RODAPÉ ---------- */
.footer {
    background-color: #1e3a2f;
    color: #cfe6db;
    padding: 2rem 1rem 1rem;
    margin-top: 3rem;
}
.footer-container {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
}
.footer-col {
    flex: 1;
    min-width: 200px;
}
.footer-col h4 {
    color: #d9f99d;
    margin-bottom: 1rem;
}
.footer-col ul {
    list-style: none;
    padding: 0;
}
.footer-col ul li {
    margin-bottom: 0.5rem;
}
.footer-col a {
    color: #cfe6db;
    text-decoration: none;
}
.footer-col a:hover {
    color: #d9f99d;
}
.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 1rem;
    border-top: 1px solid #2d5a46;
    font-size: 0.8rem;
}

/* ---------- UTILITÁRIOS ---------- */
.empty-state {
    text-align: center;
    padding: 3rem;
    background: #f9fff9;
    border-radius: 32px;
    color: #6c8b7a;
}
.back-link {
    margin-top: 2rem;
    text-align: center;
}

/* ---------- LOGOS ---------- */
.time-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 50%;
    background: #f0fdf4;
    padding: 2px;
}
.time-logo-mini {
    width: 30px;
    height: 30px;
    object-fit: contain;
    border-radius: 50%;
    background: #f0fdf4;
    padding: 2px;
    vertical-align: middle;
    margin-right: 5px;
}
.time-logo-placeholder {
    width: 40px;
    height: 40px;
    background: #e6f7ec;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}
.time-logo-placeholder-mini {
    width: 30px;
    height: 30px;
    background: #e6f7ec;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    margin-right: 5px;
}

/* ============================================
   RESPONSIVIDADE GERAL
   ============================================ */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    h1 {
        font-size: 1.8rem;
    }
    .hero {
        padding: 2rem 1rem;
    }
    .hero h1 {
        font-size: 1.6rem;
    }
    .hero .btn-primary {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        margin-top: 1rem;
    }
    .btn, .btn-primary, .btn-outline, .btn-plano {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }
    .features, .planos {
        gap: 1rem;
    }
    .feature-card, .plano-card {
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }
    .table-responsive,
    .classificacao-table,
    .info-liga table,
    .liga-detalhes-ajax table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .classificacao-table th,
    .classificacao-table td {
        font-size: 0.7rem;
        padding: 0.4rem;
    }
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
    .footer-col {
        text-align: center;
    }
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .liga-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .stats-grid {
        gap: 1rem;
    }
    .stat-card {
        min-width: 140px;
    }
    .jogos-grid {
        flex-direction: column;
    }
    .liga-header h1 {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    .navbar .logo a {
        font-size: 1.2rem;
    }
    .liga-btn {
        font-size: 0.8rem;
        padding: 0.4rem 1rem;
    }
    .classificacao-table th,
    .classificacao-table td {
        font-size: 0.65rem;
        padding: 0.3rem;
    }
    .time-logo-mini {
        width: 20px;
        height: 20px;
    }
}

/* ============================================
   IMPRESSÃO (PDF via navegador)
   ============================================ */
@media print {
    .navbar, footer, .btn, .btn-primary, .btn-outline, .print-btn, .back-links, .back-link,
    .header-actions, .liga-actions-footer, .nav-toggle, .nav-links, .alert, .form-evento,
    .info-liga .liga-btn, .liga-detalhes-ajax .btn-outline, .admin-actions,
    .dashboard-actions .btn-primary, .liga-actions a, .dashboard-header .plano-info,
    .dica, .footer, .liga-dashboard-header .btn-outline {
        display: none !important;
    }
    body {
        background: white;
        margin: 0;
        padding: 0;
        font-size: 12pt;
    }
    .container {
        margin: 0;
        padding: 0;
        width: 100%;
    }
    .classificacao-table, .table {
        width: 100%;
        border-collapse: collapse;
        margin: 0;
        box-shadow: none;
    }
    .classificacao-table th, .classificacao-table td, .table th, .table td {
        border: 1px solid #ccc;
        padding: 6px;
        text-align: center;
    }
    .classificacao-table th, .table th {
        background: #e6f7ec !important;
        color: #166534 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .classificacao-table td:first-child, .classificacao-table th:first-child {
        text-align: left;
    }
    h1, h2, h3 {
        color: #166534 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    a {
        text-decoration: none;
        color: black;
    }
    .liga-header {
        background: none !important;
        color: black !important;
        padding: 0 !important;
        margin-bottom: 1rem !important;
    }
    .liga-header h1 {
        color: #166534 !important;
    }
    @page {
        margin: 2cm;
        @bottom-center {
            content: "Campeonato de Clubes - " counter(page);
            font-size: 10pt;
            color: #888;
        }
    }
}
/* Container do boto de upgrade */
.upgrade-container {
    text-align: center;
    margin-top: 1rem;
}

/* Estilo do boto de upgrade (j deve existir a classe .btn-primary) */
.btn-primary {
    background-color: #2e7d64;
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 40px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: 0.2s;
}
.btn-primary:hover {
    background-color: #1f5e4a;
    transform: scale(1.02);
}