/* =================================================================
   ARQUIVO DE ESTILOS GLOBAIS
   ================================================================= */

/* Importa a fonte 'Poppins' do Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* Define as variáveis CSS globais para TEMA CLARO */
:root, [data-bs-theme="light"] {
    --bs-primary: #00b8d4;
    --bs-primary-rgb: 0, 184, 212;
    --bs-body-bg: #cfe5fc;
    --bs-body-color: #212529;
    --bs-tertiary-bg: #ffffff;
    --bs-border-color: #c7c7c7;
    --bs-font-sans-serif: 'Poppins', sans-serif;
}

/* TEMA ESCURO */
[data-bs-theme="dark"] {
    --bs-primary: #00b8d4;
    --bs-primary-rgb: 0, 184, 212;
    --bs-body-bg: #1a202c;
    --bs-body-color: #e9ecef;
    --bs-tertiary-bg: #283040;
    --bs-border-color: #404a5a;
}

/* LAYOUT DE BASE */
body {
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    font-family: var(--bs-font-sans-serif);
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 59px;
    padding-bottom: 5px;
}

body.has-submenu {
    padding-top: 20px !important;
}

#main-content {
    flex-grow: 1;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

/* COMPONENTES GLOBAIS */
#global-header {
    background-color: var(--bs-primary);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#global-header .navbar {
    background-color: transparent !important;
    box-shadow: none;
}

#global-footer {
    background-color: var(--bs-primary);
    color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
    font-size: 0.85rem;
    padding: 1rem 0;
    margin-top: 0;
}

#global-footer a {
    color: #ffffff;
    font-weight: 500;
    text-decoration: none;
}

#global-footer a:hover {
    text-decoration: underline;
}

.card {
    background-color: var(--bs-tertiary-bg);
    border-color: var(--bs-border-color);
}

.subnav {
    background-color: var(--bs-tertiary-bg);
    border-bottom: 1px solid var(--bs-border-color);
    margin-bottom: 1.5rem;
    padding: 0.5rem 0;
}

.dropdown:hover .dropdown-menu {
    display: block;
    margin-top: 0;
}

/* COMPONENTES DE PÁGINA */
.content-box {
    padding: 30px;
    background-color: var(--bs-tertiary-bg);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.confirmation-box {
    padding: 30px;
    background-color: var(--bs-tertiary-bg);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 600px;
    margin: auto;
}

.confirmation-box h2 {
    color: #c0392b;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--bs-border-color);
    padding-bottom: 15px;
}

.confirmation-box p {
    font-size: 1.1rem;
    color: var(--bs-body-color);
    margin-bottom: 30px;
    line-height: 1.6;
}

.confirmation-box p strong {
    color: var(--bs-body-color);
    font-weight: 600;
}

.confirmation-box .painel {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 30px;
}

.confirmation-box form {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

/* PADRÕES DE PÁGINA */
.body-login #global-header,
.body-login #global-footer {
    display: none;
}

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* ESTILOS DE IMPRESSÃO */
@media print {
    #global-header,
    #global-footer,
    .no-print {
        display: none !important;
    }

    .print-mode #main-content > *:not(.printable-section) {
        display: none;
    }
    .print-mode .printable-section {
        display: block !important;
        width: 100%; margin: 0; padding: 0;
    }
}

/* ANIMAÇÕES GLOBAIS */
@keyframes pulse-red {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

.btn-notify-pulsing {
    animation: pulse-red 2s infinite;
}

@keyframes blink-red-icon {
    50% {
        color: #dc3545;
        transform: scale(1.2);
    }
}

.sortable-ghost {
    opacity: 0.4;
    background-color: #c8ebfb;
}

/* * Estilo para o ponto vermelho da notificação em tempo real.
 * Isso se aplica a QUALQUER elemento que tenha o indicador,
 * mas o elemento PAI precisa ser 'position: relative'.
*/
/* O elemento pai (o link do sino) já é 'position-relative' no seu HTML */
/* #header-notification-bell {
    position: relative; 
} */

.notification-indicator {
    position: absolute;
    top: 2px;  /* Ajuste para descer/subir */
    right: 0px; /* Ajuste para esquerda/direita */
    
    width: 10px;
    height: 10px;
    
    background-color: #dc3545; /* Vermelho do Bootstrap (danger) */
    border-radius: 50%;
    border: 2px solid white; /* Borda branca para destacar do ícone */
    
    /* Garante que ele comece escondido */
    display: none; 
}

/* Estilos para os cards dos gráficos  DEPARTAMENTO PESSOAL*/
.card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
}

/* Melhorar a legibilidade dos gráficos */
.chart-container {
    position: relative;
    height: 250px;
    width: 100%;
}

/* Animações suaves */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Responsividade para gráficos */
@media (max-width: 768px) {
    .card-body canvas {
        max-height: 200px !important;
    }
}
