/* ================================================= */
/* Arquivo: public/assets/css/painel_estatisticas_mobile.css */
/* PAINEL PRINCIPAL */
/* ================================================= */

* {
    box-sizing: border-box;
}

/* ================================================= */
/* PAINEL */
/* ================================================= */
#painelEstatisticas {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    z-index: 999;
    background: #f3f4f6;
    border-radius: 18px;
    padding: 12px 18px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    box-shadow: 0 6px 20px rgba(0,0,0,.12);
    flex-wrap: wrap;
    /* ✅ CORREÇÃO: o painel rola, não a página */
    max-height: calc(100vh - 20px);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;  /* scroll suave iOS */
    overscroll-behavior: contain;       /* evita propagar scroll para o mapa */
}

/* ================================================= */
/* ESQUERDA */
/* ================================================= */

.painelEsquerda {
    min-width: 200px;
    flex-shrink: 0;
    margin-left: 0;
}

.logoPainel {
    width: 180px;
    display: block;
    margin-bottom: 8px;
    margin-left: 50px;
}

.blocoTexto h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #111;
}

.blocoTexto p {
    margin-top: 4px;
    font-size: 13px;
    color: #333;
    white-space: nowrap;
}

/* ================================================= */
/* CENTRO */
/* ================================================= */

.painelCentro {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 400px;
}

.linhaFiltros {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.filtroBox {
    width: 140px;
}

.raioBox {
    width: 120px;
}

.buscaBox {
    flex: 1;
    width: auto;
    min-width: 200px;
}

.filtroBox label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #111;
}

.filtroBox select,
.buscaBox input {
    width: 100%;
    height: 36px;
    border: 1px solid #d7dce2;
    border-radius: 10px;
    padding: 0 12px;
    background: #fff;
    font-size: 13px;
    box-sizing: border-box;
}

.filtroBox select:focus,
.buscaBox input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ================================================= */
/* STATS */
/* ================================================= */

.rodapeCentro {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.linhaStats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    min-width: 0;
}

.itemEstatistica {
    background: #fff;
    border-radius: 14px;
    height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 4px;
    min-width: 70px;
}

.icone {
    font-size: 16px;
}

.numero {
    font-size: 16px;
    font-weight: 700;
    color: #111;
}

.texto {
    font-size: 11px;
    color: #64748b;
    text-align: center;
}

/* ================================================= */
/* BANNER */
/* ================================================= */

.bannerAnuncio {
    width: 100%;
    max-width: 740px;
}

.bannerAnuncio img {
    width: 100%;
    height: 60px;
    object-fit: cover;
    background: #f3eefe;
    border: 1px solid #d9cdf8;
    border-radius: 10px;
    display: block;
}

/* ================================================= */
/* DIREITA - Anônimo */
/* ================================================= */

.painelDireita {
    width: 190px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}

.barraInfoDireita {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    font-size: 12px;
}

.localizacao,
.clima {
    font-size: 12px;
    white-space: nowrap;
}

.iconeTopo {
    position: relative;
    cursor: pointer;
    font-size: 16px;
}

.badge {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: red;
    color: white;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ================================================= */
/* LOGIN */
/* ================================================= */

.areaUsuario {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 8px;
    width: 100%;
}

.cabecalhoUsuario {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.avatarAnonimo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #dfe3e8;
    flex-shrink: 0;
}

.dadosAnonimo {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dadosAnonimo strong {
    font-size: 12px;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dadosAnonimo button {
    border: none;
    background: transparent;
    color: #2563eb;
    cursor: pointer;
    text-align: left;
    padding: 0;
    margin-top: 2px;
    font-size: 11px;
    white-space: nowrap;
}

.blocoLogin {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.blocoLogin input {
    height: 30px;
    border: 1px solid #d7dce2;
    border-radius: 8px;
    padding: 0 10px;
    font-size: 12px;
    box-sizing: border-box;
    width: 100%;
}

.blocoLogin input::placeholder {
    font-size: 11px;
    color: #999;
}

.blocoLogin input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.btnEntrar {
    height: 30px;
    font-size: 12px;
    border: none;
    border-radius: 8px;
    background: #2563eb;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    width: 100%;
}

.btnEntrar:hover {
    background: #1d4ed8;
}

.btnEntrar:active {
    transform: scale(0.98);
}

/* ================================================= */
/* TABLET (1024px - 1280px) */
/* ================================================= */

@media (max-width: 1280px) {

    #painelEstatisticas {
        padding: 10px 14px;
        gap: 15px;
    }

    .painelEsquerda {
        min-width: 160px;
    }

    .logoPainel {
        width: 140px;
    }

    .blocoTexto h2 {
        font-size: 16px;
    }

    .blocoTexto p {
        font-size: 12px;
    }

    .painelCentro {
        min-width: 300px;
    }

    .filtroBox {
        width: 120px;
    }

    .raioBox {
        width: 100px;
    }

    .filtroBox select,
    .buscaBox input {
        font-size: 12px;
        height: 34px;
        padding: 0 10px;
    }

    .linhaStats {
        grid-template-columns: repeat(5, 1fr);
        gap: 4px;
    }

    .itemEstatistica {
        height: 55px;
        min-width: 60px;
        padding: 0 2px;
    }

    .numero {
        font-size: 14px;
    }

    .texto {
        font-size: 10px;
    }

    .bannerAnuncio {
        max-width: 200px;
        height: 55px;
        font-size: 11px;
    }

    .painelDireita {
        width: 160px;
    }

}

/* ================================================= */
/* RESPONSIVO (até 1024px) */
/* ================================================= */

@media (max-width: 1024px) {

    #painelEstatisticas {
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        gap: 12px;
        margin: 8px;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .painelEsquerda {
        min-width: auto;
        margin-left: 0;
        text-align: center;
    }

    .logoPainel {
        width: 150px;
        margin-left: auto;
        margin-right: auto;
    }

    .blocoTexto h2 {
        font-size: 16px;
    }

    .blocoTexto p {
        font-size: 13px;
        white-space: normal;
    }

    .painelCentro {
        min-width: auto;
        width: 100%;
    }

    .linhaFiltros {
        flex-wrap: wrap;
    }

    .filtroBox {
        width: 100%;
        min-width: auto;
    }

    .raioBox {
        width: 100%;
    }

    .buscaBox {
        width: 100%;
        min-width: auto;
    }

    .rodapeCentro {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .linhaStats {
        grid-template-columns: repeat(5, 1fr);
        width: 100%;
    }

    .itemEstatistica {
        height: 65px;
        min-width: auto;
    }

    .bannerAnuncio {
        max-width: 100%;
        height: 70px;
        font-size: 12px;
    }

    .bannerAnuncio img {
        height: 70px;
    }

    .painelDireita {
        width: 100%;
        flex-direction: row;
        gap: 12px;
        align-items: flex-start;
    }

    .barraInfoDireita {
        flex: 1;
        gap: 12px;
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 8px 0;
    }

    .localizacao,
    .clima {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .areaUsuario {
        width: auto;
        min-width: 200px;
        flex-shrink: 0;
    }

}

/* ================================================= */
/* MOBILE (até 768px) */
/* ================================================= */

@media (max-width: 768px) {

    #painelEstatisticas {
        position: relative;
        flex-direction: column;
        padding: 12px;
        gap: 12px;
        border-radius: 14px;
        margin: 8px;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .painelEsquerda {
        display: none;
    }

    .painelCentro {
        min-width: auto;
        width: 100%;
        gap: 12px;
    }

    .linhaFiltros {
        flex-direction: column;
        gap: 10px;
    }

    .filtroBox {
        width: 100%;
    }

    .raioBox {
        width: 100%;
    }

    .buscaBox {
        width: 100%;
    }

    .filtroBox select,
    .buscaBox input {
        font-size: 15px;
        height: 42px;
        border-radius: 10px;
    }

    .rodapeCentro {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .linhaStats {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
        width: 100%;
    }

    .itemEstatistica {
        height: 60px;
        border-radius: 12px;
        min-width: 0;
        padding: 0 2px;
    }

    .icone {
        font-size: 15px;
    }

    .numero {
        font-size: 13px;
    }

    .texto {
        font-size: 9px;
    }

    .bannerAnuncio {
        max-width: 100%;
    }

    .bannerAnuncio img {
        width: 100%;
        height: 55px;
        object-fit: cover;
        border-radius: 10px;
    }

    .painelDireita {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }

    .barraInfoDireita {
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 8px;
        font-size: 12px;
        padding: 4px 0;
    }

    .localizacao,
    .clima {
        font-size: 12px;
    }

    .areaUsuario {
        width: 100%;
        min-width: auto;
        padding: 10px;
    }

    .avatarAnonimo {
        width: 34px;
        height: 34px;
    }

    .dadosAnonimo strong {
        font-size: 13px;
    }

    .dadosAnonimo button {
        font-size: 12px;
    }

    .blocoLogin input {
        font-size: 15px;
        height: 40px;
        padding: 0 12px;
    }

    .btnEntrar {
        font-size: 14px;
        height: 40px;
    }

}

/* ================================================= */
/* MOBILE PEQUENO (até 480px) */
/* ================================================= */

@media (max-width: 480px) {

    #painelEstatisticas {
        padding: 10px;
        gap: 10px;
        margin: 6px;
        border-radius: 12px;
    }

    .painelCentro {
        gap: 10px;
    }

    .linhaFiltros {
        gap: 8px;
    }

    .filtroBox label {
        font-size: 12px;
    }

    .filtroBox select,
    .buscaBox input {
        font-size: 14px;
        height: 40px;
    }

    .linhaStats {
        grid-template-columns: repeat(5, 1fr);
        gap: 4px;
    }

    .itemEstatistica {
        height: 52px;
        border-radius: 10px;
        padding: 0 1px;
    }

    .icone {
        font-size: 13px;
    }

    .numero {
        font-size: 12px;
    }

    .texto {
        font-size: 8px;
    }

    .barraInfoDireita {
        font-size: 11px;
        gap: 6px;
    }

    .areaUsuario {
        padding: 8px;
    }

    .blocoLogin input {
        height: 38px;
        font-size: 14px;
    }

    .btnEntrar {
        height: 38px;
        font-size: 13px;
    }

}

/* ================================================= */
/* MOBILE MUITO PEQUENO (até 360px) */
/* ================================================= */

@media (max-width: 360px) {

    #painelEstatisticas {
        padding: 8px;
        gap: 8px;
        margin: 4px;
    }

    .linhaStats {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
    }

    .itemEstatistica {
        height: 54px;
    }

    .icone {
        font-size: 14px;
    }

    .numero {
        font-size: 13px;
    }

    .texto {
        font-size: 9px;
    }

}