/* ============================================= */
/* ESTRUTURA DE LAYOUT PRINCIPAL (FINAL)         */
/* ============================================= */
html,
body {
    height: 100%;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f8f9fa;
}

body:not(.auth-body) {
    display: flex;
}

/* Container da Barra Lateral (Sidebar) */
.sidebar {
    width: 250px;
    background-color: #fff;
    border-right: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
}

/* Wrapper para o conteúdo principal + rodapé */
.page-content-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    margin-left: 250px; /* Espaço para a sidebar */
    min-height: 100vh;
}

/* Área de conteúdo principal */
.main-content {
    flex-grow: 1; /* Faz o conteúdo crescer e empurrar o rodapé para baixo */
    padding: 1.5rem;
}

/* Rodapé principal no final da página */
.main-footer {
    padding: 1rem;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    text-align: center;
    font-size: 0.9rem;
    color: #6c757d;
    flex-shrink: 0;
}


/* ============================================= */
/* ESTILOS DO MENU (SIDEBAR) - CORREÇÃO          */
/* ============================================= */
.sidebar-logo {
    padding: 1.25rem 1rem;
    text-align: center;
}

.sidebar-logo img {
    max-width: 80%;
    height: auto;
}

/* A navegação principal do menu */
.sidebar-nav {
    flex-grow: 1; /* IMPORTANTE: Faz a navegação crescer e empurrar o rodapé do menu para baixo */
    overflow-y: auto; /* Adiciona scroll se o menu for muito grande */
}

.sidebar-nav ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.sidebar-nav a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #343a40;
    text-decoration: none;
    border-left: 4px solid transparent;
    transition: all 0.2s ease-in-out;
}

.sidebar-nav a:hover {
    background-color: #e9ecef;
    border-left-color: #0d6efd;
}

/* Rodapé do menu (com botões de Perfil e Sair) */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid #dee2e6;
}


/* ============================================= */
/* LAYOUT DE AUTENTICAÇÃO (LOGIN)                */
/* ============================================= */
.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 15px;
    margin: auto;
}

.login-box {
    background: #fff;
    padding: 2.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.login-logo {
    display: block;
    margin: 0 auto 1.5rem auto;
    max-width: 150px;
}