/* =================================================================
   STICKY FOOTER E LAYOUT GERAL
   ================================================================= */
html {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    /* Fundo global levemente mais escuro */
}

.site-wrapper {
    flex-grow: 1;
}

/* =================================================================
   RESET E VARIÁVEIS GERAIS
   ================================================================= */
:root {
    /* Cores principais */
    --red-cojad: #BA1200;
    --dark-blue-cojad: #323232;
    --medium-blue-cojad: #508AA8;
    --sky-blue-cojad: #C8E0F4;

    /* Cores de fundo */
    --bg-header: #C8E0F4;
    --bg-proposito: #FFFFFF;
    --bg-projetos: #031927;
    --bg-eventos: #508AA8;
    --bg-realizacoes: #E9E8E8;
}

.section {
    padding: 80px 0;
    overflow: hidden;
}

h2.section-title {
    font-family: serif;
    font-size: 3rem;
    margin-bottom: 40px;
    font-weight: bold;
}

/* =================================================================
   UTILITÁRIOS VISUAIS (SOMBRAS E BOTÕES)
   ================================================================= */
/* Sombra mais forte para cards */
.shadow-strong {
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15) !important;
}

/* Sombra padrão suave */
.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

/* Botão Padrão COJAD (Azul Escuro -> Azul Médio) */
.btn-primary-cojad {
    background-color: var(--bg-projetos) !important;
    /* Azul Escuro #031927 */
    border: none !important;
    color: white !important;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary-cojad:hover {
    background-color: var(--medium-blue-cojad) !important;
    /* Azul Médio #508AA8 */
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    color: white !important;
}

/* Botão Secundário (Azul Médio -> Azul Escuro) */
.btn-secondary-cojad {
    background-color: var(--medium-blue-cojad) !important;
    border: none !important;
    color: white !important;
    transition: all 0.3s ease;
}

.btn-secondary-cojad:hover {
    background-color: var(--bg-projetos) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    color: white !important;
}

/* Botão Sucesso COJAD (Verde) */
.btn-success-cojad {
    background-color: #198754 !important;
    border: none !important;
    color: white !important;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-success-cojad:hover {
    background-color: #157347 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    color: white !important;
}

/* =================================================================
   FUNDOS DAS SEÇÕES
   ================================================================= */
.header-background {
    background-color: var(--bg-header);
}

.section-proposito {
    background-color: var(--bg-proposito);
    color: var(--dark-blue-cojad);
}

.section-projetos-grid {
    background-color: var(--bg-projetos);
    color: white;
}

.section-eventos {
    background-color: var(--bg-eventos);
    color: white;
}

.section-realizacoes {
    background-color: var(--bg-realizacoes);
    color: var(--dark-blue-cojad);
}

/* =================================================================
   CABEÇALHO (NAVBAR)
   ================================================================= */
.main-header {
    padding: 15px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background-color: var(--bg-header);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Logos */
.header-logos {
    display: flex;
    align-items: center;
    text-decoration: none;
    position: relative;
    z-index: 1050;
    /* Garante que fique acima de outros elementos */
}

.header-logos img {
    max-height: 55px;
    transition: transform 0.3s ease;
}

.header-logos .logo-oab {
    margin-right: 15px;
    padding-right: 15px;
    border-right: 1px solid #ccc;
}

.header-logos:hover img {
    transform: scale(1.02);
}

/* Menu de Navegação */
.navbar-toggler {
    border: none;
    padding: 0;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.main-nav .nav-link {
    color: var(--dark-blue-cojad) !important;
    font-weight: 600;
    margin: 0 8px;
    padding: 8px 0;
    position: relative;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.main-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--red-cojad);
    transition: width 0.3s ease;
}

.main-nav .nav-link:hover {
    color: var(--red-cojad) !important;
}

.main-nav .nav-link:hover::after {
    width: 100%;
}

/* Botão "Cadastre-se" no menu */
.main-nav .btn-cadastro {
    background-color: var(--red-cojad);
    color: white !important;
    border-radius: 30px;
    padding: 8px 24px !important;
    margin-left: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(186, 18, 0, 0.2);
}

.main-nav .btn-cadastro::after {
    display: none;
}

.main-nav .btn-cadastro:hover {
    background-color: #a00f00;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(186, 18, 0, 0.3);
    color: white !important;
}

/* =================================================================
   SEÇÃO PROPÓSITO
   ================================================================= */
.section-proposito .lista-atuacao {
    background-color: #343a40;
    color: white;
    padding: 2rem;
    border-radius: 5px;
}

/* =================================================================
   SEÇÃO PROJETOS (GRID 2x2)
   ================================================================= */
.section-projetos-grid .card {
    border: none;
    border-radius: 5px;
    padding: 2.5rem;
    height: 100%;
}

.section-projetos-grid .card-dark-blue {
    background-color: var(--dark-blue-cojad);
    color: white;
}

.section-projetos-grid .card-medium-blue {
    background-color: var(--medium-blue-cojad);
    color: white;
}

.section-projetos-grid .card-white {
    background-color: white;
    color: #343a40;
}

.section-projetos-grid .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =================================================================
   SEÇÃO EVENTOS
   ================================================================= */
.section-eventos .card {
    border: none;
    text-align: center;
}

.section-eventos .card-title {
    font-weight: bold;
    color: var(--dark-blue-cojad);
}

.section-eventos .card-img-top {
    border-bottom: 5px solid var(--red-cojad);
}

.section-eventos .card .btn-danger {
    background-color: var(--red-cojad);
    border-color: var(--red-cojad);
}

/* =================================================================
   SEÇÃO NOSSAS REALIZAÇÕES
   ================================================================= */
.section-realizacoes .card {
    border: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* =================================================================
   SEÇÃO: CONTATO COM FORMULÁRIO (NA INDEX)
   ================================================================= */
.section-contato-index {
    background-color: var(--sky-blue-cojad);
    color: var(--dark-blue-cojad);
}

.section-contato-index h3 {
    margin-bottom: 1.5rem;
    font-weight: bold;
}

.section-contato-index .contato-info p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.section-contato-index .contato-info a {
    color: var(--dark-blue-cojad);
    text-decoration: none;
}

.section-contato-index .contato-info a:hover {
    text-decoration: underline;
}

.section-contato-index form .form-label {
    font-weight: 500;
}

.section-contato-index h2.section-title {
    color: var(--dark-blue-cojad);
}

.btn-enviar-contato {
    background-color: var(--red-cojad);
    border-color: var(--red-cojad);
    color: white;
    padding: 12px 30px;
    font-weight: bold;
    width: 100%;
    transition: opacity 0.3s ease;
}

.btn-enviar-contato:hover {
    background-color: var(--red-cojad);
    border-color: var(--red-cojad);
    color: white;
    opacity: 0.9;
}

/* =================================================================
   RODAPÉ (FOOTER)
   ================================================================= */
.main-footer {
    background-color: #fffafa;
    padding: 20px 0;
    font-size: 0.9rem;
    color: #555;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.developer-credit a {
    color: #555;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.developer-credit img {
    max-height: 25px;
    margin-left: 8px;
}

/* =================================================================
   SEÇÃO: BANCO DE PARCEIROS (NA INDEX)
   ================================================================= */
.section-parceiros {
    background-color: white;
}

.section-parceiros .card-parceiro {
    border: 1px solid #eee;
    text-align: center;
    padding: 20px;
    height: 100%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.section-parceiros .parceiro-logo {
    max-height: 80px;
    margin-bottom: 15px;
}

.section-parceiros .parceiro-beneficio {
    font-weight: bold;
    color: var(--red-cojad);
}

/* =================================================================
   PÁGINA DE CONTATOS ÚTEIS
   ================================================================= */
.contatos-uteis-container .card {
    margin-bottom: 2rem;
}

/* =================================================================
   PÁGINA DE PERFIL DO USUÁRIO
   ================================================================= */
.profile-card {
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.profile-header {
    background-color: var(--dark-blue-cojad);
    color: white;
    padding: 30px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    display: flex;
    align-items: center;
}

.profile-picture {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid white;
    margin-right: 20px;
    object-fit: cover;
}

.profile-header h4 {
    margin: 0;
    font-weight: bold;
}

.profile-header p {
    margin: 0;
    opacity: 0.8;
}

.profile-body {
    padding: 30px;
}

.profile-body .info-item {
    margin-bottom: 15px;
}

.profile-body .info-label {
    font-weight: bold;
    color: #555;
    display: block;
}

/* =================================================================
   PÁGINA DE LOGIN COM ABAS (CORREÇÃO DEFINITIVA)
   ================================================================= */

/* Container de Abas */
.login-container .card-header {
    background-color: transparent;
    border-bottom: none;
    padding: 20px 20px 0 20px;
}

.login-container .nav-tabs {
    border-bottom: none;
    gap: 15px;
    justify-content: center;
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* Botões das Abas (Topo) */
.login-container .nav-tabs .nav-link {
    border: none;
    border-radius: 8px;
    background-color: #f0f2f5;
    color: #666;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 12px 20px;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
    min-width: 120px;
}

.login-container .nav-tabs .nav-link:hover {
    background-color: #e4e6e9;
    color: var(--dark-blue-cojad);
    transform: translateY(-2px);
}

.login-container .nav-tabs .nav-link.active {
    background-color: var(--dark-blue-cojad);
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.tab-content {
    padding: 10px 10px 20px 10px;
}

/* --- CLASSE NOVA E ESPECÍFICA PARA OS BOTÕES DE ENTRAR --- 
   IMPORTANTE: Adicione a classe "btn-custom-login" no HTML dos botões.
*/
.btn-custom-login {
    background-color: var(--red-cojad) !important;
    border: 1px solid var(--red-cojad) !important;
    color: white !important;
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1rem;
    margin-top: 20px;
    text-transform: none;
    box-shadow: 0 4px 6px rgba(186, 18, 0, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    display: block;
    /* Garante que ocupe a linha */
}

/* Efeito Hover do botão personalizado */
.btn-custom-login:hover {
    background-color: #a00f00 !important;
    /* Vermelho mais escuro */
    border-color: #a00f00 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(186, 18, 0, 0.3);
}

/* Links de autenticação (Esqueci senha, Voltar, etc) */
.auth-link {
    color: var(--medium-blue-cojad) !important;
    text-decoration: none !important;
    transition: color 0.3s ease;
}

.auth-link:hover {
    color: var(--red-cojad) !important;
    text-decoration: underline !important;
}

/* Links abaixo dos botões (Cadastre-se, etc) */
.tab-content a {
    color: var(--medium-blue-cojad);
    text-decoration: none;
    font-size: 0.9rem;
    margin-top: 15px;
    display: inline-block;
}

.tab-content a:hover {
    color: var(--red-cojad);
    text-decoration: underline;
}

/* =================================================================
   PÁGINA DE OPORTUNIDADES
   ================================================================= */
.vaga-card {
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.vaga-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.vaga-card .card-header {
    background-color: var(--dark-blue-cojad);
    color: white;
    font-weight: bold;
}

.vaga-card .card-footer {
    background-color: #f8f9fa;
}

/* Classes para animação de scroll */
.hidden-animate {
    opacity: 0;
    transform: translateY(30px);
    /* Começa um pouco mais baixo */
    transition: all 0.8s ease;
    /* Demora 0.8s para subir */
}

.show-animate {
    opacity: 1;
    transform: translateY(0);
    /* Sobe para a posição original */
}

/* =================================================================
   CORREÇÃO VISUAL URGENTE: NAVBAR E BOTÃO
   ================================================================= */

/* 1. Conserta o botão "Cadastre-se" (Vermelho) */
.main-nav .btn-cadastro {
    white-space: nowrap !important;
    /* OBRIGATÓRIO: Proíbe quebrar o texto */
    display: inline-flex !important;
    /* Garante alinhamento interno */
    align-items: center !important;
    /* Centraliza texto verticalmente */
    justify-content: center !important;
    /* Centraliza texto horizontalmente */
    width: auto !important;
    /* Largura se adapta ao texto */
    min-width: 130px !important;
    /* Largura mínima para ficar bonito */
    height: 45px !important;
    /* Altura fixa */
    padding: 0 20px !important;
    /* Espaçamento interno */
    margin-left: 15px !important;
    /* Afasta do item "Login" */
}

/* 2. Conserta os itens do menu (Links) para caberem na tela */
.main-nav .nav-link {
    white-space: nowrap !important;
    /* Impede que "Contatos Úteis" quebre linha */
    font-size: 0.9rem !important;
    /* Diminui levemente a fonte para caber tudo */
    padding-left: 8px !important;
    /* Reduz espaçamento lateral entre itens */
    padding-right: 8px !important;
}

/* 3. Ajuste para telas menores (Notebooks pequenos) */
@media (max-width: 1200px) {
    .main-header .container {
        flex-wrap: wrap !important;
        /* Permite quebrar linha de forma organizada */
        justify-content: center !important;
    }

    .header-logos {
        margin-bottom: 10px;
        /* Dá espaço se a logo ficar em cima do menu */
    }
}

/* =================================================================
   RESPONSIVIDADE (MEDIA QUERIES - CÓDIGO CONSOLIDADO)
   ================================================================= */

/* --- TABLETS E CELULARES (Tudo abaixo de 992px) --- */
@media (max-width: 992px) {

    /* 1. LAYOUT DO HEADER (Logos e Botão na mesma linha) */
    .main-header {
        padding: 10px 0;
    }

    .main-header .container {
        display: flex !important;
        flex-direction: row !important;
        /* Garante linha horizontal */
        flex-wrap: wrap !important;
        /* Permite que o menu caia pra baixo */
        align-items: center !important;
        /* Centraliza verticalmente */
        justify-content: space-between !important;
        /* Espalha os itens */
    }

    /* 2. LOGOS (Esquerda) */
    .header-logos {
        flex: 0 1 auto !important;
        /* Não deixa crescer demais */
        width: auto !important;
        /* Largura automática */
        max-width: 75% !important;
        /* Deixa espaço para o botão */
        margin-right: auto !important;
        /* Empurra o botão para a direita */
    }

    .header-logos img {
        max-height: 40px !important;
        /* Reduz logo para caber */
        width: auto !important;
        transition: none !important;
        /* Remove animação no mobile para não travar */
    }

    /* 3. BOTÃO HAMBURGUER (Direita) */
    .navbar-toggler {
        display: block !important;
        flex: 0 0 auto !important;
        /* Tamanho fixo */
        margin-left: 10px !important;
        /* Espacinho do logo */
        order: 2 !important;
        /* Garante que fique na direita */
        border: 1px solid rgba(0, 0, 0, 0.1) !important;
        /* Borda sutil para visualização */
        padding: 5px 10px !important;
    }

    /* 4. MENU EXPANDIDO (Baixo) */
    .navbar-collapse {
        flex-basis: 100% !important;
        /* Força quebra de linha */
        width: 100% !important;
        order: 3 !important;
        /* Fica por último */
        background-color: white;
        margin-top: 15px;
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        padding: 10px;
    }

    /* ESTILOS GERAIS MOBILE */
    .navbar-nav {
        width: 100%;
        text-align: center;
    }

    .main-nav {
        width: 100%;
        margin: 0;
    }

    .main-nav .nav {
        justify-content: center;
    }

    .main-nav .nav-link {
        margin: 5px 0;
        text-align: center;
        border-bottom: 1px solid #f0f0f0;
        display: block;
        width: 100%;
    }

    .main-nav .nav-link:last-child {
        border-bottom: none;
    }

    .main-nav .nav-link::after {
        display: none;
        /* Remove sublinhado animado no mobile */
    }

    /* Botão Cadastre-se no Menu Mobile */
    .main-nav .btn-cadastro {
        display: inline-block !important;
        /* Garante que apareça */
        margin: 15px auto 5px auto !important;
        width: auto !important;
        min-width: 150px;
    }

    /* Ajustes de Seções */
    .section {
        padding: 40px 0;
    }

    h2.section-title {
        font-size: 2.2rem;
        text-align: center;
    }

    /* Centralização Geral */
    .section-projetos-grid .col-lg-4,
    .section-contato-index .contato-info,
    .footer-content,
    .profile-header {
        text-align: center;
    }

    .footer-content {
        flex-direction: column;
        gap: 15px;
    }

    .profile-header {
        flex-direction: column;
    }

    .profile-picture {
        margin-right: 0;
        margin-bottom: 15px;
    }

    /* Ajuste Abas de Login */
    .login-container .nav-tabs {
        flex-direction: column;
        gap: 10px;
    }

    .login-container .nav-tabs .nav-link {
        width: 100%;
    }
}

/* --- MOBILE PORTRAIT (max-width: 412px) --- */
@media (max-width: 412px) {
    h2.section-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    .section {
        padding: 40px 0;
    }

    .header-logos img {
        max-height: 40px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .main-footer {
        background-color: #fffafa;
        padding: 20px 0;
        font-size: 10px !important;
        color: #555;
    }

    .developer-credit {
        margin-top: 10px;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-picture {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .row>[class*="col-md-"] {
        margin-bottom: 20px;
    }

    .row>[class*="col-md-"]:last-child {
        margin-bottom: 0;
    }

    .main-header .container {
        display: flex !important;
        flex-direction: row !important;
        /* Força ficar lado a lado */
        align-items: center !important;
        /* Centraliza verticalmente */
        justify-content: space-between !important;
        /* Espalha: Logos na esq, Botão na dir */
        flex-wrap: wrap !important;
        /* Permite que o menu (quando abrir) vá para baixo */
        padding-right: 15px !important;
        /* Garante margem na direita */
    }

    .header-logos {
        width: auto !important;
        /* Ocupa só o espaço necessário */
        flex-grow: 0 !important;
        margin-right: auto !important;
        /* Empurra tudo que vier depois para a direita */
        max-width: 75% !important;
        /* Garante que não atropele o botão */
    }

    .navbar-toggler {
        display: block !important;
        width: auto !important;
        margin-left: auto !important;
        /* Força ir para a direita */
        order: 2 !important;
        /* Garante a ordem visual */
    }

    .navbar-collapse {
        flex-basis: 100% !important;
        /* Força quebra de linha */
        width: 100% !important;
        order: 3 !important;
    }

    .header-logos img {
        max-height: 40px !important;
        width: auto !important;
    }
}

/* --- TELAS MUITO PEQUENAS (iPhone SE, Galaxy Fold) --- */
@media (max-width: 380px) {
    .header-logos img {
        max-height: 30px !important;
        /* Diminui mais a logo */
    }

    h2.section-title {
        font-size: 1.8rem;
    }
}

/* =================================================================
   ESTILOS DO DASHBOARD ADMIN (RESPONSIVO)
   ================================================================= */

/* Container Principal - Usa Flexbox para colocar Sidebar e Conteúdo lado a lado */
.d-flex-admin {
    display: flex;
    width: 100%;
    overflow-x: hidden;
    /* Evita rolagem horizontal indesejada */
}

/* --- SIDEBAR (MENU LATERAL) --- */
.admin-sidebar {
    min-width: 260px;
    max-width: 260px;
    background-color: var(--dark-blue-cojad);
    color: #fff;
    min-height: 100vh;
    transition: all 0.3s;
    position: relative;
    /* Para desktop */
}

.admin-sidebar .sidebar-heading {
    padding: 1.5rem;
    font-size: 1.2rem;
    font-weight: bold;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.admin-sidebar .list-group-item {
    background-color: transparent;
    color: rgba(255, 255, 255, 0.8);
    border: none;
    padding: 15px 20px;
    font-size: 1rem;
}

.admin-sidebar .list-group-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.admin-sidebar .list-group-item.active {
    background-color: var(--red-cojad);
    color: #fff;
    font-weight: bold;
}

/* --- CONTEÚDO PRINCIPAL --- */
.admin-content {
    width: 100%;
    padding: 20px;
    background-color: #e9ecef;
    /* Fundo um pouco mais escuro */
}

/* Hover aprimorado para botões no Admin */
.admin-content .btn {
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admin-content .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    filter: brightness(0.9);
    /* Escurece levemente o tom do botão */
}

/* --- TOGGLE BUTTON (Só aparece no mobile) --- */
#menu-toggle {
    display: none;
    /* Escondido no PC */
}

/* =================================================================
   RESPONSIVIDADE DO ADMIN (O MÁGICO ACONTECE AQUI)
   ================================================================= */
@media (max-width: 992px) {

    /* 1. Esconde a Sidebar jogando ela para a esquerda (negativo) */
    .admin-sidebar {
        margin-left: -260px;
        position: fixed;
        /* Fixa para sobrepor o conteúdo */
        z-index: 1000;
        height: 100%;
    }

    /* 2. Classe para mostrar a Sidebar quando clicar no botão */
    .admin-sidebar.active {
        margin-left: 0;
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.3);
    }

    /* 3. Mostra o botão de abrir menu */
    #menu-toggle {
        display: inline-block;
        margin-right: 15px;
    }

    /* 4. Overlay escuro quando o menu abre (opcional, para foco) */
    .overlay-admin {
        display: none;
        position: fixed;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
        top: 0;
        left: 0;
    }

    .overlay-admin.active {
        display: block;
    }
}

/* --- AJUSTE DE TABELAS (Para não quebrar no celular) --- */
.table-responsive-admin {
    display: block;
    width: 100%;
    overflow-x: auto;
    /* Adiciona scroll horizontal */
    -webkit-overflow-scrolling: touch;
}

/* =================================================================
   CORREÇÃO RESPONSIVIDADE DO ADMIN (CRUDs)
   ================================================================= */

@media (max-width: 768px) {

    /* 1. Arruma o Cabeçalho (Botão Voltar, Título e Botão Adicionar) */
    /* Seleciona a div que segura o título e o botão voltar */
    .container .d-flex.justify-content-between.align-items-center.mb-4 {
        flex-direction: column !important;
        /* Empilha tudo verticalmente */
        align-items: stretch !important;
        /* Estica para ocupar a largura */
        gap: 15px;
        /* Espaço entre os blocos */
    }

    /* O bloco que tem o "Voltar" e o H2 */
    .container .d-flex.align-items-center {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    /* O botão Voltar */
    .container .btn-secondary.me-3 {
        margin-right: 0 !important;
        width: 100%;
        /* Botão largura total no mobile */
    }

    /* O Título H2 */
    .container h2.m-0 {
        font-size: 1.5rem;
        /* Diminui um pouco a fonte */
        margin-bottom: 5px;
    }

    /* O Botão "Adicionar Novo" (Verde/Azul) */
    .container .btn-success-cojad,
    .container .btn-success {
        width: 100%;
        /* Botão largura total */
    }

    /* 2. Melhora a Tabela no Mobile */
    .table-responsive {
        border-radius: 8px;
        overflow-x: auto;
        /* Garante scroll horizontal */
        -webkit-overflow-scrolling: touch;
        /* Scroll suave no iPhone */
    }

    .table th,
    .table td {
        white-space: nowrap;
        /* IMPEDE que o texto quebre, forçando o scroll horizontal organizado */
        padding: 10px;
        /* Mais espaço para o dedo */
        font-size: 0.9rem;
        /* Fonte levemente menor */
    }

    /* Ajuste da imagem na tabela para não ficar gigante */
    .table img {
        width: 50px !important;
        height: 50px !important;
        object-fit: cover;
    }
}