/* ===== MODO ESCURO ATUALIZADO ===== */

body.dark-theme {
    --bg-primary: #0d1a26;
    --bg-secondary: #132639;
    --bg-tertiary: #1e3a52;
    --bg-card: #132639;
    --bg-card-hover: #1e3a52;
    --bg-input: #2a4a6a;
    
    --text-primary: #e6e8e3;
    --text-secondary: #a8c6d0;
    --text-muted: #8a9ba8;
    
    --accent-primary: #02416D;
    --accent-secondary: #CDD071;
    --accent-tertiary: #a8c6d0;
    --accent-hover: #e8ecaa;
    
    --border-color: #02416D;
    --border-light: #1e3a52;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.6);
}

body.dark-theme {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Menu Móvel no Tema Escuro */
body.dark-theme .mobile-nav {
    background: linear-gradient(135deg, #02416D 0%, #0d1a26 100%) !important;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5) !important;
}

body.dark-theme .mobile-nav-header {
    background: rgba(2, 65, 109, 0.3) !important;
    border-bottom: 1px solid #02416D !important;
    padding: 15px 20px !important;
}

body.dark-theme .mobile-user-info {
    color: var(--text-primary) !important;
}

body.dark-theme .mobile-user-info i {
    color: var(--accent-secondary) !important;
    font-size: 1.5rem !important;
    margin-right: 10px !important;
}

body.dark-theme .mobile-user-info span {
    font-weight: 600 !important;
    color: var(--text-primary) !important;
}

body.dark-theme .mobile-menu-close {
    color: var(--text-primary) !important;
    background: rgba(205, 208, 113, 0.1) !important;
    border: 1px solid #CDD071 !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
}

body.dark-theme .mobile-menu-close:hover {
    background: rgba(205, 208, 113, 0.2) !important;
    border-color: #e8ecaa !important;
    transform: rotate(90deg) !important;
}

body.dark-theme .mobile-nav-list {
    padding: 20px 0 !important;
}

body.dark-theme .mobile-nav-list li {
    border-bottom: 1px solid #02416D !important;
}

body.dark-theme .mobile-nav-list li:last-child {
    border-bottom: none !important;
}

body.dark-theme .mobile-nav-list a {
    color: var(--text-primary) !important;
    padding: 15px 20px !important;
    display: flex !important;
    align-items: center !important;
    transition: all 0.3s ease !important;
    background: transparent !important;
}

body.dark-theme .mobile-nav-list a:hover {
    background: rgba(2, 65, 109, 0.2) !important;
    color: var(--accent-secondary) !important;
    padding-left: 25px !important;
}

body.dark-theme .mobile-nav-list a i {
    color: var(--accent-secondary) !important;
    margin-right: 15px !important;
    width: 24px !important;
    text-align: center !important;
    font-size: 1.2rem !important;
}

body.dark-theme .mobile-nav-list a:hover i {
    color: #e8ecaa !important;
}

body.dark-theme .mobile-login-btn {
    background: linear-gradient(135deg, #02416D, #0268A6) !important;
    color: white !important;
    border-radius: 6px !important;
    margin: 10px 20px !important;
    justify-content: center !important;
    font-weight: 600 !important;
    border: 2px solid #CDD071 !important;
}

body.dark-theme .mobile-login-btn:hover {
    background: linear-gradient(135deg, #0268A6, #02416D) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(2, 104, 166, 0.3) !important;
}

/* Resto dos elementos */
body.dark-theme .container,
body.dark-theme .cartao,
body.dark-theme .cartao ul li,
body.dark-theme .preview-calendario,
body.dark-theme .cartao.destaque-azul,
body.dark-theme .card-formulario,
body.dark-theme .cartao-login,
body.dark-theme .cartao-formulario,
body.dark-theme .secao,
body.dark-theme .cartao-valor,
body.dark-theme .item-missao,
body.dark-theme .cartao-sobre,
body.dark-theme .membro-equipe,
body.dark-theme .contato-info,
body.dark-theme .localizacao,
body.dark-theme .nenhum-registro,
body.dark-theme .credenciais-teste {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
    box-shadow: var(--shadow-md) !important;
}

body.dark-theme .cartao:hover,
body.dark-theme .cartao-formulario:hover,
body.dark-theme .cartao-valor:hover,
body.dark-theme .item-missao:hover,
body.dark-theme .membro-equipe:hover {
    background-color: var(--bg-card-hover) !important;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg) !important;
}

body.dark-theme .titulo-principal,
body.dark-theme .titulo-pagina,
body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme h4,
body.dark-theme h5,
body.dark-theme h6 {
    color: var(--text-primary) !important;
}

body.dark-theme .subtitulo,
body.dark-theme .descricao-pagina,
body.dark-theme .texto-mensagem,
body.dark-theme p,
body.dark-theme .descricao-equipe,
body.dark-theme .disciplina-membro,
body.dark-theme .descricao-rodape,
body.dark-theme .lista-contato span,
body.dark-theme .lista-contato a,
body.dark-theme .copyright,
body.dark-theme .info-formulario,
body.dark-theme .info-link,
body.dark-theme .contador-caracteres {
    color: var(--text-secondary) !important;
}

body.dark-theme .cartao h2 {
    border-left-color: var(--accent-secondary) !important;
}

body.dark-theme .cartao.destaque-azul {
    border-left-color: var(--accent-secondary) !important;
    background: linear-gradient(135deg, rgba(2, 65, 109, 0.2), rgba(2, 65, 109, 0.1)) !important;
}

body.dark-theme .cartao-formulario.nao-lida {
    border-left-color: #ff6b6b !important;
}

body.dark-theme .cartao-formulario.lida {
    border-left-color: #10b981 !important;
}

body.dark-theme .texto-mensagem {
    border-left-color: var(--accent-secondary) !important;
}

body.dark-theme .evento-lista li {
    border-left-color: var(--accent-secondary) !important;
}

body.dark-theme .lista-contato {
    border-left-color: var(--accent-secondary) !important;
}

body.dark-theme .cartao-valor {
    border-top-color: var(--accent-secondary) !important;
}

body.dark-theme .secao h2 {
    border-left-color: var(--accent-secondary) !important;
}

/* Botões */
body.dark-theme .botao-acesso,
body.dark-theme .botao-enviar,
body.dark-theme .botao-login,
body.dark-theme .botao-contato,
body.dark-theme .botao-contato-sobre,
body.dark-theme .link-acesso,
body.dark-theme .botao-tema {
    background: #02416D !important;
    color: var(--accent-secondary) !important;
    border: 2px solid #CDD071 !important;
}

body.dark-theme .botao-acesso:hover,
body.dark-theme .botao-enviar:hover,
body.dark-theme .botao-login:hover,
body.dark-theme .botao-contato:hover,
body.dark-theme .botao-contato-sobre:hover,
body.dark-theme .link-acesso:hover,
body.dark-theme .botao-tema:hover {
    background: #CDD071 !important;
    color: #02416D !important;
    border-color: #02416D !important;
    box-shadow: 0 8px 20px rgba(2, 65, 109, 0.3) !important;
}

/* Elementos com cores especiais */
body.dark-theme .destaque {
    color: var(--accent-secondary) !important;
    background: rgba(205, 208, 113, 0.15) !important;
}

body.dark-theme .funcao-membro {
    color: var(--accent-secondary) !important;
    background: rgba(205, 208, 113, 0.1) !important;
}

body.dark-theme .cartao-valor i,
body.dark-theme .item-missao h3 i,
body.dark-theme .info-formulario i {
    color: var(--accent-secondary) !important;
}

body.dark-theme .item-missao h3 i {
    background: linear-gradient(135deg, #02416D, #0268A6) !important;
    color: white !important;
}

body.dark-theme .categoria-equipe h3 i {
    background: rgba(2, 65, 109, 0.1) !important;
}

body.dark-theme .contato-info i {
    background: rgba(2, 65, 109, 0.1) !important;
    color: var(--accent-secondary) !important;
}

/* Links */
body.dark-theme a:not(.lista-navegacao a):not(.botao-tema):not(.botao-acesso):not(.botao-enviar):not(.botao-login):not(.botao-contato):not(.botao-contato-sobre):not(.link-acesso):not(.botao-acao):not(.link-social):not(.botao-voltar):not(.link-github) {
    color: var(--accent-secondary) !important;
}

body.dark-theme a:hover:not(.lista-navegacao a):not(.botao-tema):not(.botao-acesso):not(.botao-enviar):not(.botao-login):not(.botao-contato):not(.botao-contato-sobre):not(.link-acesso):not(.botao-acao):not(.link-social):not(.botao-voltar):not(.link-github) {
    color: #e8ecaa !important;
    text-decoration: underline !important;
}

/* Inputs */
body.dark-theme .campo-entrada,
body.dark-theme .campo-textarea,
body.dark-theme input,
body.dark-theme textarea,
body.dark-theme select {
    background: var(--bg-input) !important;
    color: var(--text-primary) !important;
    border: 2px solid var(--border-color) !important;
}

body.dark-theme .campo-entrada:focus,
body.dark-theme .campo-textarea:focus,
body.dark-theme input:focus,
body.dark-theme textarea:focus,
body.dark-theme select:focus {
    border-color: #CDD071 !important;
    background: var(--bg-tertiary) !important;
    box-shadow: 0 0 0 3px rgba(205, 208, 113, 0.1) !important;
}

/* Alertas */
body.dark-theme .alerta.erro {
    background: rgba(220, 53, 69, 0.1) !important;
    color: #ff6b6b !important;
    border: 2px solid #dc3545 !important;
}

body.dark-theme .alerta.sucesso {
    background: rgba(205, 208, 113, 0.15) !important;
    color: var(--accent-secondary) !important;
    border: 2px solid #CDD071 !important;
}

/* Cabeçalho */
body.dark-theme .cabecalho-principal {
    background: linear-gradient(135deg, #02416D 0%, #0d1a26 100%) !important;
    box-shadow: var(--shadow-lg) !important;
    border-bottom: 3px solid #CDD071 !important;
}

/* Badges */
body.dark-theme .badge-admin,
body.dark-theme .em-desenvolvimento {
    background: rgba(255, 215, 0, 0.2) !important;
    color: #ffd700 !important;
    border: 1px solid rgba(255, 215, 0, 0.3) !important;
}

body.dark-theme .badge-comum {
    background: rgba(2, 65, 109, 0.2) !important;
    color: #a8c6d0 !important;
    border: 1px solid rgba(2, 65, 109, 0.3) !important;
}

body.dark-theme .badge-organizador {
    background: rgba(205, 208, 113, 0.2) !important;
    color: #CDD071 !important;
    border: 1px solid rgba(205, 208, 113, 0.3) !important;
}

/* Botão de tema */
body.dark-theme .theme-toggle-btn,
body.dark-theme .mobile-botao-tema {
    background: #132639 !important;
    color: #CDD071 !important;
    border: 2px solid #CDD071 !important;
}

body.dark-theme .theme-toggle-btn:hover,
body.dark-theme .mobile-botao-tema:hover {
    background: #CDD071 !important;
    color: #02416D !important;
    border-color: #02416D !important;
}

/* Scrollbar */
body.dark-theme ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

body.dark-theme ::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

body.dark-theme ::-webkit-scrollbar-thumb {
    background: #02416D;
    border-radius: 5px;
}

body.dark-theme ::-webkit-scrollbar-thumb:hover {
    background: #0268A6;
}

/* Animações */
body.dark-theme .cartao.destaque-azul {
    animation: pulse-dark 2s infinite;
}

@keyframes pulse-dark {
    0% { box-shadow: 0 0 0 0 rgba(205, 208, 113, 0.5); }
    70% { box-shadow: 0 0 0 10px rgba(205, 208, 113, 0); }
    100% { box-shadow: 0 0 0 0 rgba(205, 208, 113, 0); }
}

/* Estados vazios */
body.dark-theme .nenhum-registro .empty-icon {
    color: var(--accent-secondary) !important;
    opacity: 0.7;
}

body.dark-theme .nenhum-registro h3 {
    color: var(--accent-secondary) !important;
}

body.dark-theme .nenhum-registro p {
    color: var(--text-secondary) !important;
}
