:root {
    --azul: #1565D8;
    --azul2: #0D47A1;
    --claro: #E8F1FF;
    --fundo: #F4F5F8;
    --texto: #3F444A;
    --borda: #DDE1E6;
    --menu: 235px;
    --topo: 72px;
}


/* ============================================================
   GERAL
   ============================================================ */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    background: var(--fundo);
    color: #333;
}


/* ============================================================
   TOPO
   ============================================================ */

.topo {
    height: var(--topo);

    position: fixed;
    inset: 0 0 auto 0;

    z-index: 1000;

    display: grid;
    grid-template-columns: 1fr 1fr 1fr;

    align-items: center;

    padding: 0 24px;

    background: #fff;

    border-bottom:
        1px solid var(--borda);
}


.topo-esquerda,
.topo-cliente,
.topo-usuario {
    display: flex;
    align-items: center;
    gap: 10px;
}


/* ============================================================
   LOGO
   ============================================================ */

.logo-topo {
    width: 155px;
    max-height: 52px;

    object-fit: contain;
}


/* ============================================================
   BOTÃO MENU
   ============================================================ */

.btn-menu {
    display: none;

    width: 42px;
    height: 42px;

    border: 0;
    border-radius: 9px;

    background: var(--claro);
    color: var(--azul);

    font-size: 22px;
}


/* ============================================================
   CLIENTE NO TOPO
   ============================================================ */

.topo-cliente {
    justify-self: center;
}


.topo-cliente span {
    color: #777;

    font-size: 12px;
    font-weight: 700;
}


.topo-cliente select {
    height: 40px;
    min-width: 190px;

    padding: 0 12px;

    border:
        1px solid var(--borda);

    border-radius: 9px;

    background: #fff;

    font-weight: 600;
}


.topo-cliente strong {
    display: none;
}


/* ============================================================
   USUÁRIO NO TOPO
   ============================================================ */

.topo-usuario {
    /*
     * Mantém o usuário sempre na coluna da direita.
     * Mesmo quando .topo-cliente estiver oculto.
     */

    grid-column: 3;

    justify-self: end;
}


.topo-usuario > div:last-child {
    display: flex;
    flex-direction: column;
}


.topo-usuario small {
    color: #777;
}


/* ============================================================
   AVATAR
   ============================================================ */

.avatar {
    width: 40px;
    height: 40px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background: var(--claro);
    color: var(--azul);

    font-weight: 700;
}


/* ============================================================
   MENU LATERAL
   ============================================================ */

.menu-lateral {
    position: fixed;

    top: var(--topo);
    bottom: 0;
    left: 0;

    width: var(--menu);

    z-index: 900;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    padding: 14px 12px;

    background: #fff;

    border-right:
        1px solid var(--borda);
}


/* ============================================================
   ITEM DO MENU
   ============================================================ */

.menu-item {
    width: 100%;
    min-height: 46px;

    display: flex;
    align-items: center;

    gap: 12px;

    padding: 10px 13px;

    margin-bottom: 4px;

    border: 0;
    border-radius: 9px;

    background: transparent;

    color: #555;

    text-decoration: none;

    font-size: 14px;

    cursor: pointer;
}


.menu-item:hover,
.menu-item.ativo {
    background: var(--claro);
    color: var(--azul);
}


/* ============================================================
   ADMINISTRAÇÃO
   ============================================================ */
.grupo-supervisor,
.grupo-admin {
    margin-top: 18px;

    padding-top: 14px;

    border-top:
        1px solid #eee;
}


.menu-titulo {
    padding:
        0 13px 8px;

    color: #999;

    font-size: 10px;
    font-weight: 700;

    text-transform: uppercase;
}


/* ============================================================
   RODAPÉ DO MENU
   ============================================================ */

.menu-rodape {
    padding-top: 10px;

    border-top:
        1px solid #eee;
}


/* ============================================================
   RODAPÉ DO SISTEMA
   ============================================================ */

.rodape-sistema {
    margin-left: var(--menu);

    padding: 14px 28px;

    display: flex;

    justify-content: space-between;

    background: #fff;

    border-top:
        1px solid var(--borda);

    color: #888;

    font-size: 11px;
}


/* ============================================================
   OVERLAY DO MENU
   ============================================================ */

#menuOverlay {
    display: none;
}


/* ============================================================
   VALIDAÇÃO DA SESSÃO
   ============================================================ */

body.r3m-validando-sessao {
    visibility: hidden;
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 800px) {

    .topo {
        grid-template-columns:
            1fr auto;

        padding:
            0 14px;
    }


    .btn-menu {
        display: block;
    }


    .logo-topo {
        width: 125px;
    }


    /* ========================================================
       CLIENTE MOBILE
       Só existirá visualmente para Admin e Técnico.
       ======================================================== */

    .topo-cliente {
        position: absolute;

        top: var(--topo);
        left: 0;
        right: 0;

        height: 52px;

        justify-content: center;

        background: #fff;

        border-bottom:
            1px solid var(--borda);
    }


    /* ========================================================
       USUÁRIO MOBILE
       ======================================================== */

    .topo-usuario {
        grid-column: 2;

        justify-self: end;
    }


    .topo-usuario > div:last-child {
        display: none;
    }


    /* ========================================================
       MENU MOBILE
       ======================================================== */

    .menu-lateral {
        width: 260px;

        transform:
            translateX(-100%);

        transition:
            0.25s;
    }


    .menu-lateral.aberto {
        transform:
            translateX(0);
    }


    /* ========================================================
       OVERLAY MOBILE
       ======================================================== */

    #menuOverlay.ativo {
        display: block;

        position: fixed;

        inset:
            var(--topo) 0 0 0;

        z-index: 850;

        background:
            #0006;
    }


    /* ========================================================
       RODAPÉ MOBILE
       ======================================================== */

    .rodape-sistema {
        margin-left: 0;

        align-items: center;
        flex-direction: column;

        gap: 4px;
    }

}

.menu-item > i {
    width: 22px;
    min-width: 22px;

    font-size: 16px;

    text-align: center;
}

.menu-lateral {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--topo));
    overflow: hidden;
}

.menu-lateral nav {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 15px;
}

/* Scroll discreto */
.menu-lateral nav::-webkit-scrollbar {
    width: 5px;
}

.menu-lateral nav::-webkit-scrollbar-track {
    background: transparent;
}

.menu-lateral nav::-webkit-scrollbar-thumb {
    background: rgba(120, 120, 120, 0.28);
    border-radius: 10px;
}

.menu-rodape {
    flex-shrink: 0;
}