/* DEFINIÇÃO DE VARIÁVEIS GLOBAIS 
   (Isso é essencial para o 'var(--cor-branco)' funcionar)
*/
:root {
    --cor-branco: #ffffff;
    --cor-cinza-claro: #f4f7fa;
    --cor-cinza-escuro: #333333;
    --cor-preto: #2c3e50;
    --cor-vermelho: #e74c3c;
    --cor-azul: #2a5298;
    --sombra-padrao: 0 4px 6px rgba(0,0,0,0.1);
}

body {
    background-color: var(--cor-cinza-claro);
    color: var(--cor-cinza-escuro);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* Fonte padrão */
    margin: 0;
    padding: 0;
}

/* --- Cabeçalho Principal --- */
.main-header {
    background: var(--cor-branco); /* Agora vai funcionar */
    padding: 0 2rem;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--sombra-padrao);
    border-bottom: 3px solid var(--cor-vermelho);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-container a {
    text-decoration: none;
}
.logo-container h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--cor-preto);
}
.logo-container h1 i {
    color: var(--cor-vermelho);
    margin-right: 8px;
}

/* --- Navegação Desktop --- */
.nav-desktop ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-desktop ul li {
    position: relative;
}

.nav-desktop ul li a {
    display: block;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--cor-cinza-escuro);
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s ease;
    border-radius: 5px;
}

.nav-desktop ul li a:hover {
    color:  #e74c3c;
    background-color: var(--cor-cinza-claro);
}

/* Link Ativo */
.nav-desktop ul li.active a {
    color: #e74c3c;
    font-weight: 700;
}
/* Cards Gerais da Home */
.home-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--sombra-padrao);
}

.card-title {
    color: #e74c3c;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
/* Botões Login/Logout Nav */
.btn-login-nav, .btn-logout-nav {
    background-color: var(--cor-vermelho);
    color: var(--cor-branco) !important;
    padding: 0.5rem 1.2rem !important;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}
.btn-login-nav:hover, .btn-logout-nav:hover {
    background-color: #a71030;
    color: var(--cor-branco) !important;
}

/* --- Dropdown Desktop --- */
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--cor-branco);
    min-width: 180px;
    box-shadow: var(--sombra-padrao);
    border-radius: 5px;
    z-index: 1001;
    border-top: 3px solid var(--cor-azul);
}
.dropdown-content a {
    color: var(--cor-cinza-escuro);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    width: 100%;
}
.dropdown-content a:hover {
    background-color: var(--cor-cinza-claro);
    color: var(--cor-azul);
}
.dropdown:hover .dropdown-content {
    display: block;
}
.drop-btn i {
    font-size: 0.8em;
    margin-left: 5px;
}


/* --- Menu Mobile (Controles) --- */
.menu-toggle {
    display: none; /* Escondido no desktop */
    font-size: 1.8rem;
    color: var(--cor-cinza-escuro);
    background: none;
    border: none;
    cursor: pointer;
}
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    display: none; /* Começa escondido */
}
.overlay.active {
    display: block;
}

/* --- Menu Mobile (Sidebar Direita) --- */
.nav-mobile-sidebar {
    position: fixed;
    top: 0;
    right: -300px; /* Começa fora da tela */
    width: 280px;
    height: 100vh;
    background: var(--cor-branco);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1002;
    transition: right 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}
.nav-mobile-sidebar.show-menu {
    right: 0; /* Aparece */
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 2px solid var(--cor-vermelho);
}
.mobile-menu-header h3 {
    font-size: 1.4rem;
    font-weight: 700;
}
.menu-close {
    font-size: 1.8rem;
    color: var(--cor-cinza-escuro);
    background: none;
    border: none;
    cursor: pointer;
}

.nav-mobile-sidebar ul {
    list-style: none;
    padding: 1rem 0;
    overflow-y: auto;
    flex-grow: 1;
}
.nav-mobile-sidebar ul li {
    border-bottom: 1px solid var(--cor-cinza-claro);
}
.nav-mobile-sidebar ul li a {
    display: block;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: var(--cor-cinza-escuro);
    font-size: 1.1rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
}
.nav-mobile-sidebar ul li a i {
    width: 30px;
    text-align: center;
    margin-right: 10px;
    color: var(--cor-azul);
}

.nav-mobile-sidebar ul li a:hover {
    background-color: #f9f9f9;
    color: var(--cor-vermelho);
}
.nav-mobile-sidebar a.active-mobile {
    background-color: rgba(220, 20, 60, 0.05);
    color: var(--cor-vermelho);
    font-weight: 700;
}
.nav-mobile-sidebar a.active-mobile i {
    color: var(--cor-vermelho);
}

/* Dropdown Mobile */
.mobile-dropdown-content {
    list-style: none;
    padding: 0;
    background-color: #f9f9f9;
}
.mobile-dropdown-content li a {
    padding-left: 3rem !important; /* Indentação */
    font-size: 1rem !important;
}


/* --- Layout da Página (Sidebar Interna + Main) --- */
.page-container {
    display: flex;
    min-height: calc(100vh - 110px); /* 100% da altura - header e footer */
}

/* Sidebar Interna */
.internal-sidebar {
    flex: 0 0 260px; /* Largura fixa */
    background-color: var(--cor-branco);
    border-right: 1px solid #e0e0e0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    padding: 1rem;
}
.sidebar-header {
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--cor-azul);
}
.sidebar-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--cor-cinza-escuro);
}

.sidebar-nav ul {
    list-style: none;
}
.sidebar-nav ul li a {
    display: block;
    padding: 0.9rem 1rem;
    margin-bottom: 0.5rem;
    text-decoration: none;
    color: #444;
    font-weight: 500;
    border-radius: 5px;
    transition: all 0.3s ease;
}
.sidebar-nav ul li a i {
    margin-right: 10px;
    width: 20px;
    color: #888;
    transition: color 0.3s ease;
}
.sidebar-nav ul li a:hover {
    background-color: var(--cor-cinza-claro);
    color: var(--cor-azul);
}
.sidebar-nav ul li a:hover i {
    color: var(--cor-azul);
}
.sidebar-nav ul li.active a {
    background-color: var(--cor-azul);
    color: var(--cor-branco);
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}
.sidebar-nav ul li.active a i {
    color: var(--cor-branco);
}


/* Conteúdo Principal */
.main-content {
    flex: 1; /* Ocupa o resto do espaço */
    padding: 2rem;
    background-color: #f4f7fa; /* Fundo ligeiramente diferente */
}
.content-header {
    padding-bottom: 1rem;
    border-bottom: 1px solid #ddd;
    margin-bottom: 2rem;
}
.content-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--cor-preto);
}
.content-header p {
    font-size: 1rem;
    color: #666;
}

/* --- Rodapé --- */
.main-footer {
    background: var(--cor-cinza-escuro);
    color: #ccc;
    padding: 1.5rem 2rem;
    text-align: center;
    font-size: 0.9rem;
    border-top: 3px solid var(--cor-azul);
}
.main-footer p {
    margin: 0.2rem 0;
}

/* --- Botão Voltar ao Topo --- */
#back-to-top {
    display: none; /* Escondido por JS */
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--cor-vermelho);
    color: var(--cor-branco);
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: var(--sombra-padrao);
    z-index: 500;
    transition: background-color 0.3s ease, transform 0.3s ease;
}
#back-to-top:hover {
    background-color: #a71030;
    transform: translateY(-3px);
}

/* --- Media Queries (Responsividade) --- */

/* Breakpoint para tablets e celulares (quando o menu desktop some) */
@media (max-width: 992px) {
    .nav-desktop {
        display: none;
    }
    .menu-toggle {
        display: block;
    }
    .main-header {
        padding: 0 1rem;
    }
}

/* Layout de página em telas menores */
@media (max-width: 768px) {
    .page-container {
        flex-direction: column;
    }
    .internal-sidebar {
        flex: 0 0 auto; /* Altura automática */
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
    .main-content {
        padding: 1.5rem;
    }
    .content-header h2 {
        font-size: 1.8rem;
    }
}
/*
 * =========================================
 * ESTILOS INTERNOS DO GERENCIAMENTO
 * =========================================
 */

.content-body {
    padding: 1rem 0;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--cor-branco);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border-left: 5px solid var(--cor-vermelho);
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
    font-size: 1.1rem;
    color: var(--cor-azul);
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--cor-preto);
}

.stat-detail {
    font-size: 1rem;
    font-weight: 500;
    color: var(--cor-cinza-escuro);
}

.icon-overlay {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    color: rgba(0, 0, 0, 0.05);
}

.info-box {
    background-color: #e0f7fa; /* Azul claro */
    color: #006064; /* Azul escuro */
    padding: 1rem;
    border-radius: 5px;
    border-left: 5px solid var(--cor-azul);
}
.info-box h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 600;
}
/*
 * =========================================
 * ESTILOS DO FORMULÁRIO DE LÍDERES
 * =========================================
 */

.box-form {
    background: var(--cor-branco);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    border-top: 3px solid var(--cor-vermelho);
}

.box-form h3 {
    color: var(--cor-azul);
    margin-top: 0;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.form-group label {
    font-weight: 600;
}

.box-form input[type="text"],
.box-form select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-top: 0.5rem;
    font-size: 1rem;
}

.box-form input[type="file"] {
    margin-top: 0.5rem;
    padding: 0.5rem 0;
}

.btn-primary {
    background: var(--cor-azul);
    color: var(--cor-branco);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.btn-primary:hover {
    background-color: #0056b3;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

/* Mensagens de Feedback */
.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}
.hidden {
    display: none !important;
}

/* ------------------------------------------
 * ESTILOS DA LISTAGEM
 * ------------------------------------------ */

.list-header {
    font-size: 1.5rem;
    color: var(--cor-vermelho);
    margin: 2rem 0 1rem;
}

.lideres-lista {
    list-style: none;
    padding: 0;
}

.lideres-lista li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--cor-branco);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border-left: 5px solid var(--cor-azul);
    transition: all 0.3s ease;
}

.lideres-lista li:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.lider-info {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.lider-foto {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 2px solid #ddd;
}

.lider-cargo {
    display: block;
    font-size: 0.9rem;
    color: #666;
}

.btn-delete {
    background: #dc3545; /* Vermelho padrão para exclusão */
    color: var(--cor-branco);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.btn-delete:hover {
    background-color: #c82333;
}

/*
 * =========================================
 * ESTILOS DA TABELA DE GERENCIAMENTO
 * =========================================
 */

.table-container {
    background: var(--cor-branco);
    border-radius: 8px;
    box-shadow: var(--sombra-padrao);
    overflow-x: auto; /* Para tabelas responsivas */
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background-color: #f9f9f9;
    font-weight: 600;
    color: var(--cor-azul);
}

.data-table tbody tr:hover {
    background-color: #f4f7fa;
}

/* Badges de Tipo de Usuário */
.badge {
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--cor-branco);
}
.badge i {
    margin-right: 4px;
}
.badge.admin {
    background-color: var(--cor-vermelho);
}
.badge.lider {
    background-color: var(--cor-azul);
}

/* Formulário inline (mudar senha) */
.form-inline {
    display: flex;
    gap: 8px;
    align-items: center;
}
.form-inline-input {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.9rem;
    max-width: 150px;
}
.btn-sm {
    padding: 0.5rem 0.8rem;
    font-size: 0.9rem;
}
/*
 * =========================================
 * ESTILOS DO MÓDULO DE LÍDERES
 * =========================================
 */

.lider-foto-tabela {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #eee;
}
/*
 * =========================================
 * ESTILOS DO MÓDULO DE DEPARTAMENTOS
 * =========================================
 */

.lider-info-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lider-foto-tabela-sm {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #eee;
}
/*
 * =========================================
 * ESTILOS DA PÁGINA DE DEPARTAMENTO
 * =========================================
 */

.department-sidebar .sidebar-header {
    border-bottom-color: var(--cor-vermelho); /* Muda a cor do header */
}

.team-member-card {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Adicionado para empurrar o botão para o final */
    gap: 12px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid var(--cor-vermelho);
}

.team-member-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--cor-branco);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.team-member-info strong {
    display: block;
    color: var(--cor-cinza-escuro);
    font-weight: 600;
}
.team-member-info span {
    font-size: 0.9rem;
    color: var(--cor-vermelho);
    font-weight: 500;
}

.team-role-header {
    font-size: 1.1rem;
    color: var(--cor-cinza-escuro);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

/* Estilo simples para Auxiliares (sem foto) */
.team-member-card.simple {
    background-color: transparent;
    border-left: none;
    padding-left: 5px;
    margin-bottom: 8px;
}
.team-member-icon {
    font-size: 1.2rem;
    color: var(--cor-azul);
    width: 25px;
    justify-content: space-between; /* Adicionado para empurrar o botão para o final */
}
.team-member-card.simple .team-member-info {
    flex-grow: 1; /* Permite que o nome ocupe o espaço */
}

/* Estilos para a Seção de Admin na pág. de depto */
.admin-section {
    border: 2px dashed var(--cor-vermelho);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    background: #fff8f9;
}
.admin-section-title {
    color: var(--cor-vermelho);
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.6rem;
}

/* Botão micro para exclusão na sidebar */
.form-delete-micro {
    margin: 0;
    padding: 0;
}
.btn-delete-micro {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}
.btn-delete-micro:hover {
    color: var(--cor-vermelho);
    background-color: #fdd;
}

/* * =========================================
 * ESTILOS DA PÁGINA DE DEPARTAMENTO (Repetido)
 * =========================================
 */

.department-sidebar .sidebar-header {
    border-bottom-color: var(--cor-vermelho); /* Muda a cor do header */
}

.team-member-card {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Adicionado para empurrar o botão para o final */
    gap: 12px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid var(--cor-vermelho);
}

.team-member-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--cor-branco);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.team-member-info strong {
    display: block;
    color: var(--cor-cinza-escuro);
    font-weight: 600;
}
.team-member-info span {
    font-size: 0.9rem;
    color: var(--cor-vermelho);
    font-weight: 500;
}

.team-role-header {
    font-size: 1.1rem;
    color: var(--cor-cinza-escuro);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

/* Estilo simples para Auxiliares (sem foto) */
.team-member-card.simple {
    background-color: transparent;
    border-left: none;
    padding-left: 5px;
    margin-bottom: 8px;
    justify-content: space-between; /* Adicionado para empurrar o botão para o final */
}
.team-member-icon {
    font-size: 1.2rem;
    color: var(--cor-azul);
    width: 25px;
    text-align: center;
}
.team-member-card.simple .team-member-info {
    flex-grow: 1; /* Permite que o nome ocupe o espaço */
}

/* Estilos para a Seção de Admin na pág. de depto */
.admin-section {
    border: 2px dashed var(--cor-vermelho);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    background: #fff8f9;
}
.admin-section-title {
    color: var(--cor-vermelho);
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.6rem;
}

/* Botão micro para exclusão na sidebar */
.form-delete-micro {
    margin: 0;
    padding: 0;
}
.btn-delete-micro {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}
.btn-delete-micro:hover {
    color: var(--cor-vermelho);
    background-color: #fdd;
}
/*
 * =========================================
 * ESTILOS DE EVENTOS (Cards e Modal)
 * =========================================
 */

.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.event-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 1 / 1; /* Força o card a ser quadrado */
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.event-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Botão de excluir sobreposto no card */
.event-delete {
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 10;
}
.event-delete .btn-delete-micro {
    background-color: rgba(220, 53, 69, 0.8); /* Fundo vermelho semi-transparente */
    color: white;
}

/*
 * =========================================
 * MODAL DE EVENTOS
 * =========================================
 */

.event-modal-overlay {
    position: fixed;
    top: 5%;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    
    /* Escondido por padrão */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.event-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.event-modal-content {
    position: relative;
    background: var(--cor-branco);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 300px;
    max-height: 70vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    
    /* Animação de entrada */
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.event-modal-overlay.active .event-modal-content {
    transform: scale(1);
}

.event-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: red;
    padding:5px;
    border: none;
    font-size: 2.5rem;
    color: var(--cor-branco);
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    cursor: pointer;
    z-index: 2002;
    padding: 0;
    line-height: 1;
}

.event-modal-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
    background-color: #eee; /* Fundo enquanto carrega */
}

.event-modal-details {
    padding: 1.5rem 2rem;
    overflow-y: auto;
     background-color: #eee; /* Fundo enquanto carrega */
}

.event-modal-details h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--cor-vermelho);
    font-size: 1.8rem;
    font-weight: 700;
}

.event-modal-details p {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.event-modal-details p i {
    color: var(--cor-azul);
    width: 30px;
    text-align: center;
    font-size: 1.2rem;
    margin-right: 10px;
}

@media (max-width: 640px) {
    .event-modal-content {
        flex-direction: column;
    }
    .event-modal-image {
        height: 150px;
    }
    .event-modal-details {
        padding: 1.5rem;
    }
    .event-modal-details h2 {
        font-size: 1.5rem;
    }
}
/* Estilos para o sistema de missões */
.missoes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.missao-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 5px solid #28a745;
}

.missao-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.missao-card.verde { border-left-color: #28a745; }
.missao-card.laranja { border-left-color: #ffc107; }
.missao-card.vermelho { border-left-color: #dc3545; }
.missao-card.cinza { border-left-color: #6c757d; }

.missao-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.missao-lider-foto {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.missao-info {
    flex: 1;
}

.missao-info h3 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
}

.missao-lider {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.missao-status {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.missao-status.Pendente { background: #fff3cd; color: #856404; }
.missao-status.Em_Andamento { background: #d1ecf1; color: #0c5460; }
.missao-status.Concluida { background: #d4edda; color: #155724; }
.missao-status.Finalizada { background: #e2e3e5; color: #383d41; }

/* Modal styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.large-modal {
    width: 600px;
    max-width: 95%;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
}

/* Audio recorder */
.audio-recorder {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 0.5rem;
}

/* Checklist */
.checklist-item {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    align-items: center;
}

.checklist-item input {
    flex: 1;
}

.btn-remove {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
}

/* Mission details */
.mission-meta {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
}

.meta-item {
    margin-bottom: 0.5rem;
}

.badge {
    background: #007bff;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
    margin-right: 0.3rem;
}

.checklist-items {
    margin: 1rem 0;
}

.checklist-item {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 0.5rem;
}

.checklist-item.completed {
    background: #d4edda;
    border-color: #c3e6cb;
}

.checklist-item.completed span {
    text-decoration: line-through;
    color: #155724;
}

.mission-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-success {
    background: #28a745;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
}
/*
 * =========================================
 * ESTILOS DO IFRAME DE INTEGRAÇÃO
 * =========================================
 */

/* * Remove o padding da área principal QUANDO o iframe estiver ativo,
 * para que ele preencha toda a tela.
 */
.main-content.iframe-container {
    padding: 0;
    background-color: #ffffff; /* Fundo branco para o iframe */
    overflow: hidden; /* Garante que o iframe não vaze */
}

/*
 * Faz o iframe preencher 100% da área de conteúdo.
 */
.content-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}
.audio-recorder-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap; /* Permite quebrar linha em telas pequenas */
}

.audio-recorder-container button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s ease;
}

.btn-record-start {
    background-color: #28a745; /* Verde */
    color: white;
}
.btn-record-start:disabled {
    background-color: #96d6a9;
}

.btn-record-stop {
    background-color: #dc3545; /* Vermelho */
    color: white;
}
.btn-record-stop:disabled {
    background-color: #f19ca5;
}

#audioPlayback {
    display: none; /* Começa oculto */
    max-width: 250px;
    height: 40px; /* Altura padrão do player */
}
/* =========================================
 * RODAPÉ MODERNO (Footer)
 * ========================================= */

.modern-footer {
    background-color: #1a1a1a;
    color: #e0e0e0;
    padding-top: 3rem;
    margin-top: auto; /* Empurra para baixo */
    border-top: 4px solid var(--cor-vermelho);
}

.footer-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 2rem 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 3rem;
}

/* Lado Esquerdo */
.footer-brand {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-logo {
    font-size: 2.5rem;
    color: var(--cor-vermelho);
    margin-bottom: 1rem;
    background: rgba(255,255,255,0.05);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.church-name {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
}

.project-name {
    font-size: 1rem;
    color: var(--cor-azul);
    font-weight: 500;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.dev-credits {
    font-size: 0.8rem;
    color: #888;
    margin-top: auto;
}

/* Lado Direito */
.footer-links {
    flex: 2;
    min-width: 300px;
}

.footer-links h4 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--cor-azul);
    display: inline-block;
    padding-bottom: 5px;
}

.footer-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.8rem;
}

.footer-nav-grid a {
    color: #ccc;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-nav-grid a:hover {
    color: var(--cor-vermelho);
    transform: translateX(5px);
}

.footer-nav-grid i {
    width: 20px;
    text-align: center;
    color: var(--cor-azul);
}

.link-admin { color: #ff9800 !important; }
.link-logout { color: #ff6b6b !important; }

/* Barra de Copyright */
.footer-copyright {
    background-color: #111;
    text-align: center;
    padding: 1rem;
    font-size: 0.8rem;
    color: #666;
    border-top: 1px solid #333;
}

/* Responsividade */
@media (max-width: 992px) {
    .nav-desktop { display: none; }
    .menu-toggle { display: block; }
}

@media (max-width: 768px) {
    .page-container { flex-direction: column; }
    .internal-sidebar { width: 100%; border-right: none; border-bottom: 1px solid #ddd; }
    
    .footer-content-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    .footer-brand { align-items: center; }
    .footer-nav-grid {
        justify-content: center;
        text-align: left;
    }
}
/* Versículo do Dia */
.verse-daily-card {
     background: linear-gradient(135deg, #2b1055, #7597de);
    color: white;
    padding: 1rem;
    border-radius: 12px;
    margin: 2rem 0;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.verse-daily-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.verse-daily-card p {
    font-size: 1.2rem;
    font-style: italic;
    font-family: 'Georgia', serif;
}
/*
 * =========================================
 * ESTILOS DO MURAL DE ORAÇÃO
 * =========================================
 */

/* Hero Section (Topo da página) */
.prayer-hero {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('https://images.unsplash.com/photo-1491975474562-1f4e30bc9468?auto=format&fit=crop&q=80&w=1200'); /* Imagem de fundo */
    background-size: cover;
    background-position: center;
    color: white;
    padding: 3rem 1rem;
    text-align: center;
    border-radius: 0 0 20px 20px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.prayer-hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.prayer-hero-content p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.btn-prayer-hero {
    background-color: var(--cor-vermelho);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    border-radius: 30px;
    cursor: pointer;
    margin-top: 1.5rem;
    font-weight: bold;
    transition: transform 0.2s, background-color 0.2s;
}

.btn-prayer-hero:hover {
    transform: scale(1.05);
    background-color: #c01135;
}

/* Layout Grid (Sidebar + Feed) */
.prayer-layout {
    display: grid;
    grid-template-columns: 350px 1fr; /* Coluna fixa para form, resto para feed */
    gap: 2rem;
    align-items: start;
}

/* Sidebar (Formulário) */
.prayer-sidebar {
    position: sticky;
    top: 90px; /* Fixa ao rolar */
}

.verse-card-small {
    background-color: #fff8e1; /* Amarelo claro */
    border-left: 4px solid #ffc107;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.verse-card-small h4 { margin: 0 0 0.5rem 0; color: #d39e00; }
.verse-card-small p { margin: 0; font-style: italic; color: #555; }

/* Grid de Pedidos */
.prayer-feed {
    width: 100%;
}

.prayer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Card Individual de Oração */
.prayer-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    border-top: 4px solid var(--cor-azul);
    transition: transform 0.2s;
}

.prayer-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.prayer-header {
    margin-bottom: 1rem;
}

.prayer-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.prayer-avatar {
    width: 40px;
    height: 40px;
    background-color: #f0f2f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 1.2rem;
}

.prayer-user strong {
    display: block;
    color: #333;
}

.prayer-date {
    display: block;
    font-size: 0.8rem;
    color: #888;
}

.prayer-body p {
    color: #444;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    white-space: pre-wrap; /* Mantém quebras de linha do texto */
}

.prayer-footer {
    margin-top: auto;
    border-top: 1px solid #eee;
    padding-top: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Botão "Eu Orei" */
.btn-pray {
    background-color: white;
    border: 1px solid var(--cor-azul);
    color: var(--cor-azul);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.btn-pray:hover {
    background-color: #e6f0ff;
}

/* Estado "Oração Realizada" */
.btn-pray.prayed {
    background-color: var(--cor-azul);
    color: white;
    border-color: var(--cor-azul);
}

.badge-count {
    background-color: rgba(0,0,0,0.05);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    color: inherit;
}

.btn-pray.prayed .badge-count {
    background-color: rgba(255,255,255,0.2);
    color: white;
}

.pray-text-helper {
    font-size: 0.85rem;
    color: #888;
}

/* Responsividade */
@media (max-width: 768px) {
    .prayer-layout {
        grid-template-columns: 1fr; /* Coluna única no celular */
    }
    
    .prayer-sidebar {
        position: static; /* Remove sticky no celular */
        order: -1; /* Formulário aparece primeiro */
        margin-bottom: 2rem;
    }
    
    .prayer-hero h2 {
        font-size: 1.8rem;
    }
}
/*
 * =========================================
 * ESTILOS DO QUIZ GAMIFICADO
 * =========================================
 */

.quiz-hero {
    background: linear-gradient(135deg, #8e44ad, #9b59b6);
    color: white;
    padding: 3rem 1rem;
    text-align: center;
    border-radius: 0 0 20px 20px;
    margin-bottom: 2rem;
}

.quiz-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

/* Áreas de Tela (Esconde as que não estão ativas) */
.quiz-screen { display: none; }
.quiz-screen.active { display: block; animation: fadeIn 0.5s; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Tela Inicial */
.quiz-welcome-card {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}
.icon-large { font-size: 4rem; color: #f1c40f; margin-bottom: 1rem; }
.quiz-input {
    width: 100%; padding: 12px; font-size: 1.1rem; text-align: center;
    border: 2px solid #ddd; border-radius: 8px;
}
.btn-quiz-start {
    background: #27ae60; color: white; border: none;
    padding: 12px 40px; font-size: 1.2rem; border-radius: 30px;
    cursor: pointer; font-weight: bold; margin-top: 1rem;
    transition: transform 0.2s;
}
.btn-quiz-start:hover { transform: scale(1.05); background: #2ecc71; }

/* Tela de Pergunta */
.quiz-header-bar {
    display: flex; justify-content: space-between;
    margin-bottom: 1rem; font-weight: bold; color: #555;
}
.quiz-question-card {
    background: white; padding: 2rem; border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-top: 5px solid #8e44ad;
}
.quiz-options { display: flex; flex-direction: column; gap: 10px; margin-top: 2rem; }
.quiz-opt-btn {
    padding: 15px; text-align: left; background: #f8f9fa;
    border: 2px solid #eee; border-radius: 8px; cursor: pointer;
    font-size: 1rem; transition: all 0.2s;
}
.quiz-opt-btn:hover:not(:disabled) { border-color: #8e44ad; background: #f3e5f5; }
.quiz-opt-btn.correct { background: #d4edda; border-color: #28a745; color: #155724; }
.quiz-opt-btn.wrong { background: #f8d7da; border-color: #dc3545; color: #721c24; }

.quiz-feedback { text-align: center; margin-top: 1.5rem; }
.btn-next-q {
    background: #3498db; color: white; border: none;
    padding: 10px 30px; border-radius: 20px; cursor: pointer;
    font-size: 1rem;
}

/* Tela de Resultado */
.quiz-result-card {
    text-align: center; background: white; padding: 3rem;
    border-radius: 15px; box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}
.icon-trophy { font-size: 5rem; color: #f1c40f; margin-bottom: 1rem; }
.final-score { font-size: 4rem; font-weight: bold; color: #8e44ad; margin: 1rem 0; }
.btn-quiz-restart {
    background: #95a5a6; color: white; border: none;
    padding: 10px 30px; border-radius: 20px; cursor: pointer;
    font-size: 1rem; margin-top: 1rem;
}

/* Ranking Sidebar */
.ranking-card {
    background: white; padding: 1.5rem; border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.ranking-list { list-style: none; padding: 0; }
.ranking-list li {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 0; border-bottom: 1px solid #eee;
}
.rank-pos {
    font-weight: bold; color: #8e44ad; font-size: 1.2rem; width: 30px;
}
.rank-info { flex: 1; line-height: 1.2; }
.rank-info strong { display: block; color: #333; }
.rank-info small { color: #888; font-size: 0.8rem; }
.rank-points { font-weight: bold; color: #f39c12; }

@media (max-width: 768px) {
    .quiz-layout { grid-template-columns: 1fr; }
}
/* ... código existente ... */

/*
 * =========================================
 * WIDGET QUIZ (GAMER STYLE)
 * =========================================
 */

.quiz-cta-card {
    background: linear-gradient(135deg, #2b1055, #7597de);
    border-radius: 15px;
    padding: 2px; /* Borda gradiente */
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
    position: relative;
    color: white;
    margin-bottom: 2rem;
}

.quiz-cta-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(117, 151, 222, 0.4);
}

.quiz-cta-content {
    background: rgba(0, 0, 0, 0.8); /* Fundo escuro translúcido */
    border-radius: 13px;
    padding: 1.5rem;
    text-align: center;
    height: 100%;
    backdrop-filter: blur(5px);
}

/* Ícone Animado */
.quiz-icon-animate {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: #f1c40f;
    animation: float 3s ease-in-out infinite;
    text-shadow: 0 0 10px rgba(241, 196, 15, 0.5);
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.quiz-cta-title {
    font-family: 'Press Start 2P', cursive, sans-serif; /* Fonte estilo pixel se disponível, ou fallback */
    font-size: 1.4rem;
    margin: 0 0 0.5rem 0;
    background: linear-gradient(to right, #f1c40f, #e67e22);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.quiz-cta-text {
    font-size: 0.9rem;
    color: #ddd;
    margin-bottom: 1.5rem;
}

/* Mini Ranking */
.quiz-ranking-preview {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.quiz-ranking-preview h4 {
    margin: 0 0 0.8rem 0;
    font-size: 0.9rem;
    color: #f1c40f;
    text-align: center;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 5px;
}

.quiz-ranking-preview ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.quiz-ranking-preview li {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.rank-pos { color: #f1c40f; font-weight: bold; width: 25px; }
.rank-name { color: white; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-pts { color: #2ecc71; font-weight: bold; }

/* Botão Play */
.btn-play-now {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
    transition: transform 0.2s;
    width: 100%;
}

.btn-play-now:hover {
    transform: scale(1.05);
    background: linear-gradient(45deg, #ff6b6b, #ee5253);
}

.btn-play-now i { margin-left: 8px; }