:root {
    /* Definindo a fluidez do corpo do texto */
    /* Mínimo: 16px (1rem) | Ideal: 1.2% da largura + base | Máximo: 20px (1.25rem) */
    --font-size-base: clamp(1rem, 0.6rem + 0.5vw, 1.25rem);

    /* Você também pode usar para títulos */
    --font-size-h1: clamp(1.0rem, 1.7vw, 1.7rem);
    --font-size-h2: clamp(0.8rem, 1.4vw, 1.5rem);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
    font-family: Arial;
    /* font-size: 14px; */
    font-size: var(--font-size-base);
    line-height: 1.6;
    background-color: #f4f4f4;
}


/* body {
            background-image: url("assets/img/fundo-login-amarelo.webp");
            background-size: cover;
            background-repeat: no-repeat;
        } */
input {
    padding: 6px;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100vh;
}

.container-principal {
    display: flex;
    /* Habilita Flexbox para o layout principal (nav, main, aside) */
    flex: 1;
    /* Permite que o container principal ocupe o espaço restante */
}

header {
    background-color: #3858cb;
    color: #fff;
    padding: 0.2rem 0.2rem;
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

header img {
    height: 50px;
    margin: 3px 10px 3px 5px;
    /* float: left; */
}

header .b-sair {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-left: 20px;
}

header h1 {
    /* font-size: 1.4em; */
    text-wrap: nowrap;
    font-size: var(--font-size-h1);
    margin-top: 0;
    line-height: 1.1;
}

header h2 {
    font-size: var(--font-size-h2);
}

.header-left {
    float: left;
    width: 300px;
}

.header-left label {
    font-size: 1.25em;
    margin: 0 10px;
    display: inline-block;
    color: #ffffff;
}

.header-right {
    float: right;
    margin: 1px 25px;
    height: 44px;
    margin-top: 1px;
    display: flex;
    align-items: center;
}

.header-right .b-sair {
    float: right;
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-left: 20px;
}

/* Navegação Vertical */
.nav-vertical {
    /* width: 260px; */
    width: auto;
    min-width: 200px;
    background-color: #76acf1;
    color: #000;
    padding: 1rem;
    /* Para telas grandes, a navegação fica fixa na lateral (opcional) */
    /* position: fixed; height: 100%; overflow: auto; */
    z-index: 1000;
    display: block;
}

.nav-vertical ul {
    list-style-type: none;
    /* Remove as marcas de lista (bullets) */
}

.nav-vertical li a,
.dropdown-btn {
    padding: 12px 20px;
    text-decoration: none;
    font-size: 16px;
    color: #1a1a1a;
    /* display: block; */
    /* Faz o link ocupar toda a largura do item da lista, tornando a área clicável */
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none;
    background: none;
    width: 100%;
    cursor: pointer;
    /* transition: 0.3s; */
    /* border-bottom: 1px solid #ccc; */
}

.nav-vertical li a:hover,
.dropdown-btn:hover {
    background-color: #dfdfdf;
    color: #000;
}

.dropdown-btn.active .arrow {
    transform: rotate(-180deg);
}

.dropdown-container {
    display: none;
    background-color: #85b7f9;
    padding-left: 15px;
}

main {
    flex: 3;
    /* Ocupa 3x mais espaço que o aside */
    padding: 1rem;
    background-color: #fff;
    /* margin-left para o caso de usar position: fixed na nav */
    /* margin-left: 200px; */
    /* overflow-x: scroll; */
}

aside {
    flex: 1;
    /* Ocupa 1x espaço */
    padding: 1rem;
    background-color: #f1f1f1;
    border-left: 1px solid #ccc;
}

/* Media Query básica para responsividade em telas menores (ex: mobile) */
@media (max-width: 768px) {
    .container-principal {
        flex-direction: column;
        /* Muda o layout para empilhado em telas pequenas */
    }

    .nav-vertical,
    aside {
        width: 100%;
        /* Ocupam a largura total */
        /* position: static; height: auto; margin-left: 0; */
    }

    main {
        /* margin-left: 0; */
        overflow-x: scroll;
    }
}

/* Esconder Sidebar no Mobile por padrão */
@media (max-width: 768px) {
    .nav-vertical {
        /* transform: translateX(-100%); */
        transform: translateX(-100%);
        display: none;
    }

    .nav-vertical.open {
        transform: translateX(0);
        display: block;
    }
}

/* Estilo do Botão Hambúrguer */
.mobile-toggle {
    display: none;
    /* position: fixed; */
    /* top: 15px; */
    /* top: 80px; */
    /* left: 15px; */
    /* right: 10px; */
    background: #1a1a1a;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1100;
    border-radius: 5px;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px 0;
    transition: 0.4s;
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }
}

/* Seta e Dropdowns (Melhoria da versão anterior) */
.arrow {
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #fff;
    transition: transform 0.3s;
    margin-left: 10px;
}

footer {
    background-color: #2c4668;
    color: #fff;
    text-align: center;
    padding: 0.2rem 0;
    width: 100%;
}

/* moldura-box */
.moldura-box {
    background-color: #fff;
    text-align: center;
    border: 1px solid #000;
    border-radius: 10px;
    padding: 20px;
    width: 60%;
    margin: 7% auto 0 auto;
}

.moldura-box select {
    width: 100%;
    font-size: var(--font-size-base);
}

.moldura-box select option {
    line-height: 20px;
    padding: 4px;
}

@media (max-width: 768px) {
    .moldura-box {
        width: 95%;
    }

    .moldura-box select {
        max-height: 25vh;
    }

    .moldura-box select option {
        text-wrap: balance;
        padding-left: 20px;
        text-indent: -20px;
    }
}

.divscroll {
    height: 68vh;
    overflow-y: scroll;
    padding-bottom: 15px;
    border-bottom: 2px solid #00c;
}

/* tabela-base */
.tabela-base {
    border-collapse: collapse;
    margin-top: 3px;
    overflow-y: scroll;
}

.tabela-base thead {
    position: sticky;
    /* position: -webkit-sticky; */
    top: -1px;
    z-index: 1;
}

.tabela-base th {
    border: 1px solid #666;
    padding: 5px 8px 5px 8px;
    text-align: center;
}

.tabela-base td {
    /* padding: 10px 16px 10px 16px; */
    padding: 8px 14px 8px 14px;
    border-bottom: 1px solid #ccc;
}

.tabela-base th {
    font-size: 0.8em;
    height: 18px;
    color: #000;
    background-color: #ddd;
}

.tabela-base td {
    font-size: 0.9em;
    height: 16px;
    color: #222;
    background-color: #fff;
    vertical-align: middle;
}

.tabela-base tr:hover td {
    background: #d0dafd;
    color: #339;
}