* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    font-family: 'Segoe UI', sans-serif; 
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%); 
    min-height: 100vh; 
    padding: 20px;
}

.login-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    max-width: 400px;
    margin: 10vh auto;
    text-align: center;
}

.container { max-width: 1400px; margin: 0 auto; }
.header { 
    background: rgba(255,255,255,0.1); 
    backdrop-filter: blur(10px); 
    border-radius: 20px; 
    padding: 20px; 
    margin-bottom: 20px; 
    text-align: center; 
    color: white;
}

.card { 
    background: white; 
    border-radius: 20px; 
    padding: 25px; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.tabs {
    display: flex;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 5px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    min-width: 120px;
}

.tab.active { background: #3498db; color: white; }
.tab:hover:not(.active) { background: #e9ecef; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.form-group { margin-bottom: 15px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
label { display: block; margin-bottom: 5px; font-weight: 600; }
input, select, textarea { 
    width: 100%; 
    padding: 12px; 
    border: 2px solid #ddd; 
    border-radius: 10px; 
    font-size: 14px; 
}
input:focus, select:focus, textarea:focus { outline: none; border-color: #3498db; }
button { 
    background: linear-gradient(135deg, #3498db, #2980b9); 
    color: white; 
    border: none; 
    padding: 12px 25px; 
    border-radius: 10px; 
    cursor: pointer; 
    font-weight: 600; 
    transition: transform 0.2s; 
}

button:hover { transform: translateY(-2px); }
.hidden { display: none !important; }
.user-info {
    background: rgba(255,255,255,0.9);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.colaborador-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-warning { background: linear-gradient(135deg, #f39c12, #e67e22); }
.btn-danger { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.status { display: inline-block; padding: 4px 8px; border-radius: 20px; font-size: 11px; font-weight: bold; }
.status-presente { background: #d4edda; color: #155724; }
.status-almoco { background: #fff3cd; color: #856404; }
.status-saiu { background: #f8d7da; color: #721c24; }
.status-pendente { background: #fff3cd; color: #856404; }
.status-aprovado { background: #d4edda; color: #155724; }
.status-rejeitado { background: #f8d7da; color: #721c24; }
.solicitacao { background: #f8f9fa; border: 1px solid #dee2e6; padding: 15px; margin-bottom: 15px; border-radius: 8px; }
.comunicado { background: #e7f3ff; border-left: 4px solid #3498db; padding: 15px; margin-bottom: 15px; border-radius: 8px; }
.comunicado.urgente { background: #ffe6e6; border-left-color: #e74c3c; }
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.8); }
.modal-content { background-color: white; margin: 5% auto; padding: 20px; border-radius: 15px; width: 90%; max-width: 600px; max-height: 80vh; overflow-y: auto; }
.loading { text-align: center; padding: 20px; color: #666; }
@media (max-width: 768px) { 
    .tabs { flex-direction: column; } 
    .form-row { grid-template-columns: 1fr; } 
    body { padding: 10px; } 
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Estilos para comunicados direcionados */
.funcionario-checkbox {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid #f1f3f4;
    background: white;
}

.funcionario-checkbox:hover {
    background: #f8f9fa;
    border-color: #dee2e6;
}
.funcionario-checkbox input {
    margin-right: 12px;
    transform: scale(1.2);
}

/* Estilos para upload de arquivo */
.file-upload-area {
border: 2px dashed #3498db;
border-radius: 10px;
padding: 20px;
text-align: center;
cursor: pointer;
transition: all 0.3s;
background: #f8f9fa;
}

.file-upload-area:hover {
    background: #e9ecef;
    border-color: #2980b9;
}
.file-upload-area.drag-over {
    background: #d5e8f7;
    border-color: #2980b9;
}
.file-info {
    margin-top: 10px;
    padding: 10px;
    background: #e8f5e8;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.file-preview {
    max-width: 200px;
    max-height: 200px;
    margin: 10px auto;
    border-radius: 8px;
}
.anexo-link {
    display: inline-block;
    padding: 8px 12px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 10px;
    transition: background 0.3s;
}
.anexo-link:hover {
    background: #2980b9;
}

/* Estilos para radio buttons dos destinatários */
.radio-destinatario:hover {
    border-color: #3498db !important;
    background: #f8f9fa;
}

.radio-destinatario input[type="radio"]:checked + div {
    color: #2c3e50;
}

.radio-destinatario:has(input:checked) {
    border-color: #3498db !important;
    background: #e3f2fd !important;
}

/* Estilos para botões de controle */
button[onclick*="selecionarTodos"]:hover {
    background: #2980b9 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3) !important;
}

button[onclick*="deselecionarTodos"]:hover {
    background: #7f8c8d !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(149, 165, 166, 0.3) !important;
}

/* Responsividade para destinatários */
@media (max-width: 768px) {
    .destinatarios-grid {
        grid-template-columns: 1fr !important;
    }
    .funcionarios-grid {
        grid-template-columns: 1fr !important;
    }
}
.comunicado-direcionado {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
}
.comunicado-direcionado.urgente {
    background: #ffebee;
    border-left-color: #f44336;
}
.comunicado-stats {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #666;
    margin-top: 10px;
}
.modal-comunicados {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
}

/* Estilo para item de destaque */
.aviso-destaque {
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 10px;
    font-size: 14px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

/* Estilo para comunicado MUITO recente (até 2 dias) */
.aviso-recente {
    background: #e6ffed; /* Verde Claro */
    border-left: 4px solid #28a745; /* Verde Escuro */
    animation: pulseBorder 1.5s infinite; /* Efeito de atenção */
}

/* Estilo para comunicado recente (mais de 2 dias) */
.aviso-antigo {
    background: #fff8e1; /* Amarelo Claro */
    border-left: 4px solid #ffc107; /* Amarelo Escuro */
}

@keyframes pulseBorder {
    0% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(40, 167, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}