/* ====== FUNCIONARIOS - ESTILO COMPACTO + RESPONSIVO ====== */
#funcionarios { padding: 16px; }

/* TITULO */
#funcionarios .titulo {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 12px; padding: 0 0 16px 0; margin-bottom: 16px; flex-wrap: wrap;
}
#funcionarios .titulo h2 {
    display: flex; align-items: center; gap: 10px;
    font-size: 20px; font-weight: 700; color: #2f0375; margin: 0;
}
#funcionarios .titulo h2 i { color: #7163ba; font-size: 20px; }
#funcionarios .subtitulo { font-size: 12px; color: #6b7280; margin: 4px 0 0 30px; }
#funcionarios .header-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* BOTOES COMPACTOS */
.btn-func {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border: none; border-radius: 6px; font-weight: 600; cursor: pointer;
    transition: all 0.2s ease; white-space: nowrap; height: 36px; padding: 0 16px;
    font-size: 13px;
}
.btn-func-primary {
    background-color: #8978df; color: #fff;
    box-shadow: 0 2px 6px rgba(137, 120, 223, 0.25);
}
.btn-func-primary:hover { background-color: #7163ba; transform: translateY(-1px); }
.btn-func-outline {
    background-color: #fff; color: #8978df;
    border: 1px solid #8978df;
}
.btn-func-outline:hover { background-color: #8978df; color: #fff; }

/* CARDS COMPACTOS */
#funcionarios .stats-grid-func {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px; margin-bottom: 18px;
}
#funcionarios .stat-card-func {
    background: #fff; padding: 14px; border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    border: 1px solid #f1f5f9;
    transition: all 0.25s ease;
    display: flex; flex-direction: column; gap: 8px;
    min-height: 140px; max-height: 140px;
}
#funcionarios .stat-card-func:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(137, 120, 223, 0.1);
}
#funcionarios .stat-label-func { 
    font-size: 11px; color: #6b7280; font-weight: 600; 
    text-transform: uppercase; letter-spacing: 0.4px;
}
#funcionarios .stat-value-func { 
    font-size: 26px; font-weight: 700; line-height: 1;
}

/* Cores nos numeros */
#funcionarios .stat-card-func:nth-child(1) .stat-value-func { color: #8978df; }
#funcionarios .stat-card-func:nth-child(2) .stat-value-func { color: #10b981; }
#funcionarios .stat-card-func:nth-child(3) .stat-value-func { color: #f59e0b; }

/* CARD REGIME */
#funcionarios .stat-card-regime { gap: 10px; }
#funcionarios .stat-header {
    display: flex; justify-content: space-between; align-items: center;
}
#funcionarios .stat-header i {
    font-size: 16px; color: #8978df;
    background: #f3f0ff; padding: 6px; border-radius: 6px;
}
#funcionarios .stat-regime-body { display: flex; flex-direction: column; gap: 8px; flex: 1; justify-content: center; }
#funcionarios .regime-item {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 12px; color: #374151; font-weight: 500;
}
#funcionarios .regime-info { display: flex; align-items: center; gap: 6px; }
#funcionarios .regime-qtd { font-weight: 700; font-size: 14px; color: #1e293b; }
#funcionarios .regime-dot { width: 8px; height: 8px; border-radius: 50%; }
#funcionarios .regime-dot.efetivo { background: #10b981; }
#funcionarios .regime-dot.colaborador { background: #f59e0b; }
#funcionarios .regime-bar { width: 100%; height: 5px; background: #f1f5f9; border-radius: 10px; overflow: hidden; }
#funcionarios .regime-progress { height: 100%; border-radius: 10px; transition: width 0.5s ease; }
#funcionarios .regime-progress.efetivo { background: #10b981; }
#funcionarios .regime-progress.colaborador { background: #f59e0b; }

/* CARD COM CHART */
#funcionarios .stat-chart-body {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; flex: 1; min-height: 0;
}
#funcionarios .stat-chart-body .stat-value-func { font-size: 26px; flex-shrink: 0; }
#funcionarios .stat-chart-body canvas {
    flex: 1; max-width: 90px; max-height: 40px;
    width: 90px !important; height: 40px !important;
}

/* TOOLBAR */
#funcionarios .toolbar-func {
    background: #fff; padding: 12px; border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); margin-bottom: 16px;
    display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
}
#funcionarios .search-box-func {
    display: flex; align-items: center; gap: 8px; background: #f3f4f6;
    padding: 0 12px; border-radius: 8px; flex: 1 1 250px; height: 36px;
    border: 1px solid transparent;
}
#funcionarios .search-box-func:focus-within { background: #fff; border-color: #8978df; }
#funcionarios .search-box-func input {
    border: none; background: transparent; outline: none; width: 100%; font-size: 13px;
}
#funcionarios .filters-func { display: flex; flex-wrap: wrap; gap: 8px; }
#funcionarios .filtro-func select {
    border: 1px solid #d1d5db; border-radius: 6px; padding: 6px 8px;
    background: #fff; min-width: 130px; font-size: 12px; height: 36px;
}

/* TABELA */
#funcionarios .table-container-func {
    background: #fff; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); overflow-x: auto;
}
#funcionarios .tabela-funcionarios { width: 100%; border-collapse: collapse; min-width: 800px; }
#funcionarios .tabela-funcionarios thead { background: #f9fafb; border-bottom: 1px solid #e5e7eb; }
#funcionarios .tabela-funcionarios th {
    padding: 10px 12px; text-align: left; font-weight: 600;
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; color: #6b7280;
}
#funcionarios .tabela-funcionarios td { padding: 10px 12px; border-bottom: 1px solid #f3f4f6; font-size: 13px; }
#funcionarios .tabela-funcionarios tbody tr:hover { background: #f9fafb; }
#funcionarios .tabela-funcionarios tbody tr.linha-inativa { opacity: 0.6; }

/* ESTADO VAZIO */
#funcionarios .empty-state-func td { padding: 30px 20px; text-align: center; }
#funcionarios .empty-content-func { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #64748b; }
#funcionarios .empty-content-func i { font-size: 32px; color: #d1d5db; }

/* RODAPE PAGINACAO */
#funcionarios .table-footer-func {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px; background: #fff; border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); margin-top: 14px; font-size: 12px; color: #6b7280; flex-wrap: wrap; gap: 10px;
}
.pagination-func { display: flex; gap: 4px; align-items: center; }
.pagination-func button {
    border: 1px solid #d1d5db; background: #fff; color: #374151;
    padding: 5px 8px; border-radius: 6px; cursor: pointer; font-size: 12px; min-width: 30px;
}
.pagination-func button.active { background: #8978df; color: #fff; border-color: #8978df; }
.pagination-func button:disabled { opacity: 0.5; cursor: not-allowed; }

/* MENU BALÃO AÇÕES */
.actions-menu-func {
    position: absolute; display: none; flex-direction: column;
    background: #fff; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 6px; z-index: 1000; min-width: 160px;
}
.actions-menu-func button {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; border: none; background: none;
    text-align: left; cursor: pointer; border-radius: 6px;
    font-size: 13px; color: #374151;
}
.actions-menu-func button:hover { background: #f3f4f6; }

/* RESPONSIVO */
@media (max-width: 768px){
    #funcionarios .titulo { flex-direction: column; align-items: stretch; }
    #funcionarios .header-actions { width: 100%; }
    #funcionarios .header-actions .btn-func { flex: 1; }
    #funcionarios .stats-grid-func { grid-template-columns: 1fr; }
    #funcionarios .toolbar-func { flex-direction: column; align-items: stretch; }
    #funcionarios .filters-func { width: 100%; }
    #funcionarios .filtro-func { flex: 1 1 100%; }
    #funcionarios .filtro-func select { width: 100%; }
}