/* Removido a duplicação do body e ajustado o padding */
body {
    padding-top: 60px; /* Aumentado para 60px para melhor espaçamento */
    padding-bottom: 20px;
    position: relative;
}

.card {
    transition: transform 0.2s;
}

.card:hover {
    transform: scale(1.02);
}

.form-group {
    margin-bottom: 1rem;
}

/* Alertas (mantido igual) */
.alert-flash {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
    animation: fadeIn 0.3s, fadeOut 0.3s 3s forwards;
    max-width: 400px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-20px); }
}

/* Menu principal - Reduzindo a altura */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    min-height: 50px; /* Definindo altura mínima */
    padding: 0.25rem 1rem; /* Reduzindo padding */
    transition: top 0.3s;
}

.navbar.hidden {
    transform: translateY(-100%);
}

.navbar-toggler {
    transition: transform 0.3s ease;
    padding: 0.25rem; /* Reduzido */
}

.navbar-toggler.open {
    transform: rotate(90deg);
}

/* Menu mobile - Versão otimizada */
@media (max-width: 991.98px) {
    body {
        padding-top: 50px; /* Reduzido para mobile */
    }
    
    .navbar {
        padding: 0.15rem 0.5rem; /* Mais compacto em mobile */
    }
    
    .navbar-brand {
        font-size: 0.9rem; /* Texto menor */
        padding: 0.25rem 0;
    }
    
    .navbar-toggler {
        padding: 0.15rem 0.35rem;
    }
    
    .navbar-collapse {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: #0f1010;
        padding: 0;
        z-index: 1050;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 4px 12px rgba(247, 244, 244, 0.8);
        backdrop-filter: blur(5px);
        border-top: 1px solid rgba(38, 37, 37, 0.1);
    }

    .navbar-collapse.show {
        max-height: 80vh;
        padding: 0.5rem 0; /* Reduzido */
    }
    
    .nav-link {
        padding: 0.5rem 1rem; /* Reduzido */
    }
}

/* Menu desktop */
@media (min-width: 992px) {
    .navbar-collapse {
        display: flex !important;
        flex-basis: auto;
    }
}

.navbar-custom {
    background-color: #02386ddf;
}

.navbar-custom .navbar-nav .nav-link,
.navbar-custom .navbar-brand {
    color: white;
}

.navbar-custom .nav-link:hover {
    color: #dcdcdc;
}

.painel-button-container {
    text-align: right;
    margin-top: 1rem;
}

.center-flash {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 99999;
    padding: 16px 24px;
    font-size: 1rem;
    border-radius: 8px;
    opacity: 0.95;
    background-color: white;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    transition: opacity 0.3s ease;
    text-align: center;
}
/* Estilo para campos inválidos */
.is-invalid {
    border-color: #dc3545 !important;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Estilo para mensagem de erro */
.invalid-feedback {
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
    display: none;
}

.is-invalid ~ .invalid-feedback {
    display: block;
}