/* ARQUIVO: css/painel_ministerio.css */

/* --- Layout e Estatísticas --- */ 
.main-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}
.btn-notice{
    width: 100%;
    justify-content: flex-start; /* Texto à esquerda */
    text-align: left;
    margin: 0 !important;
    border: none;
    background:transparent;
    padding: 10px;
}

.stat-box { 
    flex: 1; 
    background: white; 
    padding: 20px; 
    border-radius: 12px; 
    border: 1px solid #EFF2F7; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.03); 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    min-width: 200px; 
}
.stat-label { 
    display: block; 
    color: var(--text-muted); 
    font-size: 0.75rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
}
.stat-value { 
    font-size: 1.8rem; 
    font-weight: 800; 
    line-height: 1; 
    color: #1E293B; 
}

/* --- Toolbar e Navegação --- */
.toolbar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    background: #fff; 
    padding: 10px 15px; 
    border-radius: 12px; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); 
    margin-bottom: 30px; 
    border: 1px solid #E2E8F0; 
    flex-wrap: wrap; 
    gap: 10px; 
}

.btn-ghost {
    background: white; 
    border: 1px solid #E2E8F0; 
    color: #64748B;
    padding: 0 15px; 
    height: 36px;
    border-radius: 8px; 
    font-weight: 500; 
    font-size: 0.85rem;
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    cursor: pointer; 
    transition: 0.2s;
    white-space: nowrap;
}
.btn-ghost:hover { 
    background: #F8FAFC; 
    color: var(--primary-blue); 
    border-color: var(--primary-blue); 
}

.icon-team { color: #F59E0B; } 
.icon-whats { color: #10B981; } 
.icon-pdf { color: #6366F1; } 
.icon-danger { color: #EF4444; }

.date-selector-box { 
    display: flex; 
    align-items: center; 
    gap: 5px; 
    background: #F8FAFC; 
    padding: 5px 18px; 
    border-radius: 50px; 
    border: 1px solid #E2E8F0; 
}
.date-display { 
    font-weight: 600; 
    color: var(--text-main); 
    min-width: 140px; 
    text-align: center; 
    font-size: 0.9rem; 
}
.btn-nav-small { 
    width: 28px; 
    height: 28px; 
    background: white; 
    border-radius: 6px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: #64748B; 
    box-shadow: 0 1px 2px rgba(0,0,0,0.05); 
    transition: 0.2s; 
}
.btn-nav-small:hover { 
    color: var(--primary-blue); 
    transform: scale(1.05); 
}

/* --- Toggle View (Cards vs Calendar) --- */
.view-toggle { 
    display: flex; 
    background: #F1F5F9; 
    padding: 4px; 
    border-radius: 8px; 
    margin-bottom: 20px; 
    width: fit-content; 
}
.view-btn { 
    padding: 8px 16px; 
    border: none; 
    background: transparent; 
    cursor: pointer; 
    border-radius: 6px; 
    font-weight: 600; 
    color: #64748B; 
    transition: 0.2s; 
    display: flex; 
    align-items: center; 
    gap: 6px; 
}
.view-btn.active { 
    background: white; 
    color: var(--primary-blue); 
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); 
}

/* --- Calendar Container --- */
#calendar-container { 
    display: none; 
    background: white; 
    padding: 20px; 
    border-radius: 12px; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.02); 
    min-height: 500px; 
}
.fc-event { 
    cursor: pointer; 
    border: none; 
    font-size: 0.85rem; 
}
.fc-toolbar-title { 
    font-size: 1.2rem !important; 
}

/* --- Cards de Escala --- */
.semana-header { 
    color: #94A3B8; 
    font-size: 0.75rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    margin: 30px 0 15px 0; 
    border-bottom: 1px solid #F1F5F9; 
    padding-bottom: 5px;
}

.grid-cards { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); 
    gap: 20px; 
    margin-top: 15px; 
}

.card-escala {
    background: white; 
    border: 1px solid #F1F5F9; 
    border-radius: 12px;
    padding: 25px 20px; 
    transition: all 0.2s ease; 
    position: relative;
    border-left: 4px solid transparent;
}
.card-escala:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.06); 
    border-color: #E2E8F0; 
}

.card-date { 
    font-size: 1.3rem; 
    font-weight: 700; 
    color: #1E293B; 
    margin: 0; 
    line-height: 1; 
}
.card-meta { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    margin-top: 6px; 
}
.card-shift { 
    font-size: 0.75rem; 
    font-weight: 600; 
    color: #94A3B8; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
}
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.card-confirm-check {
    margin-left: auto;
    width: 16px;
    height: 16px;
    accent-color: #2563EB;
    cursor: pointer;
}

.clean-list { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
}
.clean-actions { 
    margin-top: 20px; 
    padding-top: 15px; 
    border-top: 1px solid #F8FAFC; 
    display: flex; 
    justify-content: flex-end; 
    gap: 12px; 
}
.action-link { 
    color: #CBD5E1; 
    font-size: 0.9rem; 
    transition: 0.2s; 
}
.action-link:hover { color: var(--primary-blue); }
.action-link.del:hover { color: #EF4444; }

.card-empty {
    background: #FAFBFC; 
    border: 2px dashed #E2E8F0; 
    display: flex; 
    flex-direction: column;
    align-items: center; 
    justify-content: center; 
    min-height: 180px; 
    cursor: pointer; 
    border-radius: 12px; 
    transition: 0.2s;
}
.card-empty:hover { 
    border-color: #CBD5E1; 
    background: #F1F5F9; 
}
.empty-icon { 
    width: 40px; 
    height: 40px; 
    background: white; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: #94A3B8; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); 
    margin-bottom: 10px; 
}

.msg-indisponivel { 
    color: #EF4444; 
    font-style: italic; 
    font-size: 0.9rem; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    padding: 10px 0; 
}

/* --- Modais --- */
.dropdown-content { 
    left: 0 !important; 
    right: auto !important; 
    top: 110% !important; 
    margin-top: 5px; 
}
.dropdown-right { 
    right: 0 !important; 
    left: auto !important; 
}

.modal-overlay { 
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.6); 
    backdrop-filter:blur(2px); 
    align-items: center; 
    justify-content: center; 
    z-index: 2000; 
}

/* Modal Padrão (Escala Manual e Config) */
.modal-content { 
    background: white; 
    padding: 0; 
    border-radius: 16px; 
    width: 90%; 
    max-width: 550px; 
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); 
    border: 1px solid #EFF2F7; 
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
    max-height: 90vh; 
}
.modal-header { 
    padding: 15px 20px; 
    border-bottom: 1px solid #eee; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    flex-shrink: 0; 
}
.modal-body { 
    padding: 20px; 
    overflow-y: auto; 
    flex-grow: 1; 
}
.modal-footer { 
    padding: 15px 20px; 
    border-top: 1px solid #eee; 
    background: #f9fafb; 
    display: flex; 
    justify-content: flex-end; 
    gap: 10px; 
    border-radius: 0 0 12px 12px; 
    flex-shrink: 0; 
}

.member-row-modal { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    margin-bottom: 8px; 
}
.member-row-modal select { 
    flex: 1; 
    font-size: 0.9rem; 
    padding: 8px; 
}

.radio-lider-label { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    font-size: 0.85rem; 
    color: #64748B; 
    cursor: pointer; 
    font-weight: 500; 
    user-select: none; 
    white-space: nowrap; 
}
.radio-lider-label:hover { color: #F59E0B; }
.radio-toggle { 
    accent-color: #F59E0B; 
    width: 16px; 
    height: 16px; 
    cursor: pointer; 
}
.leader-active { 
    color: #F59E0B !important; 
    font-weight: bold; 
}

/* Modal Largo (Avisos) */
.modal-content-wide { 
    background: white; 
    width: 90%; 
    max-width: 900px; 
    border-radius: 12px; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.2); 
    display: flex; 
    flex-direction: column; 
    height: 80vh; 
}

.modal-header-custom { 
    padding: 15px 20px; 
    border-bottom: 1px solid #eee; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    flex-shrink: 0; 
    background: #FAFAFA; 
}

.modal-body-split { 
    display: flex; 
    flex: 1; 
    overflow: hidden; 
}

/* Modal Avisos - Sidebar */
.notice-sidebar { 
    width: 300px; 
    border-right: 1px solid #E2E8F0; 
    overflow-y: auto; 
    background: #F8FAFC; 
}
.btn-new-notice {
    display: block; 
    width: 100%; 
    text-align: left; 
    padding: 15px 20px;
    border: none; 
    background: #fff; 
    border-bottom: 1px solid #E2E8F0;
    color: var(--primary-blue); 
    font-weight: 700; 
    cursor: pointer;
    transition: 0.2s;
}
.btn-new-notice:hover { background: #E0F2FE; }

.sidebar-item { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 15px; 
    border-bottom: 1px solid #F1F5F9; 
    cursor: pointer; 
    transition: 0.2s; 
}
.sidebar-content-wrapper { flex: 1; }
.sidebar-item:hover { background: #E2E8F0; }
.sidebar-item.active { 
    background: #FFF7ED; 
    border-left: 4px solid #F59E0B; 
}
.sidebar-date { 
    font-size: 0.75rem; 
    color: #94A3B8; 
    margin-bottom: 4px; 
}
.sidebar-preview { 
    font-size: 0.9rem; 
    color: #334155; 
    font-weight: 500; 
}
.btn-trash-history { 
    background: none; 
    border: none; 
    color: #CBD5E1; 
    padding: 8px; 
    cursor: pointer; 
    transition: color 0.2s; 
    margin-left: 10px; 
}
.btn-trash-history:hover { color: #EF4444; }

/* Modal Avisos - Conteúdo */
.notice-content-area { 
    flex: 1; 
    padding: 20px; 
    overflow-y: auto; 
}
textarea.input-full {
    flex: 1; 
    resize: none; 
    width: 100%;
    font-family: inherit; 
    line-height: 1.5; 
    padding: 15px; 
    border: 1px solid #E2E8F0; 
    border-radius: 8px; 
    box-sizing: border-box;
}
textarea.input-full:focus { 
    border-color: var(--primary-blue); 
    outline: none; 
}

/* --- Tags e Rodapé --- */
.tag-pill {
    font-size: 0.65rem; 
    padding: 1px 5px; 
    border-radius: 4px;
    color: white; 
    font-weight: 600; 
    margin-left: 5px;
    display: inline-block; 
    vertical-align: middle; 
    opacity: 0.9;
}

.main-footer { 
    margin-top: 50px; 
    padding-top: 20px; 
    border-top: 1px solid #E2E8F0; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    color: #94A3B8; 
    font-size: 0.85rem; 
    margin-bottom: 20px; 
}
.main-footer a { color: #64748B; text-decoration: none; font-weight: 600; transition: 0.2s; }
.main-footer a:hover { color: var(--primary-blue); }

/* --- Mobile Responsividade --- */
@media (max-width: 768px) { 
    .modal-content-wide { 
        width: 90%; 
        height: 80vh; 
    } 
    .modal-body-split { 
        flex-direction: column; 
    } 
    .notice-sidebar { 
        width: 100%; 
        height: 35%; 
        border-right: none; 
        border-bottom: 1px solid #E2E8F0; 
    } 
    .notice-content-area { 
        width: 100%; 
        height: 65%; 
    } 
}

@media (max-width: 900px) {
    .toolbar { flex-direction: column; align-items: stretch; gap: 15px; padding: 15px; }
    .nav-group { display: flex; flex-direction: column; width: 100%; gap: 10px; }
    .toolbar > div:last-child { display: flex; flex-direction: column; width: 100%; gap: 10px; }
    .dropdown, .btn-ghost { width: 100% !important; justify-content: center; display: flex; }
    .date-selector-box { width: 100%; justify-content: space-between; box-sizing: border-box; }
    .main-footer { flex-direction: column; gap: 10px; text-align: center; }
}
.btn-bell-modern {
        background: white;
        border: 1px solid #E2E8F0;
        color: #64748B;
        width: 42px;
        height: 42px;
        border-radius: 10px; /* Borda suave */
        position: relative;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        box-shadow: 0 1px 2px rgba(0,0,0,0.05);
        margin-right: 10px;
    }
    .btn-bell-modern:hover {
        background: #F0F9FF;
        color: #0091E6; /* Azul da marca */
        border-color: #BAE6FD;
        transform: translateY(-1px);
    }
    .badge-pulse {
        position: absolute;
        top: -5px;
        right: -5px;
        background: #EF4444; /* Vermelho alerta */
        color: white;
        font-size: 0.7rem;
        font-weight: 700;
        min-width: 18px;
        height: 18px;
        padding: 0 4px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 2px solid white;
        box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
        animation: pulse-red 2s infinite;
    }
    @keyframes pulse-red {
        0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
        70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
        100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
    }

    /* --- ESTILO DO MODAL DE TROCAS --- */
    .modal-header-modern {
        background: linear-gradient(135deg, #0091E6, #0284C7); /* Gradiente Azul */
        color: white;
        padding: 20px;
        border-radius: 12px 12px 0 0;
        display: flex; justify-content: space-between; align-items: center;
    }
    .request-card {
        background: white;
        border: 1px solid #E2E8F0;
        border-radius: 12px;
        padding: 16px;
        margin-bottom: 12px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.02);
        display: flex;
        flex-direction: column;
        gap: 10px;
        transition: transform 0.2s;
    }
    .request-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
        border-color: #CBD5E1;
    }
    .req-header { display: flex; justify-content: space-between; align-items: flex-start; }
    .req-avatar-area { display: flex; gap: 10px; align-items: center; }
    .req-icon-circle { 
        width: 40px; height: 40px; background: #F1F5F9; color: #64748B; 
        border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
    }
    .req-info h4 { margin: 0; color: #1E293B; font-size: 0.95rem; font-weight: 700; }
    .req-info span { font-size: 0.8rem; color: #64748B; display: flex; align-items: center; gap: 5px; margin-top: 2px;}
    
    .req-reason {
        background: #FFF7ED; /* Laranja bem claro */
        color: #9A3412;
        padding: 10px 12px;
        border-radius: 8px;
        font-size: 0.9rem;
        font-style: italic;
        border-left: 4px solid #F97316;
    }

    .req-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-top: 5px;
    }
    .btn-action {
        border: none;
        padding: 10px;
        border-radius: 8px;
        font-weight: 600;
        font-size: 0.9rem;
        cursor: pointer;
        display: flex; align-items: center; justify-content: center; gap: 8px;
        transition: 0.2s;
    }
    .btn-approve {
        background: #DCFCE7; color: #166534; /* Verde Suave */
    }
    .btn-approve:hover { background: #166534; color: white; }
    
    .btn-refuse {
        background: #FEE2E2; color: #991B1B; /* Vermelho Suave */
    }
    .btn-refuse:hover { background: #991B1B; color: white; }
   
.escala-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.card-escala-midia {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border: 1px solid #E2E8F0;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.card-escala-midia:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

.escala-header-midia {
    background: #0091E6; /* Azul do sistema */
    color: white;
    padding: 12px 15px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.escala-body-midia {
    padding: 15px;
}

.escala-item-midia {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed #E2E8F0;
}

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

.func-icon {
    width: 30px;
    text-align: center;
    color: #0091E6;
    margin-right: 10px;
}

.func-nome {
    font-weight: 600;
    color: #64748B;
    font-size: 0.85rem;
    width: 80px;
}

.obreiro-nome {
    font-weight: bold;
    color: #334155;
    font-size: 0.9rem;
}

.sem-escala {
    background: #F8FAFC;
    border: 1px dashed #CBD5E1;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    color: #94A3B8;
}
/* --- Botões Padronizados --- */
.btn, .btn-notice, .btn-danger, .btn-ausencia, .btn-new-notice {
    height: 42px !important;
    padding: 0 20px !important;
    border-radius: 8px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
    border: 1px solid transparent;
    line-height: 1;
}