/* =====================================================
   GERAL
===================================================== */

body {
    background: #f4f6f9;
}

.navbar-brand {
    font-weight: 800;
}

.card {
    border-radius: 18px;
}

.painel-aluno {
    background: linear-gradient(135deg, #ffffff, #eef5ff);
}

.text-small {
    font-size: 14px;
}

/* =====================================================
   ABAS
===================================================== */

.bolao-tabs {
    background: #ffffff;
    padding: 10px;
    border-radius: 18px;
    box-shadow: 0 5px 18px rgba(0,0,0,0.06);
    gap: 8px;
}

.bolao-tabs .nav-link {
    border-radius: 14px;
    font-weight: 700;
    color: #495057;
}

.bolao-tabs .nav-link.active {
    background: #0d6efd;
    color: #ffffff;
}

/* =====================================================
   FASE DE GRUPOS
===================================================== */

.grupo-clean-card {
    overflow: hidden;
}

.grupo-clean-header {
    background: linear-gradient(135deg, #0d6efd, #084298);
    color: white;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.grupo-clean-header h4 {
    margin: 0;
    font-weight: 800;
}

.grupo-clean-header small {
    opacity: 0.85;
}

.grupo-clean-header span {
    width: 46px;
    height: 46px;
    background: rgba(255,255,255,0.18);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 22px;
}

.grupo-times-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.grupo-time-chip {
    background: #f8f9fa;
    border-radius: 14px;
    padding: 9px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 14px;
}

.grupo-time-chip img {
    width: 34px;
    height: 24px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.palpite-ranking-box {
    display: grid;
    gap: 10px;
}

.ranking-linha {
    display: grid;
    grid-template-columns: 52px 1fr 42px;
    align-items: center;
    gap: 8px;
}

.ranking-linha label {
    font-weight: 800;
    margin: 0;
}

.preview-mini-card {
    width: 42px;
    height: 36px;
    background: #f8f9fa;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-mini-card img {
    width: 34px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
}

.grupo-pontos {
    background: #eef5ff;
    border-radius: 14px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.grupo-pontos strong {
    color: #198754;
}

.contador-terceiros {
    background: #ffffff;
    border-radius: 18px;
    padding: 16px 18px;
    box-shadow: 0 5px 18px rgba(0,0,0,0.06);
}

.terceiro-avanca-box {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 16px;
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.form-switch .form-check-input {
    width: 3.1em;
    height: 1.6em;
    cursor: pointer;
}

.resultado-real-box {
    background: #eef5ff;
    border-radius: 16px;
    padding: 14px;
    font-size: 15px;
}

/* =====================================================
   MATA-MATA
===================================================== */

.mata-confrontos-area {
    display: grid;
    gap: 28px;
}

.mata-round-card {
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    padding: 18px;
    overflow: hidden;
}

.mata-round-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 14px;
    margin-bottom: 18px;
}

.mata-round-header h4 {
    margin: 0;
    font-weight: 900;
    font-size: 22px;
}

.mata-round-header p {
    margin: 4px 0 0;
    color: #6c757d;
    font-size: 14px;
}

.mata-round-header span {
    background: #0d6efd;
    color: #ffffff;
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 800;
    white-space: nowrap;
    font-size: 14px;
}

.mata-confrontos-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.mata-confronto-card {
    background: #f8f9fa;
    border-radius: 18px;
    padding: 14px;
    border: 1px solid #eef0f2;
}

.mata-confronto-topo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #0d6efd;
    margin-bottom: 12px;
}

.mata-confronto-topo strong {
    font-size: 15px;
}

.mata-confronto-topo small {
    color: #6c757d;
    font-size: 12px;
    font-weight: 700;
}

.mata-times {
    display: grid;
    grid-template-columns: 1fr 34px 1fr;
    align-items: stretch;
    gap: 10px;
}

.mata-time {
    background: #ffffff;
    border-radius: 14px;
    min-height: 86px;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    font-weight: 800;
    font-size: 14px;
    line-height: 1.2;
}

.mata-time img {
    width: 44px;
    height: 31px;
    object-fit: cover;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.16);
}

.mata-time.vazio {
    color: #adb5bd;
    border: 1px dashed #ced4da;
}

.mata-time-placeholder {
    font-size: 13px;
    font-weight: 700;
}

.mata-versus {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: #6c757d;
    font-size: 16px;
}

.mata-vencedor {
    margin-top: 12px;
}

.mata-vencedor label {
    font-weight: 800;
    font-size: 14px;
    margin-bottom: 6px;
    display: block;
}

.select-vencedor-confronto {
    border-radius: 12px;
    min-height: 44px;
    font-weight: 600;
}

/* =====================================================
   BOTÃO FIXO DE SALVAR
===================================================== */

.sticky-save {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 14px 0;
    margin-top: 30px;
    border-top: 1px solid #ddd;
    z-index: 20;
}

.sticky-save-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

/* =====================================================
   RESPONSIVO - TABLET
===================================================== */

@media (max-width: 992px) {
    .mata-confrontos-grid {
        grid-template-columns: 1fr;
    }

    .mata-round-header h4 {
        font-size: 21px;
    }
}

/* =====================================================
   RESPONSIVO - CELULAR
===================================================== */

@media (max-width: 576px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .navbar-brand {
        font-size: 17px;
    }

    .bolao-tabs {
        display: grid;
        grid-template-columns: 1fr;
    }

    .bolao-tabs .nav-link {
        width: 100%;
    }

    .grupo-times-grid {
        grid-template-columns: 1fr;
    }

    .ranking-linha {
        grid-template-columns: 44px 1fr 38px;
    }

    .grupo-clean-header {
        padding: 14px;
    }

    .grupo-clean-header h4 {
        font-size: 20px;
    }

    .terceiro-avanca-box {
        align-items: flex-start;
    }

    .mata-confrontos-area {
        gap: 22px;
    }

    .mata-round-card {
        padding: 14px;
        border-radius: 18px;
    }

    .mata-round-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 14px;
    }

    .mata-round-header h4 {
        font-size: 19px;
        line-height: 1.25;
    }

    .mata-round-header p {
        font-size: 13px;
    }

    .mata-round-header span {
        font-size: 13px;
        padding: 7px 12px;
    }

    .mata-confrontos-grid {
        gap: 12px;
    }

    .mata-confronto-card {
        padding: 12px;
        border-radius: 16px;
    }

    .mata-confronto-topo {
        margin-bottom: 10px;
    }

    .mata-confronto-topo small {
        display: none;
    }

    .mata-times {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .mata-versus {
        background: transparent;
        font-size: 14px;
        padding: 0;
        line-height: 1;
    }

    .mata-time {
        min-height: auto;
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
        padding: 11px 12px;
        gap: 10px;
        font-size: 15px;
    }

    .mata-time img {
        width: 40px;
        height: 28px;
        flex-shrink: 0;
    }

    .mata-time-placeholder {
        font-size: 14px;
    }

    .mata-vencedor {
        margin-top: 10px;
    }

    .mata-vencedor label {
        font-size: 13px;
    }

    .select-vencedor-confronto {
        min-height: 46px;
        font-size: 15px;
    }

    .sticky-save {
        padding: 12px 0;
    }

    .sticky-save-content {
        flex-direction: column;
        align-items: stretch;
    }

    .sticky-save-content button {
        width: 100%;
    }
}

/* =====================================================
   RESPONSIVO - CELULARES MUITO PEQUENOS
===================================================== */

@media (max-width: 380px) {
    .mata-round-card {
        padding: 12px;
    }

    .mata-confronto-card {
        padding: 10px;
    }

    .mata-time {
        font-size: 14px;
        padding: 10px;
    }

    .mata-time img {
        width: 36px;
        height: 25px;
    }
}.btn-outline-danger {
    font-weight: 700;
    border-radius: 12px;
}

@media (max-width: 576px) {
    .painel-aluno .btn-outline-danger {
        width: 100%;
    }
}