/* ============================ */
/* VARIÁVEIS GLOBAIS           */
/* ============================ */
:root {
  --largura-menu: 250px;
  --altura-header: 50px;
  --altura-titulo-conteudo: 125px;
}


/* ============================ */
/* CORPO DO SITE               */
/* ============================ */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    background-color: #edeeed;
}

/* ============================ */
/* GIF DE CARREGAMENTO         */
/* ============================ */
.loading-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-overlay img {
    width: 120px;
    height: auto;
}


/* ============================ */
/* MENU LATERAL                */
/* ============================ */
.menu-lateral {
    width: var(--largura-menu);
    height: 100vh;
    background-color: #2c4d40;
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    z-index: 90;
    box-sizing: border-box;
}

.menu-lateral .logo {
    width: 100%;
    max-width: 200px;
    display: block;
    margin: 0 auto 20px;
    padding: 20px;
}

.menu-lateral h2 {
    text-align: center;
    margin-bottom: 20px;
}

.menu-lateral ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-lateral ul li {
    border-bottom: 1px solid #5b8b6c;
}

.menu-lateral ul li a {
    color: #fff;
    text-decoration: none;
    display: block;
    padding: 16px 20px;
    background-color: #2c4d40;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.menu-lateral ul li a:hover {
    background-color: #85b796;
}

.menu-lateral .versao {
    margin-top: auto;
    font-size: 12px;
    color: #bbb;
    text-align: center;
    padding: 10px 0;
}


/* ============================ */
/* HEADER                      */
/* ============================ */
header {
    background-color: #0dad77;
    color: #fff;
    padding: 0 20px; /* padding lateral apenas */
    position: fixed;
    top: 0;
    left: var(--largura-menu);
    width: calc(100% - var(--largura-menu));
    height: 60px; /* altura fixa ideal */
    z-index: 100;
    box-sizing: border-box;

    display: flex;
    align-items: center; /* centraliza verticalmente */
    justify-content: space-between;
    font-size: 15px;
}

.header-conteudo {
    display: flex;
    align-items: center; /* garante centralização vertical dos itens internos */
    height: 100%; /* ocupa toda a altura do header */
    width: 100%;
    justify-content: space-between;
}

.header-conteudo span {
    font-size: 15px;
    margin-left: 10px;
    line-height: 1; /* garante centralização */
}

.btn-sair {
    padding: 8px 15px;
    font-size: 14px;
    border-radius: 5px;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.btn-sair:hover {
    background-color: #fff;
    color: #0dad77;
}



/* ============================ */
/* TÍTULO CONTEÚDO             */
/* ============================ */
.titulo-conteudo {
    background-color: #fff;
    padding: 10px 20px;
    text-align: left;
    position: fixed;
    top: var(--altura-header);
    left: var(--largura-menu);
    width: calc(100% - var(--largura-menu));
    height: var(--altura-titulo-conteudo);
    box-sizing: border-box;
    z-index: 99;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.titulo-conteudo h1 {
    font-size: 24px;
    color: #333;
}

.titulo-conteudo p {
    font-size: 16px;
    color: #666;
}


/* ============================ */
/* CONTEÚDO PRINCIPAL          */
/* ============================ */
.conteudo-principal {
    position: absolute;
    top: calc(var(--altura-header) + var(--altura-titulo-conteudo));
    left: var(--largura-menu);
    width: calc(100% - var(--largura-menu));
    height: calc(100vh - var(--altura-header) - var(--altura-titulo-conteudo));
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

/* MAIN */
main {
    height: 100%;
    overflow-y: auto;
}

main h1 {
    font-size: 24px;
    color: #333;
}

main p {
    font-size: 16px;
    color: #666;
}


/* ============================ */
/* BOTÃO MENU MOBILE (HAMBURGER) */
/* ============================ */
.menu-toggle {
    display: none;
}


/* ============================ */
/* RESPONSIVO - MOBILE         */
/* ============================ */
@media (max-width: 768px) {
    :root {
        --largura-menu: 0px;
         --altura-titulo-conteudo: 180px; /* ← aumenta a altura no mobile */
    }
    
 

    .menu-lateral {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 250px;
        height: 100vh;
        position: fixed;
        z-index: 999;
    }

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

    .menu-toggle {
        display: block;
        position: fixed;
        top: 15px;
        left: 15px;
        background-color: transparent;
        border: none;
        cursor: pointer;
        z-index: 1000;
    }

    .menu-toggle span {
        display: block;
        width: 25px;
        height: 3px;
        background-color: #fff;
        margin: 5px 0;
        transition: all 0.3s ease;
    }

    header,
    .titulo-conteudo,
    .conteudo-principal {
        left: 0;
        width: 100%;
    }

    header {
        padding-left: 60px;
    }

    .titulo-conteudo {
        top: var(--altura-header);
    }

    .conteudo-principal {
        top: calc(var(--altura-header) + var(--altura-titulo-conteudo));
        height: calc(100vh - var(--altura-header) - var(--altura-titulo-conteudo));
    }

    main h1 {
        font-size: 20px;
    }

    main p,
    .titulo-conteudo p {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
  /* Animação para o título sumir */
  .titulo-conteudo {
    transition: transform 0.3s ease, opacity 0.3s ease, height 0.3s ease, padding 0.3s ease;
    will-change: transform, opacity, height, padding;
    overflow: hidden;
  }

  .titulo-conteudo.ocultar {
    transform: translateY(-100%);
    opacity: 0;
    height: 0;
    padding: 0 20px;
  }

  /* Conteúdo principal normal */
  .conteudo-principal {
    position: absolute;
    top: calc(var(--altura-header) + var(--altura-titulo-conteudo));
    left: var(--largura-menu);
    width: calc(100% - var(--largura-menu));
    height: calc(100vh - var(--altura-header) - var(--altura-titulo-conteudo));
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
    transition: top 0.3s ease, height 0.3s ease;
  }

  /* Conteúdo principal quando o título está oculto */
  .conteudo-principal.titulo-oculto {
    top: var(--altura-header);
    height: calc(100vh - var(--altura-header));
  }
}



