/* =====================
   Reset + Fontes
===================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Poppins:wght@500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    min-height: 100dvh;
    background: linear-gradient(180deg, #f7f4ef, #eef4f7);
    color: #2b2b2b;
    padding: 40px 20px;
}

/* =====================
   Botão voltar
===================== */

.btn-voltar {
    position: fixed;
    top: 16px;
    left: 16px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f8fcfe;
    color: #1f3a44;
    font-size: 1.5rem;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(70, 121, 143, 0.14);
    transition: background 0.2s ease, box-shadow 0.2s ease;
    z-index: 100;
}

.btn-voltar:hover {
    background: #e6f3f8;
    box-shadow: 0 6px 16px rgba(70, 121, 143, 0.18);
}

/* =====================
   Título
===================== */

h1 {
    text-align: center;
    margin-bottom: 8px;
    font-size: 2rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: #1f3a44;
}

.subtitulo {
    text-align: center;
    max-width: 480px;
    margin: 0 auto 32px auto;
    color: #5f6f76;
    font-size: 0.97rem;
}

/* =====================
   Tabs
===================== */

.tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.tab {
    padding: 10px 28px;
    border-radius: 999px;
    border: 1.5px solid #d8d2c7;
    background: #fffdfa;
    color: #5f6f76;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.tab:hover {
    border-color: #9fc9d9;
    color: #1f3a44;
}

.tab.ativo {
    background: #9fc9d9;
    border-color: #9fc9d9;
    color: #1f3a44;
}

/* =====================
   Mensagem
===================== */

.mensagem {
    text-align: center;
    margin: 24px auto;
    font-size: 0.95rem;
    color: #8a8a8a;
    display: none;
}

.sem-dados {
    text-align: center;
    color: #8a8a8a;
    font-size: 0.95rem;
    margin-top: 24px;
}

/* =====================
   Lista de Ranking
===================== */

.ranking-lista {
    max-width: 560px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fffdfa;
    border-radius: 14px;
    padding: 14px 20px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    border: 1px solid #ece6dc;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ranking-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.09);
}

/* =====================
   Posição (badge)
===================== */

.ranking-pos {
    font-size: 0.88rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    min-width: 46px;
    text-align: center;
    padding: 6px 10px;
    border-radius: 10px;
    background: #efeaf9;
    color: #50338a;
    flex-shrink: 0;
}

.pos-ouro {
    background: #fff3cc;
    color: #7a5600;
}

.pos-prata {
    background: #eaeaea;
    color: #444;
}

.pos-bronze {
    background: #ffeadb;
    color: #7a3700;
}

/* =====================
   Nome e contagem
===================== */

.ranking-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ranking-nome {
    font-size: 1rem;
    font-weight: 500;
    color: #2b2b2b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-telefone {
    font-size: 0.82rem;
    color: #5f6f76;
}

.ranking-count {
    font-size: 0.9rem;
    font-weight: 600;
    color: #5f6f76;
    white-space: nowrap;
}

/* =====================
   Mobile
===================== */

@media (max-width: 768px) {
    .subtitulo br {
        display: none;
    }

    .tabs {
        flex-wrap: nowrap;
        gap: 6px;
        margin-bottom: 20px;
    }

    .tab {
        flex: 1;
        padding: 8px 6px;
        font-size: 0.82rem;
        text-align: center;
    }
}
