/******************************************************************************
 *
 * Projeto     : AUTOROVER
 * Componente  : WEBAPP
 * Arquivo     : style.css
 * Autor       : Gilmar Furtado
 * Engenheira  : Suzi Vector
 * Versão      : WEB_TESTE - NOVO LAYOUT V2
 *
 * Objetivo:
 *
 *   - Estilo visual principal do AUTOROVER WEBAPP
 *   - Cabeçalho compacto
 *   - Barra superior de status
 *   - Máximo aproveitamento da área do mapa
 *   - Painel flutuante V2 de detalhes do ROVER
 *   - Base local para validação antes da publicação no VPS
 *
 ******************************************************************************/

html,
body {

    width: 100%;
    height: 100%;

    margin: 0;

    overflow: hidden;

}


body {

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background:
        #f4f6f8;

    color:
        #1f2937;

}


/* ============================================================================
 * PÁGINA
 * ========================================================================== */

.pagina {

    width: 100%;
    height: 100vh;

    box-sizing: border-box;

    display: flex;

    flex-direction: column;

    padding:
        10px 14px 12px;

}


/* ============================================================================
 * CABEÇALHO
 * ========================================================================== */

.cabecalho {

    width: 100%;

    min-height:
        58px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-align: center;

    flex-shrink: 0;

}


.cabecalho h1 {

    margin: 0;

    font-size:
        30px;

    line-height:
        32px;

    letter-spacing:
        0.5px;

}


.cabecalho p {

    margin:
        2px 0 0;

    font-size:
        13px;

    line-height:
        15px;

    color:
        #64748b;

}


/* ============================================================================
 * BARRA SUPERIOR
 * ========================================================================== */

.barra-superior {

    width: 100%;

    display: grid;

    grid-template-columns:
        1.15fr
        1fr
        1fr
        0.85fr
        0.85fr
        0.85fr;

    gap:
        10px;

    margin:
        2px 0 8px;

    flex-shrink: 0;

}


.barra-superior > * {

    height:
        38px;

    min-width: 0;

    box-sizing: border-box;

}


/* ============================================================================
 * BOTÕES SUPERIORES
 * ========================================================================== */

.btn-topo {

    width: 100%;
    height: 38px;

    border:
        2px solid #16a34a;

    border-radius:
        11px;

    background:
        white;

    color:
        #111827;

    font-size:
        14px;

    font-weight:
        bold;

    cursor:
        pointer;

}


.btn-topo:hover {

    background:
        #f0fdf4;

}


/* ============================================================================
 * STATUS
 * ========================================================================== */

.status-box {

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-align: center;

    padding:
        2px 6px;

    background:
        white;

    border:
        2px solid #16a34a;

    border-radius:
        11px;

}


.status-titulo {

    font-size:
        8px;

    line-height:
        9px;

    color:
        #374151;

    font-weight:
        bold;

}


.status-box strong {

    font-size:
        15px;

    line-height:
        17px;

    color:
        #16a34a;

}


/* ============================================================================
 * ÁREA DO MAPA
 * ========================================================================== */

.area-mapa {

    position: relative;

    flex: 1;

    min-height: 0;

    box-sizing: border-box;

    padding:
        10px;

    background:
        white;

    border-radius:
        14px;

    box-shadow:
        0 4px 18px rgba(0, 0, 0, 0.08);

}


/* ============================================================================
 * MAPA
 * ========================================================================== */

#mapa {

    width: 100%;
    height: 100%;

    min-height: 0;

    box-sizing: border-box;

    border:
        2px dashed #9ca3af;

    border-radius:
        10px;

    overflow: hidden;

    background:
        #e5e7eb;

}


/* ============================================================================
 * PAINEL FLUTUANTE V2
 * ========================================================================== */

.painel-detalhes {

    position: absolute;

    top:
        18px;

    right:
        18px;

    width:
        340px;

    max-width:
        calc(100% - 36px);

    max-height:
        calc(100% - 36px);

    box-sizing:
        border-box;

    z-index:
        1000;

    padding:
        14px 16px 12px;

    overflow-y:
        auto;

    background:
        rgba(255, 255, 255, 0.98);

    border:
        2px solid #16a34a;

    border-radius:
        14px;

    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.18);

}


/* ============================================================================
 * TÍTULO DO PAINEL
 * ========================================================================== */

.painel-detalhes h2 {

    margin:
        0 0 12px;

    padding-bottom:
        9px;

    text-align:
        center;

    font-size:
        20px;

    line-height:
        22px;

    border-bottom:
        1px solid #d1d5db;

}


/* ============================================================================
 * BOTÃO FECHAR
 * ========================================================================== */

.fechar-painel {

    position:
        absolute;

    top:
        5px;

    right:
        8px;

    border:
        none;

    background:
        transparent;

    font-size:
        25px;

    color:
        #6b7280;

    cursor:
        pointer;

}


.fechar-painel:hover {

    color:
        #111827;

}


/* ============================================================================
 * GRUPOS DO PAINEL
 * ========================================================================== */

.grupo-detalhes {

    margin-bottom:
        12px;

}


.grupo-titulo {

    margin-bottom:
        5px;

    font-size:
        10px;

    font-weight:
        bold;

    letter-spacing:
        0.7px;

    color:
        #64748b;

}


/* ============================================================================
 * LINHAS DE INFORMAÇÃO
 * ========================================================================== */

.linha-detalhe {

    display:
        flex;

    justify-content:
        space-between;

    gap:
        12px;

    padding:
        6px 0;

    border-bottom:
        1px solid #e5e7eb;

    font-size:
        13px;

}


.linha-detalhe span {

    color:
        #6b7280;

}


.linha-detalhe strong {

    color:
        #111827;

    text-align:
        right;

}


/* ============================================================================
 * VALORES POSITIVOS
 * ========================================================================== */

.valor-ok {

    color:
        #16a34a !important;

}


/* ============================================================================
 * DEVICE ID
 * ========================================================================== */

.device-id {

    font-size:
        12px;

    font-family:
        Consolas,
        "Courier New",
        monospace;

}


/* ============================================================================
 * ÚLTIMA ATUALIZAÇÃO
 * ========================================================================== */

.ultima-atualizacao {

    margin-top:
        6px;

    padding-top:
        9px;

    border-top:
        1px solid #d1d5db;

    text-align:
        center;

    font-size:
        11px;

    color:
        #6b7280;

}


.ultima-atualizacao strong {

    color:
        #111827;

}


/* ============================================================================
 * ELEMENTO OCULTO
 * ========================================================================== */

.oculto {

    display:
        none;

}


/* ============================================================================
 * ÍCONE DO ROVER V2
 * ========================================================================== */

.icone-rover-container {

    background:
        transparent;

    border:
        none;

}


.icone-rover {

    width:
        48px;

    height:
        48px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    border-radius:
        50%;

    background:
        white;

    border:
        3px solid #16a34a;

    box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.30);

    font-size:
        29px;

    cursor:
        pointer;

}


/* ============================================================================
 * RESPONSIVO
 * ========================================================================== */

@media (max-width: 1000px) {

    .cabecalho h1 {

        font-size:
            24px;

    }


    .barra-superior {

        gap:
            5px;

    }


    .btn-topo {

        font-size:
            11px;

    }


    .status-box strong {

        font-size:
            13px;

    }

}


@media (max-width: 700px) {

    .cabecalho {

        display:
            none;

    }


    .barra-superior {

        display:
            none;

    }


    .pagina {

        padding:
            4px;

    }


    .area-mapa {

        padding:
            3px;

    }


    .painel-detalhes {

        position:
            fixed;

        top:
            8px;

        left:
            8px;

        right:
            8px;

        width:
            auto;

        max-width:
            none;

        max-height:
            calc(100vh - 16px);

    }

}