/* style.css - Agenda Vicentina Premium */
:root {
    --primary: #1e3a8a;
    --primary-light: #2563eb;
    --accent: #8b5cf6;
    --success: #10b981;
    --warning: #f59f00;
    --danger: #ef4444;
    --bg: #f1f5f9;
    --pink: #ec4899;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { font-family: 'Inter', sans-serif; background: var(--bg); margin: 0; padding: 0; color: #1e293b; }

/* Header */
header {
    position: fixed; top: 0; width: 100%; height: 65px;
    background: var(--primary); color: white;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); z-index: 1000;
    padding-left: 10px;
    padding-right: 10px;
}
.header-content { 
    width: 98%; 
    max-width: 800px; 
    display: grid;
    /* Coluna 1: Título | Coluna 2: Ícone (Fixa) | Coluna 3: Usuário */
    grid-template-columns: 1fr 40px 1fr; 
    align-items: center; 
    gap: 5px;
}

/* Garante que o nome do usuário não quebre o layout */
.user-info {
    text-align: right;
    line-height: 1.2;
    overflow: hidden;
}

/* Estilo do botão 'i' para ficar perfeitamente circular e centralizado */
.info-btn {
    background: rgba(255,255,255,0.2); 
    border: none; 
    color: white; 
    border-radius: 50%; 
    width: 32px; 
    height: 32px; 
    cursor: pointer; 
    font-weight: 900; 
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto; /* Centraliza na coluna do meio */
}

/* Layout Principal */
.main-content { padding: 80px 10px 30px 10px; }
.container { width: 100%; max-width: 480px; margin: 0 auto; transition: max-width 0.3s; }

/* Admin Body Specific */
.admin-body .container { max-width: 800px; }

/* Cards Index */
.card-wrapper { margin-bottom: 14px; }

.card {
    background: white;
    border-radius: 16px;
    padding: 16px 16px 0 16px;
    display: flex;
    flex-direction: column;
    border: 1px solid #e8eaf0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.card-vigente { background: #fdfbff; border-color: #c7d2fe; }

/* Linha superior: data + divisor + título + check */
.card-top-row {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 0;
}

.date-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding-right: 14px;
    text-align: center;
    flex-shrink: 0;
}
.date-day {
    display: block;
    font-size: 1.8rem;
    font-weight: 900;
    line-height: 1;
    color: #1e3a8a;
}

/* Divisor vertical amarelo/dourado */
.date-divider {
    width: 3px;
    height: 44px;
    background: #f59f00;
    border-radius: 2px;
    margin-right: 14px;
    flex-shrink: 0;
}

.header-card {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}
.title {
    font-weight: 800;
    font-size: 0.95rem;
    color: #1e3a8a;
    margin: 0;
    flex: 1;
    line-height: 1.3;
}
.img-vigente { width: 40px; height: auto; flex-shrink: 0; object-fit: contain; }

/* Área de descrição */
.info-area {
    width: 100%;
    margin-top: 12px;
    padding: 10px 0 14px 0;
}

.desc {
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.6;
}

/* Checkbox */
.check-container-top { flex-shrink: 0; margin-left: 10px; }
.check-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1.5px solid #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1rem;
    background: white;
    color: transparent;
    transition: 0.2s;
}
.card.done .check-btn {
    background: #6366f1;
    border-color: #6366f1;
    color: white;
}
.card.done { background: #f5f3ff; }

/* Mural e Details */
.news-box {
    background: #4507d100;
    border: 2px solid #1e3a8a;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    color: #024a61;
    font-size: 0.9rem;
}
details { background: white; border-radius: 12px; margin-bottom: 20px; border: 1px solid #fce7f3; overflow: hidden; }
summary {padding: 15px;color: #1e3a8a;font-weight: 700;cursor: pointer;}

/* --- SISTEMA DE ABAS (ADMIN) --- */
.tabs-nav {
    display: flex; gap: 8px; margin-bottom: 20px;
    padding-bottom: 10px; border-bottom: 2px solid #e2e8f0;
    overflow-x: auto; scrollbar-width: none;
}
.tabs-nav::-webkit-scrollbar { display: none; }

.tab-btn {
    flex: 1; min-width: 120px; padding: 12px 10px; border: none;
    background: #e2e8f0; color: #64748b; border-radius: 10px;
    font-weight: 800; font-size: 0.75rem; cursor: pointer; transition: 0.3s;
}
.tab-btn.active { background: var(--primary); color: white; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

.tab-content { display: none; width: 100%; animation: fadeIn 0.3s ease-in; }
.tab-content.active { display: block; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* Admin Forms */
.admin-box { background: white; padding: 20px; border-radius: 12px; margin-bottom: 20px; border: 1px solid #e2e8f0; width: 100%; }
input, textarea, select { width: 100%; padding: 12px; margin-bottom: 10px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 16px; background: #fff; }
.btn-adm { width: 100%; padding: 14px; border-radius: 10px; border: none; color: white; font-weight: bold; cursor: pointer; text-transform: uppercase; }
.btn-ev { background: var(--success); }
.btn-mu { background: var(--warning); }

/* Listas Admin */
.admin-list { margin-top: 15px; display: flex; flex-direction: column; gap: 8px; }
.admin-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px; background: #f8fafc; border-radius: 8px; border: 1px solid #edf2f7;
}
.admin-item .info { font-size: 0.9rem; color: #1e293b; flex: 1; }
.tag-date { background: #e2e8f0; color: #475569; padding: 2px 6px; border-radius: 4px; font-weight: 800; font-size: 0.75rem; margin-right: 8px; }
.tag-intervalo {margin-left: -2px;font-weight: 800;color: var(--accent);font-size: 0.82rem;margin-bottom: 5px;}

.actions { display: flex; gap: 12px; margin-left: 15px; }
.actions a { text-decoration: none; font-weight: 800; font-size: 0.7rem; padding: 5px 10px; border-radius: 6px; }
.btn-alt { background: #dbeafe; color: #1e40af; }
.btn-del { background: #fee2e2; color: #b91c1c; }

/* Mobile Adjustments */
@media (max-width: 480px) {
    .date-box {min-width: 0px;padding-right: 10px;margin-right: 8px;}
    .date-day { font-size: 1.1rem; }
    .img-vigente { width: 35px; }
    .tab-btn { min-width: 100px; padding: 10px 5px; font-size: 0.65rem; }
}

/* --- MODAL UI --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none; /* Escondido por padrão */
    align-items: center; justify-content: center;
    z-index: 2000; padding: 20px;
}

.modal-card {
    background: white; width: 100%; max-width: 400px;
    border-radius: 15px; padding: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    animation: fadeIn 0.2s ease-out;
}

.modal-item {
    margin-bottom: 12px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.modal-item strong { display: block; font-size: 0.85rem; color: var(--primary); }
.modal-item p { margin: 3px 0 0; font-size: 0.8rem; color: #64748b; }

.modal-item {
    margin-bottom: 10px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 10px;
    border-left: 4px solid var(--primary);
    line-height: 1.4;
}

/* (estilos movidos para a seção Cards Index acima) */

.desc {
    font-size: 0.85rem;
    line-height: 1.6;
    color: #475569;
}

/* Marcador de lista personalizado */
.list-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: var(--accent); /* Cor roxa/azul que já usamos */
    border-radius: 50%; /* Faz ficar redondo */
    margin-right: 8px;
    margin-bottom: 2px;
    vertical-align: middle;
    box-shadow: 0 0 5px rgba(139, 92, 246, 0.4); /* Brilho sutil */
}

/* Ajuste na descrição para alinhar o texto quando quebrar */
.desc {
    font-size: 0.85rem;
    line-height: 1.6;
    color: #475569;
    text-align: left;
}





/* Container de Notícias */
.noticias-container {
    background: white;
    border: 1px solid #e2e8f0;
    border-left: 36px solid #1e3a8a; /* Azul do Conselho Central */
    border-radius: 12px;
    margin-bottom: 20px;
}

.noticias-container summary {
    padding: 15px;
    color: var(--primary);
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    list-style: none;
}

/* O contador redondo (Badge) */
.badge-noticias {
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 900;
}

.noticia-item {
    padding: 15px;
    border-top: 1px solid #f1f5f9;
}

.noticia-item:last-child {
    border-bottom: none;
}

.noticias-content {
    animation: fadeIn 0.3s ease-out;
}

/* Badge de Aniversariantes */
.badge-niver {
    background: var(--pink); /* A cor rosa que você já usa */
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 900;
    box-shadow: 0 2px 5px rgba(236, 72, 153, 0.3);
}

/* Container de Aniversariantes para alinhar com o de Notícias */
.aniversariantes-container {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
}

.aniversariantes-container summary {
    padding: 15px;
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    list-style: none;
}

    /* Ajuste para o editor combinar com seu layout */
    .ql-container {
        border-bottom-left-radius: 8px;
        border-bottom-right-radius: 8px;
        background: white;
        font-family: 'Inter', sans-serif;
    }
    .ql-toolbar {
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;
        background: #f8fafc;
    }
    .editor-wrapper { margin-bottom: 15px; }
    
    /* Estilizando as listas que vêm do Quill (ul e li) */
.desc ul {
    list-style: none; /* Remove a bolinha preta padrão */
    padding-left: 25px; /* Espaço para o novo marcador */
    margin: 10px 0;
}

.desc li {
    position: relative;
    margin-bottom: 8px;
    line-height: 1.5;
    color: #475569;
}

/* Criando o marcador estilizado (list-dot) via Pseudo-elemento */
.desc li::before {
    content: '';
    position: absolute;
    left: -20px; /* Posiciona na esquerda do texto */
    top: 7px;    /* Ajusta a altura conforme a linha */
    width: 7px;
    height: 7px;
    background-color: var(--accent); /* A cor roxa/azul */
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(139, 92, 246, 0.5); /* Efeito de brilho */
}





/* Card de Atividade Estilizado */
.ev-card {
    background: #fff;
    border-radius: 12px;
    padding: 15px 18px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border-left: 5px solid var(--primary); /* A faixa colorida lateral */
    transition: transform 0.2s;
}

.ev-card:hover {
    transform: translateY(-2px);
}

/* Ícone de Calendário */
.ev-icon {
    background: #eff6ff; /* Azul bem clarinho */
    color: var(--primary);
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Conteúdo do Texto */
.ev-info {
    flex-grow: 1;
}

.ev-info strong {
    display: block;
    color: #1e293b;
    font-size: 1rem;
    margin-bottom: 3px;
}

.ev-info span {
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Bolinha de status ou data */
.ev-date-badge {
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
}


/* Remove o recuo padrão que causa o buraco branco à esquerda */
.desc ul { 
    list-style: none !important; 
    padding: 0 !important; 
    margin: 4px 0 !important; 
}

.desc li { 
    position: relative !important; 
    padding-left: 20px !important;
    margin-bottom: 6px !important; 
    line-height: 1.5 !important;
    text-align: left !important;
    font-size: 0.88rem;
    color: #475569;
}

.desc li::before {
    content: '' !important; 
    position: absolute !important; 
    left: 0 !important; 
    top: 6px !important;
    width: 8px; 
    height: 8px; 
    background-color: #8b5cf6;
    border-radius: 50%; 
}


#splash {
    position: fixed;
    inset: 0;
    background: #1e3a8a;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s ease;
}
#splash.hide {
    opacity: 0;
    pointer-events: none;
}
.splash-ring-wrapper {
    position: relative;
    width: 130px;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
}
#splash-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 50%;
}
.splash-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.15);
    border-top-color: #f59f00;
    border-right-color: #f59f00;
    animation: spinRing 1.2s linear infinite;
}
@keyframes spinRing {
    to { transform: rotate(360deg); }
}