/* ==========================================================================
   ESTILO GLOBAL MASTER - CATÓLICOS DA ESTRADA MC
   Integração: Home, Painel, Formulários, Modais e Telas de Login.
   ========================================================================== */

/* ==========================================
   1. VARIÁVEIS E CORES BASE
   ========================================== */
:root {
    --dourado: #d4af37;           /* Cor oficial do brasão */
    --preto-secao: rgba(10,10,10,0.95); /* Fundo dos cards com leve transparência */
    --fonte-titulos: 'Cinzel', serif;   /* Fonte medieval para títulos */
    --fonte-base: 'Oswald', sans-serif; /* Fonte moderna para textos longos */
    --borda-padrao: 1px solid #333;     /* Borda discreta para separar elementos */
}

/* ==========================================
   2. RESET E CONFIGURAÇÕES DO BODY
   ========================================== */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

html { scroll-behavior: smooth; }

body { 
    font-family: var(--fonte-base); 
    background: #000 url('../img/fundo1.png') center/cover fixed; 
    color: #f5f5f5; 
    line-height: 1.6;
    padding-top: 0;
}

/* ==========================================
   3. HEADER (CABEÇALHO PÚBLICO)
   ========================================== */
header { 
    background: rgba(0,0,0,0.95); 
    border-bottom: 3px solid var(--dourado); 
    position: sticky; top: 0; z-index: 1000; 
    box-shadow: 0 5px 20px rgba(0,0,0,0.8);
    padding: 10px 0;
}

.container-header {
    max-width: 1200px; margin: 0 auto; padding: 0 20px;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; 
}

.logo-area h1 { 
    font-family: var(--fonte-titulos); color: var(--dourado); 
    font-size: 1rem; text-transform: uppercase; border: none; padding: 0;
}

nav { display: flex; gap: 15px; align-items: center; }
nav a { 
    color: #ccc; text-decoration: none; text-transform: uppercase; 
    font-size: 0.85rem; transition: 0.3s; display: flex; align-items: center; gap: 5px;
}
nav a:hover { color: var(--dourado); }

/* ==========================================
   4. HERO SECTION (BANNER SLIM HOME)
   ========================================== */
.hero-section {
    background: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8)), url('../img/fundo1.png') center/cover;
    padding: 15px 20px; border-bottom: 4px solid var(--dourado);
    display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 20px;
    height: 120px; overflow: hidden;
}

.hero-logo-img { height: 80px; width: auto; filter: drop-shadow(0 0 10px rgba(0,0,0,0.9)); }
.hero-title { font-family: var(--fonte-titulos); font-size: 2rem; color: var(--dourado); margin: 0; line-height: 1.1; }
.hero-subtitle { font-size: 0.95rem; color: #ddd; font-style: italic; }

/* ==========================================
   5. LAYOUTS E CARDS PADRÃO
   ========================================== */
.main-container {
    max-width: 1200px; margin: 30px auto; padding: 0 20px;
    display: grid; grid-template-columns: 2fr 1fr; gap: 30px;
}

.container, .content-card { 
    background: var(--preto-secao); padding: 25px; 
    border: 1px solid #333; border-left: 5px solid var(--dourado); 
    border-radius: 8px; margin-bottom: 30px; box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.card-header { border-bottom: 1px solid #333; padding-bottom: 10px; margin-bottom: 15px; }
.secao-titulo { color: var(--dourado); font-family: var(--fonte-titulos); font-size: 1.3rem; text-transform: uppercase; }

/* ==========================================
   9. TABELAS, EVENTOS E STATUS GERAIS
   ========================================== */
table { 
    width: 100%; 
    border-collapse: collapse; 
    margin-top: 20px; 
    background: #1e1e1e; /* Cinza escuro padrão Regra 6 */
    border-radius: 8px;
    overflow: hidden;
}

th { 
    background: #151515; /* Cabeçalho escuro padrão Regra 6 */
    color: var(--dourado); 
    padding: 15px; 
    text-transform: uppercase; 
    font-size: 0.85rem; 
    font-family: var(--fonte-titulos);
    border-bottom: 2px solid #333;
}

td { 
    padding: 12px; 
    border-bottom: 1px solid #252525; 
    color: #e0e0e0;
}

tr:hover { 
    background: #252525; /* Hover suave padrão Regra 6 */
    transition: 0.3s; 
}

/* Ajuste de Cards para consistência */
.container, .content-card, .container-form {
    background: #1e1e1e !important; /* Cor sólida para legibilidade */
    border: 1px solid #333;
    border-left: 5px solid var(--dourado);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}
.btn-portal:hover, .btn-grande:hover, .btn-acao:hover { transform: scale(1.05); filter: brightness(1.2); }

/* ==========================================
   7. PAINEL DO MEMBRO (DASHBOARD)
   ========================================== */
.welcome-compact {
    background: var(--preto-secao); border-left: 5px solid var(--dourado);
    padding: 15px 25px; border-radius: 8px; margin-bottom: 30px;
    display: flex; justify-content: space-between; align-items: center; box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.dashboard-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin-bottom: 30px;
}

.nav-card {
    background: rgba(20, 20, 20, 0.7); border: 1px solid #333; border-radius: 6px; padding: 15px 10px;
    text-align: center; text-decoration: none; transition: all 0.3s ease;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 100px; position: relative;
}

.nav-card:hover { border-color: var(--dourado); background: rgba(212, 175, 55, 0.1); transform: translateY(-3px); }
.nav-card i { font-size: 1.6rem; margin-bottom: 8px; color: #888; transition: 0.3s; }
.nav-card:hover i { color: var(--dourado); }
.nav-card span { color: #fff; font-family: var(--fonte-base); text-transform: uppercase; font-size: 0.75rem; font-weight: bold; }

.nav-badge { position: absolute; top: 5px; right: 5px; font-size: 0.6rem; padding: 2px 5px; border-radius: 3px; font-weight: bold; }
.pulse-live { background: #e74c3c; color: #fff; animation: pulse-red 2s infinite; }
@keyframes pulse-red { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }

/* ==========================================
   8. FORMULÁRIOS CENTRALIZADOS (Eleição, Cadastro)
   ========================================== */
.wrapper-central {
    display: flex; justify-content: center; align-items: flex-start; 
    min-height: 100vh; width: 100%; padding: 40px 20px;
}

.container-form {
    width: 100%; max-width: 900px; background: var(--preto-secao); padding: 30px;
    border: 1px solid #333; border-radius: 8px; border-left: 5px solid var(--dourado); box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 25px; }
.form-label { display: block; margin-bottom: 8px; color: #ccc; font-size: 0.85rem; text-transform: uppercase; font-weight: bold; }

.form-input {
    width: 100%; padding: 12px; background: #111; border: 1px solid #444; color: #fff;
    border-radius: 4px; font-family: var(--fonte-base); font-size: 1rem; transition: 0.3s;
}
.form-input:focus { border-color: var(--dourado); outline: none; background: #222; }
.form-input[readonly] { background: rgba(20,20,20,0.5); color: var(--dourado); font-weight: bold; cursor: not-allowed; border-style: dashed; }

.input-nota { width: 80px; padding: 8px; background: #111; border: 1px solid #555; color: var(--dourado); text-align: center; font-weight: bold; border-radius: 4px; }
.input-nota:focus { border-color: var(--dourado); outline: none; }

/* ==========================================
   9. TABELAS, EVENTOS E STATUS GERAIS
   ========================================== */
table { width: 100%; border-collapse: collapse; margin-top: 20px; background: #222; }
th { background: var(--dourado); color: #000; padding: 12px; text-transform: uppercase; font-size: 0.8rem; }
td { padding: 12px; border-bottom: 1px solid #333; }

.status-good, .status-pago { color: #2ecc71; font-weight: bold; }    
.status-warn, .status-pendente { color: #f59505; font-weight: bold; } 
.status-bad { color: #ff4444; font-weight: bold; }                   

.event-item { display: flex; gap: 15px; background: #111; padding: 15px; border-radius: 6px; border: var(--borda-padrao); margin-bottom: 15px; transition: 0.3s; }
.event-item:hover { transform: translateX(5px); border-color: var(--dourado); }
.event-date { background: #222; padding: 10px; border-radius: 6px; text-align: center; min-width: 60px; border: 1px solid #444; display: flex; flex-direction: column; justify-content: center; }

/* ==========================================
   10. MODAIS (JANELAS POP-UP DIALOG)
   ========================================== */
dialog {
    background: var(--preto-secao); color: #fff; border: 2px solid var(--dourado); border-radius: 8px; padding: 0;
    width: 95%; max-width: 600px; box-shadow: 0 15px 50px rgba(0,0,0,0.9); overflow: hidden;
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); margin: 0; display: none;
}
dialog[open] { display: flex; flex-direction: column; }
dialog::backdrop { background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(4px); }

.modal-header { background: var(--dourado); color: #000; padding: 12px; font-family: 'Cinzel', serif; font-weight: bold; text-align: center; text-transform: uppercase; font-size: 1rem; }
.modal-body { padding: 20px 30px; max-height: 450px; overflow-y: auto; font-size: 0.95rem; line-height: 1.5; color: #ddd; }
.modal-body::-webkit-scrollbar { width: 6px; }
.modal-body::-webkit-scrollbar-track { background: #111; }
.modal-body::-webkit-scrollbar-thumb { background: var(--dourado); border-radius: 10px; }
.modal-footer { padding: 15px 25px; display: flex; justify-content: space-between; background: rgba(0,0,0,0.5); border-top: 1px solid #333; }

/* ==========================================
   11. RESPONSIVIDADE (MOBILE) E EXTRAS
   ========================================== */
.txt-sede { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; color: #ccc; margin-top: 10px;}

@media (max-width: 900px) {
    .main-container { grid-template-columns: 1fr; }
    .hero-section { height: auto; flex-direction: column; text-align: center; padding: 30px 20px; }
    .hero-title { text-align: center; font-size: 1.8rem; }
    .container-header { flex-direction: column; gap: 15px; }
    nav { flex-wrap: wrap; justify-content: center; }
    .form-grid { grid-template-columns: 1fr; }
    .welcome-compact { flex-direction: column; gap: 15px; text-align: center; }
}
.winner-row { 
    background-color: #f0f0f0 !important;     border-left: 4px solid #000 !important;     print-color-adjust: exact;     -webkit-print-color-adjust: exact; }
    /* ==========================================================================
   12. UTILITÁRIOS DE PADRONIZAÇÃO (substituem os style inline do index.php)
   ========================================================================== */

/* Cores de borda esquerda (cards) */
.bl--dourado { border-left-color: var(--dourado) !important; }
.bl--verde   { border-left-color: #28a745 !important; }
.bl--azul    { border-left-color: #007bff !important; }
.bl--amarelo { border-left-color: #ffc107 !important; }
.bl--vermelho{ border-left-color: #dc3545 !important; }

/* Títulos coloridos */
.t--dourado { color: var(--dourado) !important; }
.t--verde   { color: #28a745 !important; }
.t--azul    { color: #007bff !important; }
.t--amarelo { color: #ffc107 !important; }
.t--vermelho{ color: #dc3545 !important; }
.t--cinza   { color: #888 !important; }
.t--cinza-claro { color: #ccc !important; }
.t--muted   { color: #666 !important; }

/* Tamanhos utilitários */
.fs-75 { font-size: 0.75rem !important; }
.fs-80 { font-size: 0.80rem !important; }
.fs-85 { font-size: 0.85rem !important; }
.fs-90 { font-size: 0.90rem !important; }
.fs-120{ font-size: 1.20rem !important; }
.fs-300{ font-size: 3rem !important; }

/* Layout helpers */
.text-center { text-align: center !important; }
.w-100 { width: 100% !important; }
.mt-10 { margin-top: 10px !important; }
.mb-10 { margin-bottom: 10px !important; }
.mt-0  { margin-top: 0 !important; }
.p-10  { padding: 10px !important; }
.p-8-0 { padding: 8px 0 !important; }
.gap-8 { gap: 8px !important; }
.gap-10{ gap: 10px !important; }

/* Listas limpas */
.list-clean { list-style: none; padding: 0; margin: 0; }

/* Cartões/mini-cards (Comando Oficial, etc.) */
.mini-card {
  background: #111; padding: 10px; border-radius: 6px; text-align: center;
  border: var(--borda-padrao);
}
.mini-card img.avatar {
  width: 50px; height: 50px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--vermelho, #dc3545); margin-bottom: 5px;
}
.mini-card .apelido { display: block; color: #fff; font-size: 0.8rem; font-weight: 700; }
.mini-card .cargo   { font-size: 0.65rem; color: #dc3545; text-transform: uppercase; }

/* Grid do comando */
.grid-comando {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px;
}

/* Itens de lista com divisória */
.list-item {
  border-bottom: var(--borda-padrao); padding: 8px 0;
  display: flex; align-items: center; gap: 8px;
}
.list-item:last-child { border-bottom: none; }

/* Loja (miniaturas) */
.prod-thumb {
  width: 35px; height: 35px; object-fit: cover; border-radius: 4px; border: 1px solid #444;
}
.prod-row {
  margin-bottom: 12px; border-bottom: var(--borda-padrao); padding-bottom: 8px;
  display: flex; justify-content: space-between; align-items: center;
}
.prod-preco { color: #fff; font-weight: 700; }

/* Botões secundários já existentes: .btn, .btn-portal, .btn-acao */

/* Footer */
.footer {
  background: #000; border-top: 2px solid var(--dourado); text-align: center;
  padding: 30px; color: #555; font-size: 0.85rem;
}
/* ==========================================
   COMPONENTES: CARDS PREMIUM (MEMBROS)
   ========================================== */
.membros-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.membro-card {
    background: #141414; /* Cor do Anexo 2 */
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.membro-card:hover {
    transform: translateY(-5px);
    border-color: var(--dourado);
    box-shadow: 0 12px 25px rgba(0,0,0,0.6);
}

.card-top {
    background: linear-gradient(180deg, #1f1f1f 0%, #141414 100%);
    padding: 25px 20px 15px;
    text-align: center;
    position: relative;
}

.card-body { padding: 18px 20px; flex-grow: 1; }

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.info-label { color: #777; font-size: 0.8rem; text-transform: uppercase; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.info-value { color: #e0e0e0; font-size: 0.9rem; font-weight: 500; text-align: right; }

.badge-cargo {
    background: linear-gradient(90deg, #d4af37, #f1c40f);
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    position: absolute;
    top: 12px;
    right: 12px;
}

.card-actions {
    padding: 15px 20px;
    background: #0d0d0d;
    display: flex;
    gap: 12px;
    justify-content: center;
}
/* ==========================================
   AUXILIARES DE LAYOUT (LISTA DE MEMBROS)
   ========================================== */

/* Container de Busca e Filtros */
.control-panel {
    background: rgba(20, 20, 20, 0.9);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #333;
    margin-bottom: 30px;
}

.search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    border-top: 1px solid #222;
    padding-top: 15px;
}

/* Grid de Membros - RESTAURA O TAMANHO DO CARD */
.membros-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* Ajustes Internos do Card */
.nome-apelido { 
    margin: 5px 0; 
    color: #fff; 
    font-size: 1.3rem; 
    font-family: var(--fonte-titulos); 
}

.nome-completo { 
    color: var(--dourado); 
    font-size: 0.85rem; 
    text-transform: uppercase;
    opacity: 0.8;
}

.btn-filter {
    background: transparent;
    border: 1px solid #444;
    color: #aaa;
    padding: 6px 18px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: 0.3s;
}

.btn-filter.active {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--dourado);
    color: var(--dourado);
}
/* ==========================================
   RESTAURAÇÃO DO TOPO E TIPOGRAFIA
   ========================================== */
.page-title h1 {
    font-family: var(--fonte-titulos) !important; /* Cinzel */
    color: var(--dourado) !important;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.page-title span {
    font-family: var(--fonte-base) !important; /* Oswald */
    color: var(--dourado) !important;
    opacity: 0.8;
}

/* Fix para o link 'Voltar ao Painel' */
.btn-back {
    color: #ccc !important;
    text-decoration: none;
    font-family: var(--fonte-base);
    text-transform: uppercase;
    font-size: 0.8rem;
    transition: 0.3s;
}

.btn-back:hover {
    color: var(--dourado) !important;
}

/* ==========================================
   PADRONIZAÇÃO DOS FILTROS (BOTÕES REDONDOS)
   ========================================== */
.filter-btn {
    background: transparent;
    border: 1px solid #444;
    color: #aaa;
    padding: 6px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-family: var(--fonte-base);
    font-size: 0.85rem;
    text-transform: uppercase;
    transition: 0.3s;
}

.filter-btn:hover, .filter-btn.active {
    border-color: var(--dourado);
    color: var(--dourado);
    background: rgba(212, 175, 55, 0.1);
}

/* Botão Buscar do Formulário */
.btn-search {
    background: var(--dourado) !important;
    color: #000 !important;
    border: none;
    padding: 0 20px;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
}
.btn-voltar {
    color: var(--dourado); 
    text-decoration: none; 
    border: 1px solid var(--dourado);
    padding: 8px 18px; 
    border-radius: 6px; 
    transition: 0.3s; 
    font-weight: 600; 
    font-family: 'Oswald', sans-serif; 
    text-transform: uppercase;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-voltar:hover { 
    background: var(--dourado); 
    color: #000; 
}
.membro-row.travado { opacity: 0.6; border-left: 3px solid #e74c3c; }
.membro-row.travado::after { content: '🔒'; position: absolute; right: 10px; color: #e74c3c; }
/* ==========================================
+    CLASSES UTILITÁRIAS DE STATUS (DESIGN SYSTEM)
+    ========================================== */
.badge-success { background: var(--success); color: #000; padding: 4px 8px; border-radius: 4px; font-weight: bold; font-size: 0.85rem; }
.badge-danger { background: var(--danger); color: #fff; padding: 4px 8px; border-radius: 4px; font-weight: bold; font-size: 0.85rem; }


/* CSS ULTRABLINDADO - PRIORIDADE MÁXIMA PARA MOBILE */
@keyframes pulsar-vermelho-financeiro {
    0% { background-color: rgba(231, 76, 60, 0.1) !important; border-color: #e74c3c !important; box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7) !important; }
    50% { background-color: rgba(231, 76, 60, 0.3) !important; border-color: #c0392b !important; box-shadow: 0 0 12px 6px rgba(231, 76, 60, 0.5) !important; }
    100% { background-color: rgba(231, 76, 60, 0.1) !important; border-color: #e74c3c !important; box-shadow: 0 0 0 0 rgba(231, 76, 60, 0) !important; }
}

body .dashboard-grid a.nav-card.btn-pendencia {
    animation: pulsar-vermelho-financeiro 1.5s infinite !important;
    border: 1px solid #e74c3c !important;
    background-color: rgba(231, 76, 60, 0.1) !important;
}
body .dashboard-grid a.nav-card.btn-pendencia i {
    color: #e74c3c !important; 
}

body .dashboard-grid a.nav-card.btn-quitado {
    background-color: rgba(46, 204, 113, 0.1) !important;
    border: 1px solid #2ecc71 !important;
}
body .dashboard-grid a.nav-card.btn-quitado i {
    color: #2ecc71 !important; 
}