html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* --- LOGIN PAGE --- */
.login-page-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.login-card-container {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-card-container .form-group { margin-bottom: 1rem; }
.login-card-container .login-label { display: block; font-weight: bold; margin-bottom: 0.5rem; color: #333; }
.login-card-container .login-input { width: 100%; padding: 0.75rem; border: 1px solid #ced4da; border-radius: 4px; transition: border-color 0.2s; }
.login-card-container .login-input:focus { outline: none; border-color: #007bff; box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); }
.login-card-container .btn-login-submit { width: 100%; padding: 0.75rem; background-color: #007bff; border: none; border-radius: 4px; color: white; font-weight: bold; cursor: pointer; margin-top: 1rem; }
.login-card-container .btn-login-submit:hover { background-color: #0069d9; }

/* --- HEADER E SIDEBAR --- */
header {
    position: sticky;
    top: 0;
    z-index: 1100;
}

.sidebar {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    background-color: #ffffff !important;
    transition: 0.3s;
    padding-top: 60px;
    border-right: 1px solid #dee2e6;
    overflow: hidden !important;
}

.sidebar a {
padding: 8px 8px 8px 32px;
text-decoration: none;
font-size: 1rem;
color: #212529; /* Cor de texto padrão escura do Bootstrap */
display: block;
transition: 0.3s;
}

/* 3. Efeito de destaque (Hover) ao passar o mouse pelos links */
.sidebar a:hover {
    color: #0d6efd; /* Muda para o azul padrão do Bootstrap ao passar o mouse */
    background-color: #f8f9fa; /* Fundo cinza bem claro, idêntico ao hover do dropdown */
}

/* 4. Ajusta o botão de fechar (X) da sidebar */
.sidebar .closebtn {
position: absolute;
top: 0;
right: 25px;
font-size: 36px;
margin-left: 50px;
color: #6c757d; /* Cor cinza para o botão fechar */
}

.user-footer {
    background-color: #e9ecef;
    white-space: nowrap;
    min-height: 70px;
    margin-top: auto; /* Garante que o footer fique no fim da sidebar */
}

/* --- GRID E COLUNAS (Otimizado para o novo layout) --- */
#main-container {
    transition: margin-left 0.3s ease;
    width: 100%;
    max-width: none !important;
    overflow-x: hidden;
}

#grid-container {
    height: calc(100vh - 58px); /* 100% da altura da tela menos a altura média da navbar */
    align-items: stretch; /* Força os filhos directos (colunas) a esticarem juntos */
}

.column-adjust {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Impede a página inteira de criar uma barra de rolagem feia */
}

.column-adjust .lista-dados {
flex-grow: 1;
overflow-y: auto; /* Se houver muitos projetos/veículos/arquivos, a rolagem acontece só ali dentro */
margin-bottom: 0;
padding-bottom: 15px; /* Sutil espaçamento interno no fim da lista */
}

/* Container do item da lista (Botão + Dropdown) */
.group-item-container {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    border-radius: 4px;
    position: relative;
}

/* Botão de Registro (Adaptado para o novo layout) */
.btn-registro {
    flex-grow: 1;
    text-align: left;
    border: 1px solid transparent;
    background: transparent;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

.item-menu-btn:hover {
    opacity: 1;
    color: #007bff;
}

.dropdown-menu-end {
    right: 0;
    left: auto;
}

.item-menu-btn {
    opacity: 0.6;
    transition: opacity 0.2s;
    border: none;
    background: none;
    font-size: 1.4rem;
    padding: 0 10px;
    cursor: pointer;
    line-height: 1;
}

.btn-registro:hover {
    
    
}

.btn-registro.selected {
    color: #007bff;
    
    
    
}

/* Efeito da linha azul ao passar o mouse ou selecionar */
.btn-registro::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background-color: #007bff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.btn-registro:hover::after, .btn-registro.selected::after {
    width: 100%;
}

.btn-registro:focus {
    box-shadow: none !important;
    outline: none !important;
}

/* Menu de contexto (Ícone ⋮) */
.item-menu {
    opacity: 0.3;
    transition: opacity 0.2s;
    border: none;
    background: none;
    font-size: 1.2rem;
    padding: 0 10px;
}

.group-item-container:hover .item-menu {
    opacity: 1;
}

.group-item-container:hover .item-menu-btn {
    opacity: 1;
}

.dropdown-menu {
    font-size: 0.9rem;
}

/* Utilitários Extras */
.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder { color: var(--bs-secondary-color); text-align: end; }
.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder { text-align: start; }

/* Estiliza o botão de logout para parecer um link da sidebar */
.btn-logout-sidebar {
    background: none;
    border: none;
    padding: 8px 8px 8px 32px;
    font-size: 1rem;
    text-align: left;
    transition: 0.3s;
}

.btn-logout-sidebar:hover {
color: #0d6efd;
}