/* ARQUIVO: css/painel_obreiro.css */

/* --- Layout Geral --- */
body { background-color: #F8FAFC; }

.dashboard-grid { 
    display: grid; 
    grid-template-columns: 1.5fr 1fr; 
    gap: 30px; 
}

/* --- Headers --- */
.admin-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 20px; 
}
.header-actions { 
    display: flex; 
    gap: 10px; 
    align-items: center; 
}

.welcome-card { 
    background: linear-gradient(135deg, var(--primary-blue), #1E40AF); 
    color: white; 
    padding: 25px; 
    border-radius: 12px; 
    margin-bottom: 25px; 
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2); 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

/* --- Inputs e Checkboxes --- */
.input-std { 
    width: 100%; 
    padding: 10px; 
    border: 1px solid #ddd; 
    border-radius: 6px; 
    outline: none; 
    box-sizing: border-box; 
    font-size: 0.9rem;
    font-family: inherit;
}
.input-std:focus { border-color: var(--primary-blue); }

.check-group label { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    padding: 10px; 
    border-bottom: 1px solid #f0f0f0; 
    cursor: pointer; 
    transition: background 0.2s; 
    color: var(--text-main); 
    font-size: 0.9rem; 
}
.check-group label:hover { background: #fafbfc; }
.check-group label:last-child { border: none; }
.check-group input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary-blue); }

/* --- 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;
}

.btn-notice {
    background: #FFFBEB; 
    color: #B45309; 
    border: 1px solid #FCD34D !important;
    margin-right: 10px;
    position: relative;
}
.btn-notice:hover { background: #FEF3C7; }

.btn-danger {
    background: #EF4444; 
    color: white;
    border: 1px solid #EF4444 !important;
}
.btn-danger:hover { background: #DC2626; }

.btn-ausencia {
    width: 100%;
    background: #FEF2F2; 
    color: #DC2626; 
    border-color: #FECACA !important;
}
.btn-ausencia:hover { background: #FEE2E2; }

.badge-count {
    background: #EF4444; color: white; border-radius: 10px;
    padding: 2px 6px; font-size: 0.70rem; font-weight: 800;
    position: absolute; top: -5px; right: -5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* --- Cards e Listas --- */
.card-today { 
    background: var(--bg-card); 
    border-radius: 12px; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); 
    overflow: hidden; 
    border: 1px solid #EFF2F7; 
    margin-bottom: 15px; 
}
.card-today-header { 
    padding: 15px 20px; 
    border-bottom: 1px solid #EFF2F7; 
    font-weight: 600; 
    color: var(--text-main); 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}
.card-past { opacity: 0.6; filter: grayscale(0.8); background-color: #FAFAFA; }

.stats-box { 
    margin-bottom: 25px; 
    padding: 0; 
    overflow: hidden; 
    border-radius: 12px; 
    border: 1px solid #EFF2F7; 
    background: white; 
}

.abs-item {
    display: flex; justify-content: space-between; align-items: center;
    background: #FEF2F2; color: #EF4444; border: 1px solid #FECACA;
    padding: 10px 15px; border-radius: 8px; margin-bottom: 10px; font-size: 0.85rem;
}

.min-tag { 
    display: inline-flex; align-items: center; gap: 8px; 
    padding: 8px 12px; background: #F8FAFC; color: #475569; 
    border-radius: 8px; font-size: 0.85rem; font-weight: 500; 
    border: 1px solid #E2E8F0; margin-bottom: 8px; margin-right: 5px; 
}
.min-tag i { color: var(--primary-blue); }

.clean-state { text-align: center; padding: 30px 20px; color: #10B981; }
.empty-state { text-align: center; padding: 40px; color: #94A3B8; background: white; border-radius: 12px; border: 1px dashed #CBD5E1; }

/* --- Modal Geral --- */
.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 de Avisos (Split Layout) --- */
.modal-content-wide { 
    background: white; width: 95%; max-width: 850px; height: 550px; 
    border-radius: 12px; overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,0.2); 
    display: flex; flex-direction: column; animation: slideUp 0.3s;
}

.modal-header-custom { 
    background: #fff; padding: 15px 25px; border-bottom: 1px solid #E2E8F0; 
    display: flex; justify-content: space-between; align-items: center; height: 60px; box-sizing: border-box;
}

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

/* Sidebar (Esquerda) */
.notice-sidebar { width: 35%; background: #F8FAFC; border-right: 1px solid #E2E8F0; overflow-y: auto; }

.sidebar-item { padding: 15px 20px; border-bottom: 1px solid #E2E8F0; cursor: pointer; transition: 0.2s; }
.sidebar-item:hover { background: #fff; }
.sidebar-item.active { background: #fff; border-left: 4px solid var(--primary-blue); }

.sidebar-date { font-size: 0.75rem; color: #94A3B8; font-weight: 600; text-transform: uppercase; margin-bottom: 4px; display:flex; justify-content:space-between; }
.sidebar-title { font-weight: 700; color: var(--text-main); font-size: 0.85rem; margin-bottom: 2px; }
.sidebar-preview { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Content (Direita) */
.notice-content-area { width: 65%; padding: 30px; overflow-y: auto; background: #fff; }

.detail-title { font-size: 1.2rem; font-weight: 700; color: var(--primary-blue); margin-bottom: 5px; display: flex; align-items: center; gap: 10px; }
.detail-meta { font-size: 0.8rem; color: #94A3B8; margin-bottom: 20px; text-transform: uppercase; letter-spacing: 0.5px; border-bottom:1px solid #eee; padding-bottom:10px; }
.detail-body { font-size: 0.95rem; line-height: 1.6; color: #334155; white-space: pre-wrap; }

/* --- Footer --- */
.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); }

/* --- Animações e Mobile --- */
@keyframes slideUp { from {transform: translateY(20px); opacity: 0;} to {transform: translateY(0); opacity: 1;} }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse-alert { 0% { transform: scale(1); } 50% { transform: scale(1.02); } 100% { transform: scale(1); } }

@media (max-width: 900px) {
    .modal-content-wide { height: 85vh; }
    .modal-body-split { flex-direction: column; }
    .notice-sidebar { width: 100%; height: 40%; border-right: none; border-bottom: 1px solid #E2E8F0; }
    .notice-content-area { width: 100%; height: 60%; }
}

@media (max-width: 768px) { 
    body { padding: 10px; }
    .dashboard-grid { grid-template-columns: 1fr; gap: 20px; } 
    .welcome-card { flex-direction: column; text-align: center; gap: 15px; }
    .header-actions { width: 100%; justify-content: center; }
    /* Botões full width no mobile */
    .btn, .btn-notice, .btn-danger { width: 100% !important; margin-right: 0 !important; margin-bottom: 10px; }
    .main-footer { flex-direction: column; gap: 10px; text-align: center; }
}





/* --- ESTILOS GERAIS DE INPUTS (DATE) --- */
input[type="date"] {
    appearance: none;
    -webkit-appearance: none;
    min-height: 42px;
    background-color: #fff;
    color: #334155;
    font-family: 'Inter', sans-serif;
    position: relative;
    padding: 8px 10px;
    border: 1px solid #CBD5E1;
    border-radius: 6px;
}
input[type="date"]:required:invalid::-webkit-datetime-edit { color: transparent; }
input[type="date"]:required:invalid::before {
    content: attr(placeholder);
    color: #94a3b8;
    margin-right: 5px;
    position: absolute;
    left: 10px;
    pointer-events: none;
}
input[type="date"]:focus::before, input[type="date"]:valid::before { content: ""; display: none; }

/* --- CARD PENDÊNCIAS --- */
.pendencia-header {
    background: #FFFBEB;
    padding: 15px 20px;
    border-bottom: 1px solid #FEF3C7;
    color: #B45309;
    font-weight: 700;
    display: flex; align-items: center; gap: 8px;
    border-radius: 12px 12px 0 0;
}
.pendencia-body {
    padding: 20px;
    background: #fff;
    border-radius: 0 0 12px 12px;
    border: 1px solid #FEF3C7;
    border-top: none;
}
.pendencia-instruction { color: #666; font-size: 0.9rem; margin-bottom: 15px; display: block; }
.pendencias-grid { display: flex; gap: 15px; margin-bottom: 20px; }

.btn-pendencia-card {
    flex: 1;
    background: white;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 20px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
}
.btn-pendencia-card:hover { border-color: #CBD5E1; transform: translateY(-2px); box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.btn-pendencia-card.selected { border-color: #F59E0B; background-color: #FFF7ED; box-shadow: 0 0 0 2px #F59E0B; }

.icon-pendencia { font-size: 1.8rem; margin-bottom: 5px; }
.date-pendencia { font-weight: 700; font-size: 1.1rem; color: #334155; }
.type-pendencia { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; color: #94A3B8; }
.atraso .icon-pendencia { color: #F59E0B; }
.falta .icon-pendencia { color: #EF4444; }

.label-motivo { font-weight: 600; font-size: 0.9rem; color: #64748B; margin-bottom: 8px; display: block; }
.btn-enviar-just {
    background: #F59E0B; color: white; width: 100%;
    border-radius: 50px; font-weight: 700; padding: 12px;
    border: none; cursor: pointer; transition: 0.2s;
}
.btn-enviar-just:hover { background: #D97706; }

/* --- CARD AUSÊNCIAS --- */
.ausencia-header {
    background: #FEF2F2;
    padding: 15px 20px;
    border-bottom: 1px solid #FEE2E2;
    color: #991B1B;
    font-weight: 700;
    display: flex; align-items: center; gap: 8px;
    border-radius: 12px 12px 0 0;
}
.ausencia-body {
    padding: 20px; background: #fff;
    border-radius: 0 0 12px 12px;
    border: 1px solid #FEE2E2; border-top: none;
}
.btn-registrar-aus {
    background: #EF4444; color: white; width: 100%;
    border-radius: 50px; font-weight: 700; padding: 12px;
    border: none; cursor: pointer; transition: 0.2s; margin-top: 15px;
}
.btn-registrar-aus:hover { background: #DC2626; }

.agenda-label { font-size: 0.8rem; font-weight: 700; color: #94A3B8; text-transform: uppercase; margin-top: 20px; margin-bottom: 10px; display: block; }
.lista-ausencias-pink { display: flex; flex-direction: column; gap: 10px; }
.item-ausencia-pink {
    background: #FFF1F2; border: 1px solid #FECDD3; border-radius: 6px;
    padding: 10px 15px; display: flex; align-items: center; justify-content: space-between;
    color: #BE123C; font-weight: 500; font-size: 0.95rem;
}
.item-ausencia-pink i.fa-calendar-alt { margin-right: 8px; color: #F43F5E; }
.actions-ausencia { display: flex; gap: 12px; }
.actions-ausencia a { color: #F43F5E; opacity: 0.8; transition: 0.2s; font-size: 1rem; }
.actions-ausencia a:hover { opacity: 1; transform: scale(1.1); }
.actions-ausencia .edit-icon { color: #0EA5E9; }

.stats-box {
    border-radius: 12px; border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    margin-bottom: 25px; overflow: visible;
}

/* --- MODAL RESPONSIVO AVISOS --- */
.modal-content-wide {
    background: white; border-radius: 12px; overflow: hidden;
    width: 80%; max-width: 900px; height: 80vh; max-height: 700px;
    display: flex; flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.2);
}
.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; }
.notice-sidebar {
    width: 300px; border-right: 1px solid #E2E8F0;
    overflow-y: auto; background: #F8FAFC;
}
.notice-content-area { flex: 1; padding: 20px; overflow-y: auto; }
.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; }

/* --- MODAL DE PERFIL (COM NOVOS AJUSTES DE ÍCONES E SCROLL) --- */
.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 2000;
    align-items: center; justify-content: center;
}

/* Modal fixo em 80% da altura */
.modal-content {
    background: white; width: 90%; max-width: 520px; border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); overflow: hidden;
    max-height: 95vh; display: flex; flex-direction: column;
}

.modal-header-profile {
    background: #F8FAFC; padding: 15px; text-align: center;
    border-bottom: 1px solid #E2E8F0; position: relative; flex-shrink: 0;
}
.close-modal { position: absolute; top: 10px; right: 15px; font-size: 1.5rem; cursor: pointer; color: #94A3B8; }

.profile-pic-container { position: relative; width: 100px; height: 100px; margin: 0 auto 10px; }
.profile-pic-lg {
    width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
    border: 4px solid white; box-shadow: 0 4px 6px rgba(0,0,0,0.1); background: #fff;
}
.camera-btn {
    position: absolute; bottom: 0px; right: 0px;
    background: var(--primary-blue); color: white;
    border-radius: 50%; width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; border: 2px solid white; transition: 0.2s; font-size: 0.9rem;
}
.camera-btn:hover { transform: scale(1.1); background: #1e40af; }

.tag-ministerio {
    display: inline-block; background: #EEF2FF; color: var(--primary-blue);
    padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; margin: 2px;
}

.modal-body-profile {
    padding: 20px; overflow-y: auto; /* Scroll apenas aqui */
}

/* Grid Compacto do Formulário */
.compact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 10px; }
.span-full { grid-column: span 2; }
.input-group { margin-bottom: 5px; }
.input-group label { display: block; margin-bottom: 4px; font-weight: 600; color: #475569; font-size: 0.85rem; }

/* INPUTS COM ÍCONES */
.input-icon-wrapper { position: relative; width: 100%; }
.input-icon-wrapper i {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    color: #94A3B8; font-size: 1rem; pointer-events: none;
}
.input-with-icon {
    width: 100%; padding: 10px 12px 10px 38px; /* Espaço para o ícone */
    border: 1px solid #CBD5E1; border-radius: 8px; box-sizing: border-box;
    font-size: 0.95rem; outline: none; transition: 0.2s;
}
.input-with-icon:focus { border-color: var(--primary-blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }
.input-with-icon.readonly { background: #F1F5F9; color: #64748B; cursor: not-allowed; }

/* MEDIA QUERIES */
@media (max-width: 768px) {
    .modal-content-wide { width: 90%; height: 80vh; max-height: 600px; }
    .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%; padding: 15px; }
}
.action-btn-group {
    display: flex;
    gap: 8px;
}

.btn-icon-modern {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Estilo Confirmar (Verde) */
.btn-check-modern {
    background-color: #F0FDF4; /* Verde muito claro */
    color: #166534;           /* Verde escuro */
    border-color: #BBF7D0;
}
.btn-check-modern:hover {
    background-color: #166534;
    color: white;
    border-color: #166534;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(22, 101, 52, 0.2);
}

/* Estilo Trocar (Laranja) */
.btn-swap-modern {
    background-color: #FFF7ED; /* Laranja muito claro */
    color: #EA580C;           /* Laranja escuro */
    border-color: #FED7AA;
}
.btn-swap-modern:hover {
    background-color: #EA580C;
    color: white;
    border-color: #EA580C;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(234, 88, 12, 0.2);
}
.modal-content-modern {
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
    border: none;
    background: white;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-header-swap {
    background: linear-gradient(135deg, #F59E0B, #D97706); /* Gradiente Laranja (Cor da ação de troca) */
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body-swap {
    padding: 25px;
}

.textarea-modern {
    width: 100%;
    border: 1px solid #CBD5E1;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.95rem;
    resize: vertical;
    outline: none;
    transition: all 0.2s;
    font-family: inherit;
    color: #334155;
    background: #F8FAFC;
}
.textarea-modern:focus {
    border-color: #F59E0B;
    background: white;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.btn-cancel-modern {
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
    color: #64748B;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}
.btn-cancel-modern:hover { background: #E2E8F0; color: #475569; }

.btn-send-modern {
    background: #F59E0B;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
    transition: 0.2s;
    display: flex; align-items: center; gap: 8px;
}
.btn-send-modern:hover { background: #D97706; transform: translateY(-1px); }