/* Sistema da Igreja - CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* === LOGIN === */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.logo {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.logo h1 {
    color: #333;
    margin-bottom: 10px;
}

.logo p {
    color: #666;
}

.users-info {
    background: rgba(255,255,255,0.9);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.users-info h4 {
    margin-bottom: 15px;
    color: #333;
}

.users-info p {
    margin: 5px 0;
    font-family: monospace;
    color: #555;
}

.login-form {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-login:hover {
    transform: translateY(-2px);
}

/* === DASHBOARD === */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.server-info {
    font-size: 12px;
    background: rgba(255,255,255,0.2);
    padding: 5px 10px;
    border-radius: 15px;
    margin-top: 5px;
}

.logout-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
}

.content {
    max-width: 1000px;
    margin: 30px auto;
    padding: 0 20px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    text-align: center;
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
    color: #667eea;
    margin: 10px 0;
}

.welcome-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.info-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.info-box code {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}

.developing {
    text-align: center;
    color: #666;
    font-style: italic;
    margin-top: 30px;
}

/* === ALERTAS === */
.alert {
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 14px;
}

.alert-error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.alert-success {
    background: #efe;
    color: #363;
    border: 1px solid #cfc;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* === NOVOS ESTILOS PARA MEMBROS === */

/* Dashboard e estrutura geral */
.dashboard {
    background: #f5f6fa;
    min-height: 100vh;
}

.dashboard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.back-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 8px 15px;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}

.back-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Estilo para o container principal (o "retângulo") */
.main-content-card {
    background-color: #ffffff; /* Fundo branco para o retângulo */
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* Sombra suave */
    margin: 20px auto; /* Centraliza e adiciona margem superior/inferior */
    max-width: 95%; /* Limita a largura máxima para não ficar muito esticado */
    box-sizing: border-box; /* Garante que padding e border sejam incluídos na largura/altura */
}

/* Tabelas */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

table tr:hover {
    background: #f8f9fa;
}

/* Status e badges */
.status-active {
    color: #28a745;
    font-weight: bold;
}

.status-inactive {
    color: #dc3545;
    font-weight: bold;
}

/* Estilos para a coluna "Batizado" */
.batizado-status {
    font-weight: bold;
    text-align: center;
}

.batizado-sim {
    color: #28a745; /* Verde */
}

.batizado-nao {
    color: #dc3545; /* Vermelho */
}

.cargo-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.cargo-pastor { background: #6f42c1; }
.cargo-presbítero { background: #e83e8c; }
.cargo-diácono { background: #fd7e14; }
.cargo-evangelista { background: #20c997; }
.cargo-cooperador { background: #6c757d; }
.cargo-membro { background: #007bff; }
.cargo-missionário { background: #dc3545; }

/* Botões de ação */
.btn-action {
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin: 2px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.btn-edit-membro {
    background-color: #007bff; /* Azul para Editar */
    color: white;
    border: 1px solid #0069d9;
}

.btn-edit-membro:hover {
    background-color: #0069d9;
    border-color: #0062cc;
}

.btn-delete-membro {
    background-color: #dc3545; /* Vermelho para Excluir */
    color: white;
    border: 1px solid #c82333;
}

.btn-delete-membro:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

/* Ajuste para a coluna de ações para que os botões caibam */
.actions-col {
    white-space: nowrap;
    min-width: 160px;
    text-align: center;
}

/* === PAINEL INFO ADMIN === */
.info-panel {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #dc3545;
    margin: 20px;
    margin-top: 30px;
}

.info-panel h4 {
    color: #333;
    margin-bottom: 15px;
}

.info-panel ul {
    list-style: none;
    padding: 0;
}

.info-panel li {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
    color: #666;
}

.info-panel li:last-child {
    border-bottom: none;
}

.info-panel strong {
    color: #dc3545;
}

/* Estado vazio */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state p {
    margin-bottom: 10px;
    line-height: 1.6;
}

/* === IMPORTAÇÃO === */
.import-instructions, .upload-section, .csv-format, .template-download {
    margin: 20px;
}

.instruction-card, .upload-card, .format-card, .download-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.file-input-wrapper {
    position: relative;
    margin: 20px 0;
}

.file-input-wrapper input[type=file] {
    display: none;
}

.file-label {
    display: inline-block;
    background: #007bff;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.file-label:hover {
    background: #0056b3;
}

.file-name {
    margin-left: 15px;
    color: #666;
    font-style: italic;
}

.btn-import {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-import:hover {
    background: #218838;
}

/* REMOVIDO .btn-download { ... } */

.import-btn {
    background: #17a2b8;
    color: white;
}

.import-btn:hover {
    background: #138496;
}

.csv-example {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    font-family: monospace;
    font-size: 12px;
    margin: 10px 0;
    overflow-x: auto;
}

/* === ESTILOS PARA FORMULÁRIO DE EDIÇÃO E NOVO MEMBRO === */
.form-container {
    margin: 20px auto;
    max-width: 1200px;
}

.form-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.member-form fieldset {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.member-form legend {
    font-weight: bold;
    color: #495057;
    padding: 0 10px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: 600;
    color: #495057;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
}

.form-group small {
    color: #6c757d;
    font-size: 12px;
    margin-top: 3px;
}

.form-group input[type="checkbox"],
.form-group input[type="radio"] {
    width: auto;
    padding: 0;
    margin: 0;
}

.congregacao-opcoes {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
}

.congregacao-opcoes label,
.congregacao-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    margin: 0;
}

.congregacao-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px 12px;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.btn-primary {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary:hover {
    background: #218838;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* === VALIDAÇÕES E COLUNAS === */
.validation-info {
    margin: 20px;
}

.validation-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.validation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.validation-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.validation-item h4 {
    margin: 0 0 8px 0;
    color: #28a745;
}

.validation-item p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
}

.columns-list ul {
    columns: 2;
    column-gap: 30px;
}

.columns-list li {
    margin-bottom: 8px;
    break-inside: avoid;
}

/* Estilos para a barra de ações e pesquisa */
.actions-bar, .search-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    padding: 0;
    background-color: transparent;
    box-shadow: none;
    align-items: center;
}

.search-bar form {
    display: flex;
    gap: 10px;
    flex-grow: 1;
}

.search-bar input[type="text"] {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 1rem;
    max-width: 400px;
}

.btn-search, .btn-clear-search {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    white-space: nowrap;
}

.btn-search:hover {
    background-color: #0056b3;
}

.btn-clear-search {
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-clear-search:hover {
    background-color: #5a6268;
}

/* Mensagem de informação quando não há membros ou busca sem resultados */
.info-message {
    text-align: center;
    padding: 20px;
    background-color: #e9ecef;
    border-radius: 8px;
    margin-top: 20px;
    color: #495057;
    font-size: 1.1rem;
}

/* Estilos para o botão "Ver Aniversariantes" */
.btn-view-birthdays {
    background-color: #4CAF50; /* Verde */
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    margin-left: 0px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-view-birthdays:hover {
    background: #3e8e41;
}

/* Estilo para o botão "Ver Pendências" */
.btn-pending-members {
    background-color: #ffc107; /* Amarelo/Laranja para aviso */
    color: #333; /* Texto escuro */
    border: 1px solid #e0a800;
}

.btn-pending-members:hover {
    background-color: #e0a800;
    border-color: #cc9900;
}

/* Estilo para o botão "Criar Tabela Membros" */
.btn-danger {
    background-color: #dc3545; /* Vermelho */
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* Estilo para o botão "Imprimir Carteirinha" */
.btn-print-card {
    background-color: #6f42c1; /* Roxo */
    color: white;
    border: 1px solid #5a359e;
}

.btn-print-card:hover {
    background-color: #5a359e;
    border-color: #4c2d8a;
}

/* Estilo para o botão "Carteirinhas Vencidas" */
.btn-carteirinhas-vencidas {
    background-color: #dc3545; /* Vermelho para indicar vencimento */
    color: white;
    border: 1px solid #c82333;
}

.btn-carteirinhas-vencidas:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

/* === ESTILOS PARA LAYOUT DE FORMULÁRIO COM SIDEBAR DE FOTO === */
.form-layout-with-sidebar {
    display: grid;
    grid-template-columns: 3fr 1fr; /* 3/4 para campos, 1/4 para foto */
    gap: 30px;
    margin-top: 20px;
}

.form-fields-main {
    display: flex; /* Para empilhar os fieldsets verticalmente */
    flex-direction: column;
    gap: 20px; /* Espaço entre os fieldsets */
}

.photo-sidebar {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Alinha o conteúdo ao topo */
    gap: 15px;
}

.sidebar-photo-label {
    font-weight: bold;
    color: #333;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.current-photo-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 10px;
}

/* Estilo para o label do input file customizado */
.file-label {
    display: inline-block;
    background-color: #6c757d; /* Cinza */
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s ease;
    margin-top: 10px;
}

.file-label:hover {
    background-color: #5a6268;
}

.file-name {
    margin-left: 10px;
    color: #495057;
    font-style: italic;
    word-break: break-all; /* Quebra palavras longas */
}

.no-photo-message {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    margin-bottom: 15px;
}

/* Estilo para o checkbox de remover foto */
.checkbox-container {
    display: block;
    position: relative;
    padding-left: 25px;
    margin-top: 10px;
    cursor: pointer;
    font-size: 0.9em;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    color: #dc3545; /* Vermelho para indicar ação de remover */
    font-weight: bold;
    text-align: left; /* Alinha o texto à esquerda dentro do container */
    width: 100%; /* Ocupa a largura total para alinhamento */
    max-width: 180px; /* Limita a largura para não ficar muito largo */
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: #eee;
    border-radius: 3px;
}

.checkbox-container:hover input ~ .checkmark {
    background-color: #ccc;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: #dc3545;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}

/* === RESPONSIVO === */
@media (max-width: 992px) { /* Ajuste o breakpoint para o layout de duas colunas */
    .form-layout-with-sidebar {
        grid-template-columns: 1fr; /* Uma coluna em telas menores */
        gap: 20px;
    }
    .photo-sidebar {
        order: -1; /* Coloca a sidebar no topo em telas menores */
        margin-bottom: 20px;
    }
    .current-photo-preview img {
        max-width: 120px; /* Reduz o tamanho da imagem em telas menores */
    }
    .checkbox-container {
        max-width: none; /* Remove limite de largura em telas menores */
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .content {
        padding: 20px 15px;
    }
    
    .login-container {
        padding: 15px;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .user-info {
        flex-direction: column;
        gap: 10px;
    }
    
    /* Ajustes para o card principal em telas menores */
    .main-content-card {
        margin: 10px;
        padding: 15px;
    }

    .table-container {
        margin: 0;
        padding: 0;
    }
    
    table {
        font-size: 12px;
    }
    
    .actions-col {
        min-width: auto;
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    
    .btn-action {
        width: 100%;
        padding: 10px 15px;
    }

    .actions-bar, .search-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .search-bar form {
        flex-direction: column;
    }
    .search-bar input[type="text"] {
        max-width: 100%;
    }
    .btn-search, .btn-clear-search {
        width: 100%;
    }
    
    .info-panel {
        margin: 10px;
    }

    .columns-list ul {
        columns: 1;
    }

    .congregacao-opcoes {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .congregacao-grid {
        grid-template-columns: 1fr;
    }
}






/* Ajustes para a tabela de Membros Cadastrados (mantendo o layout original) */

/* Wrapper principal para o conteúdo da página de membros */
.content-wrapper {
    max-width: 100%; /* Garante que o wrapper não transborde */
    padding: 20px;
    box-sizing: border-box; /* Inclui padding na largura total */
}

/* Cabeçalho da página (Membros Cadastrados) */
.page-header {
    margin-bottom: 20px;
    text-align: center;
}
.page-header h1 {
    font-size: 1.8em;
    color: #333;
    margin: 0;
}

/* Barra de ações (busca e botões) - Ajustado para ser mais flexível */
.action-bar {
    display: flex;
    flex-wrap: wrap; /* Permite que os itens quebrem a linha em telas menores */
    gap: 10px; /* Espaço entre os elementos */
    margin-bottom: 20px;
    align-items: center; /* Alinha verticalmente os itens */
    justify-content: space-between; /* Distribui os itens horizontalmente */
}

.action-bar .search-form {
    display: flex;
    flex-grow: 1; /* Permite que o formulário de busca ocupe espaço */
    max-width: 400px; /* Limita a largura máxima da busca */
    min-width: 250px; /* Garante que a busca não fique muito pequena */
}

.action-bar .search-form input {
    flex-grow: 1;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px; /* Bordas arredondadas apenas à esquerda */
    font-size: 0.9em;
}

.action-bar .search-form button {
    padding: 8px 12px;
    border: 1px solid #007bff;
    background-color: #007bff;
    color: white;
    border-radius: 0 4px 4px 0; /* Bordas arredondadas apenas à direita */
    cursor: pointer;
    font-size: 0.9em;
}

.action-bar .main-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    flex-grow: 1;
}

.action-bar .btn {
    padding: 8px 12px;
    font-size: 0.85em;
    border-radius: 4px;
    text-decoration: none;
    color: white;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Faz o <select> dentro da action-bar ter a mesma aparência dos botões */
.action-bar select.btn {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: none;
    outline: none;
    font-family: inherit;
    line-height: 1.4;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23fff'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px !important;
}
.action-bar select.btn option { color: #212529; }

/* Cores específicas de variantes de botão */
.btn-success   { background-color: #28a745; color: #fff !important; }
.btn-success:hover { background-color: #218838; }

.btn-info      { background-color: #17a2b8; color: #fff !important; }
.btn-info:hover { background-color: #138496; }

.btn-warning   { background-color: #ffc107; color: #212529 !important; }
.btn-warning:hover { background-color: #e0a800; }

.btn-danger    { background-color: #dc3545; color: #fff !important; }
.btn-danger:hover { background-color: #c82333; }

.btn-secondary { background-color: #6c757d; color: #fff !important; }
.btn-secondary:hover { background-color: #5a6268; }

.btn-back, .btn-outline-secondary {
    background-color: #6c757d; color: #fff !important;
    border: 1px solid #6c757d;
}
.btn-back:hover, .btn-outline-secondary:hover { background-color: #5a6268; }


/* Wrapper para a tabela com rolagem horizontal */
.table-responsive-wrapper {
    overflow-x: auto;
    margin-top: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* Estilos da tabela de membros */
.membros-table {
    width: 100%; /* Garante que a tabela ocupe a largura total do seu wrapper */
    border-collapse: collapse;
    min-width: 1100px; /* Largura mínima para a tabela, forçando a rolagem em telas menores */
    /* Ajuste este valor (1100px) se a tabela ainda transbordar ou ficar muito apertada */
}

.membros-table th,
.membros-table td {
    border: 1px solid #eee;
    padding: 6px 8px; /* Padding reduzido para células mais compactas */
    text-align: left;
    vertical-align: middle;
    font-size: 0.8em; /* Fonte menor para o conteúdo da tabela */
}

.membros-table th {
    background-color: #e9ecef;
    font-weight: bold;
    text-transform: uppercase;
    color: #495057;
}

.membros-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.membros-table tr:hover {
    background-color: #e2e6ea;
}

/* Ajustes específicos para a coluna de 'Ações' */
.membros-table .action-buttons-cell {
    white-space: nowrap; /* Mantém os botões de ação na mesma linha */
    text-align: center;
    min-width: 180px; /* Garante espaço suficiente para 3 botões pequenos */
}

.membros-table .action-buttons-cell .btn {
    margin: 2px; /* Pequena margem entre os botões de ação */
    padding: 3px 6px; /* Padding ainda menor para os botões de ação */
    font-size: 0.7em; /* Fonte ainda menor para os botões de ação */
    border-radius: 3px;
}

/* Estilos para os botões de navegação do rodapé */
.footer-nav {
    display: flex;
    justify-content: space-between;
    padding: 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    margin-top: 20px;
    box-sizing: border-box;
}
.footer-nav .btn {
    padding: 10px 15px;
    font-size: 0.9em;
    border-radius: 5px;
    text-decoration: none;
    color: white;
    cursor: pointer;
}
.footer-nav .btn-back {
    background-color: #6c757d;
}
.footer-nav .btn-admin {
    background-color: #007bff;
}
.footer-nav .btn-logout {
    background-color: #dc3545;
}




/* --- Estilos da Página de Aniversariantes --- */

/* Ajustes para o cabeçalho da página de aniversariantes */
.dashboard-header h1 {
    display: flex;
    align-items: center;
    gap: 10px;
}
.dashboard-header h1 .fas.fa-birthday-cake {
    font-size: 1.2em; /* Tamanho do ícone no título */
    color: #ff69b4;
}

/* Seção de filtros */
.filter-section {
    margin-bottom: 30px;
}

.filter-card {
    background-color: #f8f9fa; /* Fundo mais claro para o card de filtro */
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.filter-card h3 {
    color: #333;
    margin-top: 0;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.filter-card h3 .fas.fa-filter {
    color: #007bff; /* Cor do ícone de filtro */
}

.filter-controls-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 15px; /* Espaço entre o formulário de filtro e o botão "Mês Atual" */
    align-items: flex-end; /* Alinha os itens pela base */
}

.filter-form {
    display: flex;
    gap: 10px; /* Espaço entre o select e o botão de buscar */
    align-items: flex-end;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600; /* Mais destaque para o label */
    color: #555;
    font-size: 0.95em;
}

.filter-group select {
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid #ced4da;
    font-size: 1em;
    cursor: pointer;
    background-color: #fff;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    min-width: 150px; /* Garante que o select não fique muito pequeno */
}
.filter-group select:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.filter-form .btn-filter,
.quick-actions-form .btn-current-month {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none; /* Para garantir que links como botões não tenham sublinhado */
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.filter-form .btn-filter {
    background-color: #007bff; /* Azul primário */
    color: white;
    border: 1px solid #007bff;
}
.filter-form .btn-filter:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-1px);
}

.quick-actions-form .btn-current-month {
    background-color: #6c757d; /* Cinza secundário */
    color: white;
    border: 1px solid #6c757d;
}
.quick-actions-form .btn-current-month:hover {
    background-color: #5a6268;
    border-color: #5a6268;
    transform: translateY(-1px);
}

/* Layout dos cartões de Aniversariantes */
.birthday-table h3 {
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.birthday-table h3 .fas.fa-gift {
    color: #ff69b4; /* Cor do ícone de presente */
}

.birthday-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); /* Cartões maiores, 320px mínimo */
    gap: 25px; /* Espaço entre os cartões */
}

/* ===== REFINO VISUAL 2026 ===== */
:root {
    --brand-900: #0f3d3e;
    --brand-700: #176b6d;
    --brand-500: #1f8f92;
    --ink-900: #16212c;
    --ink-600: #4c5a6a;
    --paper: #f3f5f7;
    --white: #ffffff;
    --ok: #0f9d69;
    --warn: #c98912;
    --danger: #c93f50;
}

html {
    font-size: 15px;
}

body {
    background:
        radial-gradient(1200px 400px at 90% -10%, rgba(31, 143, 146, 0.25), transparent 60%),
        radial-gradient(900px 420px at -10% 110%, rgba(23, 107, 109, 0.20), transparent 60%),
        linear-gradient(145deg, #f7f9fb 0%, #edf2f4 100%) !important;
    color: var(--ink-900);
    line-height: 1.45;
}

h1 { font-size: clamp(1.25rem, 2vw, 1.9rem); }
h2 { font-size: clamp(1.15rem, 1.8vw, 1.6rem); }
h3 { font-size: clamp(1.05rem, 1.5vw, 1.3rem); }
h4 { font-size: 1rem; }

.section-title {
    color: #2b4664;
    border-bottom: 2px solid #e4ebf4;
    padding-bottom: 6px;
    margin: 0 0 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.btn,
.form-control,
.form-select,
table,
.table {
    font-size: 0.92rem;
}

.dashboard,
.container-fluid {
    background: transparent;
}

.header,
.dashboard-header {
    background: linear-gradient(120deg, var(--brand-900) 0%, var(--brand-700) 55%, var(--brand-500) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.card,
.welcome-card,
.form-card,
.instruction-card,
.upload-card,
.format-card,
.download-card,
.users-table,
.filter-card {
    border: 1px solid #e4ebf0;
    box-shadow: 0 14px 32px rgba(23, 36, 49, 0.08);
}

.stat-number {
    color: var(--brand-700);
}

.btn,
.btn-login,
.btn-primary,
.btn-secondary,
.logout-btn,
.back-btn {
    border-radius: 10px;
}

.btn-primary,
.btn-login {
    background: linear-gradient(130deg, var(--brand-700), var(--brand-500));
}

.btn-secondary {
    background: #5e6a77;
}

.logout-btn,
.back-btn {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.logout-btn:hover,
.back-btn:hover {
    background: rgba(255, 255, 255, 0.28);
}

/* btn-back em fundo claro (ex: membros.html) - mantém cinza sólido visível */
.btn.btn-back {
    background-color: #6c757d !important;
    border: 1px solid #6c757d !important;
    color: #fff !important;
}
.btn.btn-back:hover {
    background-color: #5a6268 !important;
    border-color: #5a6268 !important;
}

/* Garante visibilidade de todos os botões coloridos em qualquer fundo */
.btn-success   { background-color: #1a9e5e !important; color: #fff !important; border-color: #1a9e5e !important; }
.btn-danger    { background-color: #c93f50 !important; color: #fff !important; border-color: #c93f50 !important; }
.btn-warning   { background-color: #e0a800 !important; color: #212529 !important; border-color: #e0a800 !important; }
.btn-info      { background-color: #138496 !important; color: #fff !important; border-color: #138496 !important; }
.btn-dark      { background-color: #35566f !important; color: #fff !important; border-color: #35566f !important; }
.btn-secondary { background-color: #6c757d !important; color: #fff !important; border-color: #6c757d !important; }
.btn-outline-primary { background-color: #1f8f92 !important; color: #fff !important; border-color: #1f8f92 !important; }
.btn-outline-dark { background-color: #74808c !important; color: #fff !important; border-color: #74808c !important; }
.btn-outline-secondary { background-color: #6c757d !important; color: #fff !important; border-color: #6c757d !important; }

.congregacao-switcher select {
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border-radius: 10px;
    padding: 8px 12px;
    min-width: 190px;
    font-weight: 600;
}

.congregacao-switcher select option {
    color: var(--ink-900);
}

table th {
    background: #eef5f7;
    color: #213341;
}

table tr:hover {
    background: #f7fafb;
}

.alert-success {
    background: #e9f8f2;
    border-color: #bdebd8;
    color: #0d6a47;
}

.alert-error {
    background: #feeeef;
    border-color: #f7c9cf;
    color: #a02232;
}

.alert-warning {
    background: #fff7e8;
    border-color: #ffdba0;
    color: #8a5d00;
}

@media (max-width: 768px) {
    .congregacao-switcher select {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 1366px) {
    html {
        font-size: 14px;
    }
}

@media (max-width: 1024px) {
    html {
        font-size: 13.5px;
    }
}
    margin-top: 20px;
}

.birthday-card {
    background-color: #fff;
    border-radius: 12px; /* Cantos mais arredondados */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1); /* Sombra mais pronunciada */
    padding: 25px;
    display: flex;
    flex-direction: column; /* Itens empilhados verticalmente */
    gap: 15px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #eee; /* Borda sutil */
}

.birthday-card:hover {
    transform: translateY(-8px); /* Efeito de levantar mais ao passar o mouse */
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15); /* Sombra maior no hover */
}

.birthday-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0; /* Separador sutil */
}

.birthday-icon-small {
    font-size: 1.8em; /* Ícone menor no cabeçalho do cartão */
    color: #ff69b4;
    line-height: 1; /* Alinha o ícone verticalmente */
}

.birthday-card-header h4 {
    margin: 0;
    color: #333;
    font-size: 1.5em; /* Nome maior */
    font-weight: 700; /* Nome mais bold */
}

.birthday-info-details,
.birthday-info-extra {
    display: flex;
    flex-wrap: wrap; /* Permite quebrar linha em telas menores */
    gap: 15px; /* Espaço entre os detalhes */
    font-size: 0.95em;
    color: #666;
}

.birthday-info-details span,
.birthday-info-extra span {
    display: flex;
    align-items: center;
    gap: 8px; /* Espaço entre ícone e texto */
}

.birthday-info-details span i,
.birthday-info-extra span i {
    color: #999;
    font-size: 0.9em;
}

.cargo-badge {
    background-color: #e0f7fa;
    color: #00796b;
    padding: 6px 10px; /* Padding maior */
    border-radius: 20px; /* Mais arredondado */
    font-size: 0.85em;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
/* Cores específicas para cargos (exemplo) */
.cargo-admin { background-color: #fce4ec; color: #ad1457; }
.cargo-pastor { background-color: #e8f5e9; color: #2e7d32; }
.cargo-diácono, .cargo-diacono { background-color: #e3f2fd; color: #1565c0; }
.cargo-presbítero, .cargo-presbitero { background-color: #fff3e0; color: #e65100; }
.cargo-evangelista { background-color: #f3e5f5; color: #6a1b9a; }
.cargo-missionário, .cargo-missionario { background-color: #ffe0b2; color: #ef6c00; }
.cargo-cooperador { background-color: #c8e6c9; color: #388e3c; }


.phone-info {
    font-size: 0.95em;
    color: #555;
    display: flex;
    align-items: center;
    gap: 8px;
}
.phone-info i {
    color: #999;
}

.birthday-actions {
    display: flex;
    flex-direction: row; /* Botões lado a lado */
    flex-wrap: wrap; /* Quebra linha se necessário */
    gap: 10px;
    margin-top: auto; /* Empurra os botões para a parte inferior do cartão */
    padding-top: 15px;
    border-top: 1px solid #f0f0f0; /* Separador sutil */
}

.btn-call, .btn-whatsapp {
    flex: 1; /* Permite que os botões se expandam */
    min-width: 120px; /* Largura mínima para os botões */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.95em;
    font-weight: bold;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.btn-call {
    background-color: #28a745; /* Verde para ligar */
    color: white;
    border: 1px solid #28a745;
}
.btn-call:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-whatsapp {
    background-color: #25d366; /* Verde WhatsApp */
    color: white;
    border: 1px solid #25d366;
}
.btn-whatsapp:hover {
    background-color: #1da851;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-call i, .btn-whatsapp i {
    margin-right: 8px;
    font-size: 1.1em;
}

/* Estilo para quando não há aniversariantes */
.empty-birthday {
    text-align: center;
    padding: 50px; /* Mais padding */
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    margin-top: 30px;
    border: 1px solid #eee;
}

.empty-birthday .empty-icon {
    font-size: 5em; /* Ícone maior */
    color: #ccc;
    margin-bottom: 25px;
}

.empty-birthday h3 {
    color: #555;
    margin-bottom: 15px;
    font-size: 1.8em;
}

.empty-birthday p {
    color: #777;
    font-size: 1.15em;
    line-height: 1.6;
}
.empty-birthday small {
    color: #999;
    font-size: 0.95em;
}
