/* ============================================================
   EMPREITEIROS.CSS - Estilo completo do módulo Empreiteiros
   Seguindo o padrão do sistema CF Obras (apartamentos.css)
   ============================================================ */

:root {
  --primary: #667eea;
  --secondary: #764ba2;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #fbbf24;
  --info: #3b82f6;
  --bg-color: #f9fafb;
  --text-main: #1f2937;
  --border-color: #e5e7eb;
}

/* ============================================================
   CABEÇALHO LOCAL
   ============================================================ */

#empreiteiros-header {
  padding: 20px 30px;
  background: #f5f7fa;
  border-bottom: 1px solid #ddd;
}

.titulo-modulo {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 15px;
  color: #2c3e50;
}

/* ============================================================
   SUBMENU TOP
   ============================================================ */

#submenu-empreiteiros {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.sub-btn {
  background: #e6e9ef;
  border: none;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  color: #2c3e50;
  transition: 0.2s;
}

.sub-btn:hover {
  background: #d5d9e3;
}

.sub-btn.active {
  background: #667eea;
  color: #fff;
}

.sub-btn[style*="display: none"] {
  display: none !important;
}

/* ============================================================
   SEÇÕES PRINCIPAIS
   ============================================================ */

.secao-empreiteiros {
  padding: 25px 35px;
  display: none;
  background: #f9fafb;
}

.secao-empreiteiros.active {
  display: block;
}

/* ============================================================
   CARDS
   ============================================================ */

.card-empreiteiros {
  background: #fff;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 20px;
}

.card-empreiteiros h3 {
  font-size: 22px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-empreiteiros h4 {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 15px;
  margin-top: 25px;
}

.info-text {
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ============================================================
   FILTROS
   ============================================================ */

.filtros-metas,
.filtros-medicoes,
.filtros-efetivo {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.inp-filtro {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  min-width: 200px;
  cursor: pointer;
  transition: 0.2s;
  font-family: inherit;
}

.inp-filtro:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ============================================================
   ESTATÍSTICAS
   ============================================================ */

.estatisticas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}

.stat-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  transition: 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.stat-card h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 8px 0;
  opacity: 0.9;
  color: #fff;
}

.stat-card .stat-value {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 5px;
}

.stat-card .stat-label {
  font-size: 12px;
  opacity: 0.8;
}

.stat-card.warning {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.stat-card.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.stat-card.danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.stat-card.info {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

/* ============================================================
   FORMULÁRIOS
   ============================================================ */

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.form-field {
  display: flex;
  flex-direction: column;
}

.form-field-full {
  grid-column: 1 / -1;
}

.form-field label {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.form-field input,
.form-field select,
.form-field textarea {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  transition: 0.2s;
  font-family: inherit;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-field textarea {
  resize: vertical;
  min-height: 80px;
}

/* ============================================================
   BOTÕES
   ============================================================ */

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.btn-salvar,
.btn-cancelar {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.btn-salvar {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

.btn-salvar:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-cancelar {
  background: #e5e7eb;
  color: #374151;
}

.btn-cancelar:hover {
  background: #d1d5db;
}

.btn-acao {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.btn-primary {
  background: #3b82f6;
  color: #fff;
}

.btn-primary:hover {
  background: #2563eb;
}

.btn-success {
  background: #10b981;
  color: #fff;
}

.btn-success:hover {
  background: #059669;
}

.btn-warning {
  background: #fbbf24;
  color: #78350f;
}

.btn-warning:hover {
  background: #f59e0b;
}

.btn-danger {
  background: #ef4444;
  color: #fff;
}

.btn-danger:hover {
  background: #dc2626;
}

/* ============================================================
   MENSAGENS DE STATUS
   ============================================================ */

.status-msg {
  margin-top: 15px;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  display: none;
}

.status-msg.show {
  display: block;
}

.status-msg.success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #10b981;
}

.status-msg.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #ef4444;
}

.status-msg.warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fbbf24;
}

.status-msg.info {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #3b82f6;
}

/* ============================================================
   LISTA DE METAS
   ============================================================ */

.lista-metas {
  display: grid;
  gap: 15px;
  margin-top: 20px;
}

.meta-card {
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px;
  transition: all 0.2s;
  position: relative;
}

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

.meta-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}

.meta-titulo {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
}

.meta-local {
  font-size: 13px;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 5px;
}

.meta-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 15px;
}

.meta-info-item {
  display: flex;
  flex-direction: column;
}

.meta-info-label {
  font-size: 11px;
  color: #6b7280;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.meta-info-value {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}

.meta-progresso {
  margin-top: 15px;
}

.meta-progresso-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 6px;
}

.meta-progresso-bar {
  width: 100%;
  height: 10px;
  background: #e5e7eb;
  border-radius: 5px;
  overflow: hidden;
}

.meta-progresso-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  border-radius: 5px;
  transition: width 0.3s;
}

.meta-progresso-fill.warning {
  background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
}

.meta-progresso-fill.danger {
  background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

/* ============================================================
   LISTA DE MEDIÇÕES
   ============================================================ */

.lista-medicoes {
  display: grid;
  gap: 15px;
  margin-top: 20px;
}

.medicao-card {
  background: #fff;
  border: 2px solid #e5e7eb;
  border-left: 6px solid;
  border-radius: 10px;
  padding: 20px;
  transition: all 0.2s;
}

.medicao-card.pendente {
  border-left-color: #fbbf24;
}

.medicao-card.aprovado {
  border-left-color: #10b981;
}

.medicao-card.aprovado_ressalva {
  border-left-color: #f59e0b;
}

.medicao-card.reprovado {
  border-left-color: #ef4444;
}

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

.medicao-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}

.medicao-titulo {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
}

.medicao-local {
  font-size: 13px;
  color: #6b7280;
}

.medicao-status {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.medicao-status.pendente {
  background: #fef3c7;
  color: #92400e;
}

.medicao-status.aprovado {
  background: #d1fae5;
  color: #065f46;
}

.medicao-status.aprovado_ressalva {
  background: #fed7aa;
  color: #7c2d12;
}

.medicao-status.reprovado {
  background: #fee2e2;
  color: #991b1b;
}

.medicao-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 15px;
}

.medicao-info-item {
  display: flex;
  flex-direction: column;
}

.medicao-info-label {
  font-size: 11px;
  color: #6b7280;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.medicao-info-value {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
}

.medicao-observacoes {
  background: #f9fafb;
  border-left: 3px solid #667eea;
  padding: 12px;
  border-radius: 6px;
  margin-top: 15px;
}

.medicao-observacoes-label {
  font-size: 12px;
  font-weight: 700;
  color: #4b5563;
  margin-bottom: 6px;
}

.medicao-observacoes-text {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
}

.medicao-acoes {
  display: flex;
  gap: 8px;
  margin-top: 15px;
  flex-wrap: wrap;
}

/* ============================================================
   SUBMENU DE SERVIÇOS INTERNO
   ============================================================ */

.submenu-servicos-interno {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e5e7eb;
}

.sub-btn-interno {
  background: #f3f4f6;
  border: none;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  color: #4b5563;
  transition: 0.2s;
}

.sub-btn-interno:hover {
  background: #e5e7eb;
}

.sub-btn-interno.active {
  background: #667eea;
  color: #fff;
}

/* ============================================================
   ABAS DE SERVIÇOS
   ============================================================ */

.aba-servicos {
  display: none;
}

.aba-servicos.active {
  display: block;
}

.form-iniciar-servico {
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
}

.form-iniciar-servico h4 {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 20px 0;
}

/* ============================================================
   LISTA DE SERVIÇOS
   ============================================================ */

.lista-servicos-andamento,
.lista-servicos-concluir,
.lista-servicos-corrigir {
  margin-top: 25px;
}

.servico-item {
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 12px;
  transition: all 0.2s;
}

.servico-item:hover {
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.servico-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.servico-titulo {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
}

.servico-local {
  font-size: 13px;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 5px;
}

.servico-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.servico-info-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #6b7280;
}

.servico-info-item strong {
  color: #111827;
  font-weight: 600;
}

.servico-acoes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge-status {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
}

.badge-status.andamento {
  background: #dbeafe;
  color: #1e40af;
}

.badge-status.pronto {
  background: #d1fae5;
  color: #065f46;
}

.badge-status.correcao {
  background: #fed7aa;
  color: #7c2d12;
}

/* ============================================================
   EFETIVO
   ============================================================ */

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

.funcionario-card {
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 18px;
  transition: all 0.2s;
  position: relative;
}

.funcionario-card.inativo {
  opacity: 0.6;
  background: #f9fafb;
}

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

.funcionario-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.funcionario-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  flex-shrink: 0;
}

.funcionario-dados {
  flex: 1;
}

.funcionario-nome {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 2px;
}

.funcionario-funcao {
  font-size: 12px;
  color: #6b7280;
  font-weight: 600;
}

.funcionario-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.funcionario-info-item {
  font-size: 13px;
  color: #4b5563;
  display: flex;
  align-items: center;
  gap: 6px;
}

.funcionario-info-item strong {
  color: #111827;
  min-width: 60px;
}

.funcionario-alocacao {
  background: #f0f9ff;
  border-left: 3px solid #3b82f6;
  padding: 10px;
  border-radius: 6px;
  margin-top: 12px;
  font-size: 13px;
  color: #1e40af;
}

/* ============================================================
   CONTROLE DE PRESENÇA
   ============================================================ */

.form-presenca {
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
}

.info-funcionario {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: #fff;
  border-radius: 10px;
  margin-bottom: 20px;
  border: 2px solid #e5e7eb;
}

.avatar-funcionario {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: #fff;
  flex-shrink: 0;
}

.dados-funcionario h4 {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 4px 0;
}

.dados-funcionario p {
  font-size: 13px;
  color: #6b7280;
  margin: 2px 0;
}

.historico-presenca {
  margin-top: 30px;
}

.historico-presenca h4 {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 15px;
}

.lista-presencas {
  display: grid;
  gap: 12px;
}

.presenca-item {
  background: #fff;
  border: 2px solid #e5e7eb;
  border-left: 4px solid #10b981;
  border-radius: 8px;
  padding: 15px;
  transition: all 0.2s;
}

.presenca-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.presenca-data {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
}

.presenca-detalhes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
  font-size: 13px;
  color: #6b7280;
}

.presenca-detalhes div {
  display: flex;
  align-items: center;
  gap: 5px;
}

.presenca-detalhes strong {
  color: #111827;
}

/* ============================================================
   MODAIS
   ============================================================ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 2px solid #e5e7eb;
}

.modal-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.btn-fechar-modal {
  background: none;
  border: none;
  font-size: 28px;
  color: #6b7280;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: 0.2s;
}

.btn-fechar-modal:hover {
  background: #f3f4f6;
  color: #111827;
}

.modal-body {
  padding: 25px;
}

.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 20px 25px;
  border-top: 2px solid #e5e7eb;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #9ca3af;
}

.empty-state svg {
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-state h4 {
  font-size: 18px;
  color: #6b7280;
  margin: 0 0 8px 0;
}

.empty-state p {
  font-size: 14px;
  color: #9ca3af;
  margin: 0;
}

/* ============================================================
   BADGES E TAGS
   ============================================================ */

.badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
}

.badge-primary {
  background: #dbeafe;
  color: #1e40af;
}

.badge-success {
  background: #d1fae5;
  color: #065f46;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-danger {
  background: #fee2e2;
  color: #991b1b;
}

.badge-info {
  background: #e0e7ff;
  color: #3730a3;
}

/* ============================================================
   RESPONSIVIDADE
   ============================================================ */

@media (max-width: 768px) {
  #empreiteiros-header {
    padding: 15px 20px;
  }

  .secao-empreiteiros {
    padding: 15px 20px;
  }

  .card-empreiteiros {
    padding: 20px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .filtros-metas,
  .filtros-medicoes,
  .filtros-efetivo {
    flex-direction: column;
  }

  .inp-filtro {
    width: 100%;
  }

  .estatisticas-grid {
    grid-template-columns: 1fr;
  }

  .lista-efetivo {
    grid-template-columns: 1fr;
  }

  .meta-info,
  .medicao-info,
  .servico-info {
    grid-template-columns: 1fr;
  }

  .submenu-servicos-interno {
    flex-direction: column;
  }

  .sub-btn-interno {
    width: 100%;
  }

  .modal-content {
    max-height: 95vh;
  }
}

/* ============================================
   CHAT COM ENGENHARIA
   ============================================ */

.chat-container {
  display: flex;
  height: 600px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 20px;
}

.chat-sidebar {
  width: 350px;
  background: #f9fafb;
  border-right: 2px solid #e5e7eb;
  display: flex;
  flex-direction: column;
}

.chat-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 2px solid #e5e7eb;
}

.chat-sidebar-header h4 {
  margin: 0;
  color: #1f2937;
  font-size: 1.2rem;
}

.btn-nova-conversa {
  background: #667eea;
  color: white;
  border: none;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s;
}

.btn-nova-conversa:hover {
  background: #5568d3;
  transform: scale(1.1);
}

.chat-filtro {
  padding: 10px 15px;
  border-bottom: 1px solid #e5e7eb;
}

.inp-filtro-chat {
  width: 100%;
  padding: 8px 12px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.85rem;
  background: white;
}

.inp-filtro-chat:focus {
  outline: none;
  border-color: #667eea;
}

.chat-search {
  padding: 15px;
  border-bottom: 2px solid #e5e7eb;
}

.search-input {
  width: 100%;
  padding: 10px 15px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.9rem;
}

.search-input:focus {
  outline: none;
  border-color: #667eea;
}

.lista-conversas {
  flex: 1;
  overflow-y: auto;
}

.conversa-item {
  display: flex;
  gap: 12px;
  padding: 15px;
  cursor: pointer;
  transition: all 0.3s;
  border-bottom: 1px solid #e5e7eb;
  position: relative;
}

.conversa-item:hover {
  background: white;
}

.conversa-item.ativa {
  background: white;
  border-left: 4px solid #667eea;
}

.conversa-avatar {
  width: 45px;
  height: 45px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.conversa-info {
  flex: 1;
  min-width: 0;
}

.conversa-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.conversa-assunto {
  font-weight: 600;
  color: #1f2937;
  font-size: 0.95rem;
}

.conversa-hora {
  font-size: 0.75rem;
  color: #9ca3af;
}

.conversa-preview {
  font-size: 0.85rem;
  color: #6b7280;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversa-tipo-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-left: 8px;
}

.conversa-tipo-badge.todos {
  background: #dbeafe;
  color: #1e40af;
}

.conversa-tipo-badge.empreiteiro {
  background: #fef3c7;
  color: #92400e;
}

.conversa-tipo-badge.encarregado {
  background: #e0e7ff;
  color: #3730a3;
}

.conversa-tipo-badge.funcionario {
  background: #ddd6fe;
  color: #5b21b6;
}

.conversa-tipo-badge.equipe {
  background: #d1fae5;
  color: #065f46;
}

.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: white;
}

.chat-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
}

.placeholder-icon {
  font-size: 4rem;
  margin-bottom: 15px;
}

.chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 2px solid #f3f4f6;
}

.chat-info h4 {
  color: #1f2937;
  font-size: 1.2rem;
  margin: 0 0 5px 0;
}

.chat-info p {
  color: #6b7280;
  font-size: 0.9rem;
  margin: 0;
}

.chat-actions {
  display: flex;
  gap: 10px;
}

.btn-chat-action {
  background: #f3f4f6;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 1.1rem;
}

.btn-chat-action:hover {
  background: #e5e7eb;
}

.chat-mensagens {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.mensagem {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-width: 70%;
}

.minha-mensagem {
  align-self: flex-end;
}

.outra-mensagem {
  align-self: flex-start;
}

.mensagem-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
}

.mensagem-autor {
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b7280;
}

.mensagem-hora {
  font-size: 0.75rem;
  color: #9ca3af;
}

.mensagem-conteudo {
  background: #f3f4f6;
  padding: 12px 15px;
  border-radius: 12px;
  color: #1f2937;
  line-height: 1.5;
  word-wrap: break-word;
}

.minha-mensagem .mensagem-conteudo {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.chat-input-container {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  padding: 15px 20px;
  border-top: 2px solid #f3f4f6;
  background: white;
}

.btn-anexar {
  background: #f3f4f6;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.btn-anexar:hover {
  background: #e5e7eb;
}

.chat-input {
  flex: 1;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 15px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: none;
  min-height: 42px;
  max-height: 120px;
  transition: all 0.3s;
}

.chat-input:focus {
  outline: none;
  border-color: #667eea;
}

.btn-enviar {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.btn-enviar:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

@media (max-width: 768px) {
  .chat-container {
    flex-direction: column;
    height: auto;
    min-height: 600px;
  }
  
  .chat-sidebar {
    width: 100%;
    max-height: 300px;
  }
}

/* Seções de Apartamentos e Locais nas Metas */
.meta-apartamentos-section,
.meta-local-section {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 2px solid #f3f4f6;
}

.meta-apartamentos-section h5 {
  margin: 0 0 10px 0;
  font-size: 0.9rem;
  color: #6b7280;
  font-weight: 600;
}

.meta-apartamentos-lista {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-apto-badge {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-block;
}

.meta-local-descricao {
  background: #f9fafb;
  padding: 12px 15px;
  border-radius: 8px;
  border-left: 4px solid #667eea;
  color: #1f2937;
  font-size: 0.95rem;
}

.meta-local-descricao strong {
  color: #667eea;
}

/* Controle de Fluxo de Serviços */
.servico-item {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 15px;
  transition: all 0.3s;
}

.servico-item:hover {
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.servico-item.servico-pendente {
  border-left: 4px solid #fbbf24;
}

.servico-item.servico-andamento {
  border-left: 4px solid #3b82f6;
}

.servico-item.servico-defeito {
  border-left: 4px solid #ef4444;
}

.servico-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}

.servico-titulo {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 5px;
}

.servico-local {
  font-size: 0.9rem;
  color: #6b7280;
}

.badge-status {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-status.pendente {
  background: #fef3c7;
  color: #92400e;
}

.badge-status.andamento {
  background: #dbeafe;
  color: #1e40af;
}

.badge-status.defeito {
  background: #fee2e2;
  color: #991b1b;
}

.servico-info {
  display: flex;
  gap: 20px;
  margin: 15px 0;
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
}

.servico-info-item {
  font-size: 0.9rem;
  color: #4b5563;
}

.servico-info-item strong {
  color: #1f2937;
  margin-right: 5px;
}

.servico-acoes {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.btn-acao {
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-acao.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-acao.btn-success {
  background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
  color: white;
}

.btn-acao.btn-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  color: white;
}

.btn-acao:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.info-meta-inicio {
  background: #f9fafb;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  border-left: 4px solid #667eea;
}

.info-meta-inicio p {
  margin: 8px 0;
  font-size: 0.95rem;
  color: #4b5563;
}

.lista-defeitos {
  margin: 15px 0;
}

.defeito-item {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.defeito-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.defeito-info strong {
  color: #92400e;
  text-transform: capitalize;
}

.badge-prioridade {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-prioridade.baixa {
  background: #d1fae5;
  color: #065f46;
}

.badge-prioridade.media {
  background: #fef3c7;
  color: #92400e;
}

.badge-prioridade.alta {
  background: #fee2e2;
  color: #991b1b;
}

.defeito-item p {
  margin: 5px 0 0 0;
  font-size: 0.9rem;
  color: #1f2937;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #9ca3af;
}

.empty-state h4 {
  color: #6b7280;
  margin: 0 0 10px 0;
}

.empty-state p {
  margin: 0;
  font-size: 0.9rem;
}
}

.meta-card-info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #4a5568;
}

.meta-card-info-item strong {
  color: #2d3748;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.meta-apartamentos-lista {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 2px solid #f0f0f0;
}

.meta-apto-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
  transition: all 0.2s ease;
}

.meta-apto-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 3px 10px rgba(102, 126, 234, 0.5);
}

/* Indicador de Quantidade */
.contador-selecionados {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #edf2f7;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 15px;
}

.contador-selecionados .numero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
}

/* Responsividade Metas */
@media (max-width: 1024px) {
  .form-grid-metas {
    grid-template-columns: 1fr;
  }
  
  .chips-apartamentos {
    gap: 6px;
  }
  
  .chip-apto {
    min-width: 65px;
    height: 65px;
  }
}

@media (max-width: 768px) {
  .form-grid-metas {
    grid-template-columns: 1fr;
  }
  
  .filtros-metas {
    flex-direction: column;
  }
  
  .filtros-metas .inp-filtro {
    width: 100%;
  }
  
  .acoes-metas {
    flex-direction: column;
  }
  
  .btn-metas {
    width: 100%;
    justify-content: center;
  }
  
  .chips-apartamentos {
    gap: 6px;
  }
  
  .chip-apto {
    min-width: 60px;
    height: 60px;
  }
  
  .chip-apto-num {
    font-size: 14px;
  }
  
  .meta-card-info {
    grid-template-columns: 1fr;
  }
  
  .filtros-lista-metas {
    flex-direction: column;
  }
  
  .filtros-lista-metas .inp-filtro {
    width: 100%;
  }
}

/* Badges de Tipo de Área nas Metas */
.tipo-area-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-left: 10px;
  vertical-align: middle;
}

.badge-ua {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.badge-aci {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}

.badge-ace {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
}

.btn-editar {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  color: white;
}

.btn-editar:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(250, 112, 154, 0.4);
}

.meta-local-badge {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  color: #333;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-block;
  margin: 4px;
}

/* ============================================
   SISTEMA DE QR CODE
   ============================================ */

.form-qrcode {
  margin-top: 20px;
}

.form-grid-qrcode {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.qrcode-preview {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 30px;
  margin: 20px 0;
  text-align: center;
}

.qrcode-preview h4 {
  margin: 0 0 20px 0;
  color: #1f2937;
}

#qrcodeCanvas {
  margin: 20px auto;
  display: inline-block;
}

.qrcode-info {
  margin: 20px 0;
  padding: 15px;
  background: #f9fafb;
  border-radius: 8px;
  text-align: left;
  line-height: 1.8;
}

.qrcode-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.scanner-section {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 2px solid #e5e7eb;
}

.scanner-section h4 {
  margin-bottom: 10px;
  color: #1f2937;
}

.scanner-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 20px 0;
}

.inp-codigo {
  flex: 1;
  min-width: 200px;
  padding: 10px 15px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.95rem;
}

#videoCamera {
  width: 100%;
  max-width: 500px;
  margin: 20px auto;
  display: block;
  border-radius: 12px;
}

.resultado-scan {
  margin-top: 20px;
}

.scan-resultado-card {
  background: white;
  border: 2px solid #10b981;
  border-radius: 12px;
  padding: 20px;
}

.scan-resultado-card h4 {
  color: #10b981;
  margin: 0 0 15px 0;
}

.scan-resultado-card p {
  margin: 10px 0;
  color: #4b5563;
}

.scan-acoes {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-warning:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

/* ============================================
   CHAT MULTI-NÍVEL
   ============================================ */

.chat-container {
  display: flex;
  height: 600px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 20px;
}

.chat-sidebar {
  width: 350px;
  background: #f9fafb;
  border-right: 2px solid #e5e7eb;
  display: flex;
  flex-direction: column;
}

.chat-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 2px solid #e5e7eb;
}

.chat-sidebar-header h4 {
  margin: 0;
  color: #1f2937;
  font-size: 1.2rem;
}

.btn-nova-conversa {
  background: #667eea;
  color: white;
  border: none;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s;
}

.btn-nova-conversa:hover {
  background: #5568d3;
  transform: scale(1.1);
}

.chat-filters {
  padding: 15px;
  border-bottom: 2px solid #e5e7eb;
}

.chat-search {
  padding: 15px;
  border-bottom: 2px solid #e5e7eb;
}

.search-input {
  width: 100%;
  padding: 10px 15px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.9rem;
}

.search-input:focus {
  outline: none;
  border-color: #667eea;
}

.lista-conversas {
  flex: 1;
  overflow-y: auto;
}

.conversa-item {
  display: flex;
  gap: 12px;
  padding: 15px;
  cursor: pointer;
  transition: all 0.3s;
  border-bottom: 1px solid #e5e7eb;
  position: relative;
}

.conversa-item:hover {
  background: white;
}

.conversa-item.ativa {
  background: white;
  border-left: 4px solid #667eea;
}

.conversa-avatar {
  width: 45px;
  height: 45px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.conversa-info {
  flex: 1;
  min-width: 0;
}

.conversa-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.conversa-assunto {
  font-weight: 600;
  color: #1f2937;
  font-size: 0.95rem;
}

.conversa-hora {
  font-size: 0.75rem;
  color: #9ca3af;
}

.conversa-preview {
  font-size: 0.85rem;
  color: #6b7280;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tipo-badge {
  display: inline-block;
  padding: 2px 6px;
  background: #e5e7eb;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #6b7280;
  margin-right: 5px;
}

.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: white;
}

.chat-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
}

.placeholder-icon {
  font-size: 4rem;
  margin-bottom: 15px;
}

.chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 2px solid #f3f4f6;
}

.chat-info h4 {
  color: #1f2937;
  font-size: 1.2rem;
  margin: 0 0 5px 0;
}

.chat-info p {
  color: #6b7280;
  font-size: 0.9rem;
  margin: 0;
}

.chat-actions {
  display: flex;
  gap: 10px;
}

.btn-chat-action {
  background: #f3f4f6;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 1.1rem;
}

.btn-chat-action:hover {
  background: #e5e7eb;
}

.chat-mensagens {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.mensagem {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-width: 70%;
}

.minha-mensagem {
  align-self: flex-end;
}

.outra-mensagem {
  align-self: flex-start;
}

.mensagem-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
}

.mensagem-autor {
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b7280;
}

.mensagem-hora {
  font-size: 0.75rem;
  color: #9ca3af;
}

.mensagem-conteudo {
  background: #f3f4f6;
  padding: 12px 15px;
  border-radius: 12px;
  color: #1f2937;
  line-height: 1.5;
  word-wrap: break-word;
}

.minha-mensagem .mensagem-conteudo {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.chat-input-container {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  padding: 15px 20px;
  border-top: 2px solid #f3f4f6;
  background: white;
}

.btn-anexar {
  background: #f3f4f6;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.btn-anexar:hover {
  background: #e5e7eb;
}

.chat-input {
  flex: 1;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 15px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: none;
  min-height: 42px;
  max-height: 120px;
  transition: all 0.3s;
}

.chat-input:focus {
  outline: none;
  border-color: #667eea;
}

.btn-enviar {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.btn-enviar:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.empty-state-chat {
  padding: 40px;
  text-align: center;
  color: #9ca3af;
}

/* Badges de tipo de área */
.tipo-area-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-left: 10px;
}

.badge-ua {
  background: #dbeafe;
  color: #1e40af;
}

.badge-aci {
  background: #fef3c7;
  color: #92400e;
}

.badge-ace {
  background: #d1fae5;
  color: #065f46;
}

@media (max-width: 768px) {
  .chat-container {
    flex-direction: column;
    height: auto;
    min-height: 600px;
  }
  
  .chat-sidebar {
    width: 100%;
    max-height: 300px;
  }
  
  .scan-acoes {
    flex-direction: column;
  }
  
  .scan-acoes button {
    width: 100%;
  }
}

/* Botão Scanner QR Code */
.btn-qrcode {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: white;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-qrcode:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

/* Scanner QR Code */
#qr-reader {
  border: 3px solid #667eea;
  border-radius: 12px;
  overflow: hidden;
}

#qr-status {
  animation: slideIn 0.3s ease;
}

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

/* Lista de Metas QR */
.meta-item-qr {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 15px 20px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.meta-item-qr:hover {
  border-color: #667eea;
  background: #f9fafb;
  transform: translateX(5px);
}

.meta-titulo-qr {
  font-weight: 600;
  color: #1f2937;
  font-size: 1rem;
}

.meta-status-qr {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  background: #dbeafe;
  color: #1e40af;
}

#qr-dados p {
  margin: 8px 0;
  font-size: 0.95rem;
  color: #4b5563;
}

#qr-dados strong {
  color: #1f2937;
}


/* ============================================
   📎 CHAT - ANEXOS (Preview + Mensagens)
   ============================================ */
.anexo-preview{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding:8px 10px;
  margin:6px 0 0 0;
}
.anexo-chip{
  display:flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border:1px solid rgba(0,0,0,0.12);
  border-radius:999px;
  background:rgba(255,255,255,0.6);
}
.anexo-nome{ font-size:12px; }
.anexo-remover{
  border:none;
  background:transparent;
  cursor:pointer;
  font-size:16px;
  line-height:1;
  opacity:0.75;
}
.anexo-remover:hover{ opacity:1; }

.msg-anexos{
  margin-top:8px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.anexo-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  text-decoration:none;
}
.anexo-thumb{
  width:64px;
  height:64px;
  object-fit:cover;
  border-radius:10px;
  border:1px solid rgba(0,0,0,0.12);
}

/* =====================================
   CONTROLE DE PRESENÇA
   ===================================== */

.controle-presenca {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.controle-presenca h4 {
  color: #1f2937;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.presenca-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.info-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: white;
  box-shadow: 0 4px 6px rgba(102, 126, 234, 0.25);
}

.info-label {
  font-size: 13px;
  opacity: 0.9;
  font-weight: 500;
}

.info-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.lista-presencas {
  display: grid;
  gap: 12px;
  max-height: 500px;
  overflow-y: auto;
}

.presenca-card {
  background: #f9fafb;
  border-radius: 10px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-left: 4px solid #10b981;
  transition: all 0.2s ease;
}

.presenca-card:hover {
  background: #f3f4f6;
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.presenca-info-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.presenca-avatar {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}

.presenca-dados {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.presenca-nome {
  font-weight: 600;
  color: #1f2937;
  font-size: 15px;
}

.presenca-detalhes {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.presenca-hora,
.presenca-obra {
  font-size: 13px;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 4px;
}

.presenca-tipo {
  background: white;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  color: #10b981;
}

.presenca-tipo.qrcode {
  background: #ecfdf5;
  color: #059669;
}

.presenca-tipo.facial {
  background: #eff6ff;
  color: #2563eb;
}

.presenca-tipo.manual {
  background: #fef3c7;
  color: #d97706;
}

/* Estatísticas do Efetivo */
.estat isticas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.stat-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}

.stat-info {
  flex: 1;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: #1f2937;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

/* Badges de Presença no Card de Funcionário */
.badge-presente {
  background: #ecfdf5;
  color: #059669;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.badge-ausente {
  background: #fef3c7;
  color: #d97706;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

/* Empty State Melhorado */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #9ca3af;
}

.empty-state svg {
  margin: 0 auto 20px;
  opacity: 0.5;
}

.empty-state h4 {
  color: #6b7280;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.empty-state p {
  color: #9ca3af;
  font-size: 14px;
}

/* Responsivo */
@media (max-width: 768px) {
  .presenca-info-grid {
    grid-template-columns: 1fr;
  }
  
  .presenca-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .presenca-tipo {
    align-self: flex-end;
  }
  
  .estatisticas-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .func-badges {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
/* ============================================================
   MÓDULO DE PRODUÇÃO - ESTILOS ESPECÍFICOS
   ============================================================ */

/* Identificação de Localização */
.producao-identificacao {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
  color: #fff;
}

.identificacao-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.identificacao-header h4 {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.btn-qrcode {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-qrcode:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.identificacao-manual {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 10px;
  padding: 20px;
}

.form-grid-producao {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  align-items: end;
}

.form-grid-producao select {
  background: #fff;
  color: #2c3e50;
  font-weight: 500;
}

.btn-carregar-producao {
  background: #10b981;
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-carregar-producao:hover {
  background: #059669;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Cards de Resumo */
.producao-resumo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 25px 0;
}

.card-resumo-producao {
  background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-left: 5px solid #667eea;
  transition: all 0.3s ease;
}

.card-resumo-producao:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.card-resumo-producao.afazer {
  border-left-color: #3b82f6;
}

.card-resumo-producao.emexecucao {
  border-left-color: #fbbf24;
}

.card-resumo-producao.executados {
  border-left-color: #10b981;
}

.card-resumo-producao .icone {
  font-size: 32px;
  margin-bottom: 10px;
}

.card-resumo-producao .titulo {
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.card-resumo-producao .valor {
  font-size: 36px;
  font-weight: 700;
  color: #1f2937;
  line-height: 1;
}

.card-resumo-producao .detalhe {
  font-size: 13px;
  color: #9ca3af;
  margin-top: 8px;
}

/* Submenu de Produção */
.submenu-producao {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 25px 0 20px 0;
  padding-bottom: 15px;
  border-bottom: 2px solid #e5e7eb;
}

.sub-btn-producao {
  background: #f3f4f6;
  border: none;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  color: #4b5563;
  transition: all 0.3s ease;
  position: relative;
}

.sub-btn-producao:hover {
  background: #e5e7eb;
  color: #1f2937;
}

.sub-btn-producao.active {
  background: #667eea;
  color: #fff;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.sub-btn-producao.active::after {
  content: '';
  position: absolute;
  bottom: -17px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #667eea;
}

/* Abas de Produção */
.aba-producao {
  display: none;
  animation: fadeIn 0.3s ease;
}

.aba-producao.active {
  display: block;
}

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

.aba-header-producao {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.aba-header-producao h4 {
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
}

.filtros-producao {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.inp-filtro-prod {
  padding: 10px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
  background: #fff;
  transition: all 0.2s ease;
  min-width: 180px;
}

.inp-filtro-prod:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Lista de Produção */
.lista-producao {
  display: grid;
  gap: 15px;
}

.item-producao {
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 18px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.item-producao:hover {
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.item-producao-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 15px;
}

.item-producao-titulo {
  flex: 1;
}

.item-producao-titulo h5 {
  font-size: 17px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 5px 0;
}

.item-producao-titulo p {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

.badge-status-producao {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.badge-status-producao.afazer {
  background: #dbeafe;
  color: #1e40af;
}

.badge-status-producao.emexecucao {
  background: #fef3c7;
  color: #92400e;
}

.badge-status-producao.executado {
  background: #d1fae5;
  color: #065f46;
}

.item-producao-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f3f4f6;
}

.info-item-producao {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-item-producao label {
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-item-producao span {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
}

.item-producao-acoes {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #f3f4f6;
}

.btn-acao-producao {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-acao-producao.iniciar {
  background: #10b981;
  color: #fff;
}

.btn-acao-producao.iniciar:hover {
  background: #059669;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-acao-producao.concluir {
  background: #3b82f6;
  color: #fff;
}

.btn-acao-producao.concluir:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-acao-producao.visualizar {
  background: #f3f4f6;
  color: #4b5563;
}

.btn-acao-producao.visualizar:hover {
  background: #e5e7eb;
  color: #1f2937;
}

/* Lista de Quantitativos */
.lista-quantitativos {
  display: grid;
  gap: 20px;
}

.card-quantitativo {
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
}

.card-quantitativo:hover {
  border-color: #667eea;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.quantitativo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f3f4f6;
}

.quantitativo-header h5 {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
}

.quantitativo-total {
  font-size: 28px;
  font-weight: 700;
  color: #667eea;
}

.quantitativo-detalhes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 15px;
}

.detalhe-quantitativo {
  background: #f9fafb;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  transition: all 0.2s ease;
}

.detalhe-quantitativo:hover {
  background: #f3f4f6;
  transform: translateY(-2px);
}

.detalhe-quantitativo .label {
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.detalhe-quantitativo .valor {
  font-size: 22px;
  font-weight: 700;
  color: #1f2937;
}

.detalhe-quantitativo .unidade {
  font-size: 13px;
  color: #6b7280;
  margin-top: 4px;
}

/* Barra de Progresso */
.barra-progresso-producao {
  margin-top: 15px;
}

.barra-progresso-producao .label-progresso {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
}

.barra-progresso-producao .barra {
  height: 12px;
  background: #f3f4f6;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
}

.barra-progresso-producao .preenchimento {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  transition: width 0.6s ease;
  position: relative;
}

.barra-progresso-producao .preenchimento::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Estados Vazios */
.estado-vazio-producao {
  text-align: center;
  padding: 60px 20px;
  color: #9ca3af;
}

.estado-vazio-producao .icone {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.estado-vazio-producao h4 {
  font-size: 20px;
  font-weight: 700;
  color: #6b7280;
  margin-bottom: 10px;
}

.estado-vazio-producao p {
  font-size: 15px;
  color: #9ca3af;
  margin: 0;
}

/* Modal Scanner (Produção) */
.modal-scanner {
  max-width: 600px;
}

.resultado-scan {
  margin-top: 20px;
  padding: 15px;
  background: #f0fdf4;
  border: 2px solid #10b981;
  border-radius: 8px;
  display: none;
}

.resultado-scan.show {
  display: block;
  animation: slideDown 0.3s ease;
}

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

.resultado-scan h4 {
  color: #065f46;
  margin: 0 0 10px 0;
  font-size: 16px;
  font-weight: 700;
}

.resultado-scan p {
  color: #047857;
  margin: 5px 0;
  font-size: 14px;
}

/* Timeline de Execução */
.timeline-producao {
  margin-top: 20px;
  padding: 20px;
  background: #f9fafb;
  border-radius: 10px;
}

.timeline-item {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  position: relative;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 40px;
  bottom: -20px;
  width: 2px;
  background: #e5e7eb;
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-icone {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  z-index: 1;
}

.timeline-icone.inicio {
  background: #dbeafe;
  color: #1e40af;
}

.timeline-icone.execucao {
  background: #fef3c7;
  color: #92400e;
}

.timeline-icone.conclusao {
  background: #d1fae5;
  color: #065f46;
}

.timeline-conteudo {
  flex: 1;
  padding-top: 5px;
}

.timeline-conteudo h6 {
  font-size: 15px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 5px 0;
}

.timeline-conteudo p {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
}

.timeline-conteudo .timestamp {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 5px;
}

/* Responsividade */
@media (max-width: 768px) {
  .form-grid-producao {
    grid-template-columns: 1fr;
  }

  .producao-resumo-grid {
    grid-template-columns: 1fr;
  }

  .submenu-producao {
    flex-direction: column;
  }

  .sub-btn-producao {
    width: 100%;
  }

  .aba-header-producao {
    flex-direction: column;
    align-items: flex-start;
  }

  .filtros-producao {
    width: 100%;
    flex-direction: column;
  }

  .inp-filtro-prod {
    width: 100%;
  }

  .item-producao-info {
    grid-template-columns: 1fr;
  }

  .item-producao-acoes {
    flex-direction: column;
  }

  .quantitativo-detalhes {
    grid-template-columns: 1fr;
  }

  .identificacao-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .btn-qrcode {
    width: 100%;
  }
}

/* Animações de Loading */
.loading-producao {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
}

.spinner-producao {
  width: 50px;
  height: 50px;
  border: 5px solid #f3f4f6;
  border-top: 5px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Badges e Tags */
.tag-funcionario {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #f3f4f6;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #4b5563;
  margin-top: 8px;
}

.tag-funcionario .icone {
  font-size: 16px;
}

/* Alertas e Notificações */
.alerta-producao {
  padding: 15px 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
}

.alerta-producao.info {
  background: #dbeafe;
  color: #1e40af;
  border-left: 4px solid #3b82f6;
}

.alerta-producao.warning {
  background: #fef3c7;
  color: #92400e;
  border-left: 4px solid #fbbf24;
}

.alerta-producao.success {
  background: #d1fae5;
  color: #065f46;
  border-left: 4px solid #10b981;
}

.alerta-producao .icone {
  font-size: 24px;
}

/* ============================================================
   EFETIVO DE FUNCIONÁRIOS - ESTILOS ADICIONAIS
   ============================================================ */

/* Estatísticas do Efetivo */
.estatisticas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.stat-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
  transition: transform 0.2s;
}

.stat-card:hover {
  transform: translateY(-3px);
}

.stat-card .stat-icon {
  font-size: 36px;
  opacity: 0.9;
}

.stat-card .stat-info {
  flex: 1;
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}

.stat-card .stat-label {
  font-size: 13px;
  opacity: 0.85;
  font-weight: 500;
}

/* Filtros do Efetivo */
.filtros-efetivo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.filtros-group {
  display: flex;
  gap: 10px;
  flex: 1;
  flex-wrap: wrap;
}

.filtros-group .inp-filtro {
  min-width: 200px;
  flex: 1;
}

/* Cards de Funcionários */
.funcionario-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 15px;
  transition: all 0.2s;
}

.funcionario-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #667eea;
}

.func-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.func-avatar {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}

.func-info {
  flex: 1;
}

.func-nome {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 4px;
}

.func-funcao {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

.func-badges {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.badge-presente,
.badge-ausente,
.badge-status {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-presente {
  background: #d1fae5;
  color: #065f46;
}

.badge-ausente {
  background: #fee2e2;
  color: #991b1b;
}

.badge-status {
  background: #e5e7eb;
  color: #4b5563;
}

.badge-status.status-ativo {
  background: #d1fae5;
  color: #065f46;
}

.badge-status.status-inativo {
  background: #fee2e2;
  color: #991b1b;
}

.func-detalhes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  padding-top: 15px;
  border-top: 1px solid #e5e7eb;
}

.func-item {
  font-size: 14px;
  color: #4b5563;
}

.func-item strong {
  color: #1f2937;
  font-weight: 600;
}

.func-acoes {
  display: flex;
  gap: 8px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #e5e7eb;
}

.btn-editar,
.btn-excluir,
.btn-registrar-ponto {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-editar {
  background: #3b82f6;
  color: white;
}

.btn-editar:hover {
  background: #2563eb;
}

.btn-excluir {
  background: #ef4444;
  color: white;
}

.btn-excluir:hover {
  background: #dc2626;
}

.btn-registrar-ponto {
  background: #10b981;
  color: white;
}

.btn-registrar-ponto:hover {
  background: #059669;
}

/* ============================================================
   CONTROLE DE PRESENÇA - ESTILOS ADICIONAIS
   ============================================================ */

.presenca-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  color: white;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.presenca-data {
  display: flex;
  align-items: center;
  gap: 15px;
}

.data-icon {
  font-size: 48px;
  opacity: 0.9;
}

.data-info .data-texto {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
  text-transform: capitalize;
}

.data-info .data-label {
  font-size: 13px;
  opacity: 0.85;
}

.presenca-stats {
  display: flex;
  gap: 20px;
}

.stat-presente {
  text-align: center;
  background: rgba(255, 255, 255, 0.2);
  padding: 15px 25px;
  border-radius: 10px;
  backdrop-filter: blur(10px);
}

.stat-numero {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 4px;
}

.stat-texto {
  font-size: 13px;
  opacity: 0.9;
}

/* Seção de Registros */
.secao-registros {
  margin-bottom: 30px;
}

.secao-registros h4 {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 15px;
}

.lista-presenca-funcionarios {
  display: grid;
  gap: 12px;
}

.presenca-func-item {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  transition: all 0.2s;
}

.presenca-func-item:hover {
  border-color: #667eea;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.presenca-func-dados {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.presenca-func-avatar {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  color: white;
}

.presenca-func-info {
  flex: 1;
}

.presenca-func-nome {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 4px;
}

.presenca-func-funcao {
  font-size: 13px;
  color: #6b7280;
}

.presenca-func-acoes {
  display: flex;
  gap: 8px;
}

.btn-entrada,
.btn-saida {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-entrada {
  background: #10b981;
  color: white;
}

.btn-entrada:hover {
  background: #059669;
}

.btn-saida {
  background: #ef4444;
  color: white;
}

.btn-saida:hover {
  background: #dc2626;
}

/* Histórico de Presenças */
.historico-presenca {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 2px solid #e5e7eb;
}

.historico-presenca h4 {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 15px;
}

.lista-registros-presenca {
  display: grid;
  gap: 10px;
}

.registro-ponto-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.registro-ponto-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.registro-avatar {
  width: 45px;
  height: 45px;
  background: #f3f4f6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.registro-dados {
  flex: 1;
}

.registro-nome {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 4px;
}

.registro-detalhes {
  font-size: 13px;
  color: #6b7280;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.registro-horario {
  display: flex;
  gap: 8px;
}

.badge-entrada,
.badge-saida {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-entrada {
  background: #d1fae5;
  color: #065f46;
}

.badge-saida {
  background: #fee2e2;
  color: #991b1b;
}

/* Modal Large */
.modal-large {
  max-width: 800px;
  width: 90%;
}

/* Info Funcionário no Modal de Ponto */
.info-funcionario-ponto {
  background: #f9fafb;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 20px;
  border-left: 4px solid #667eea;
}

.info-funcionario-ponto .nome-funcionario {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 4px;
}

.info-funcionario-ponto .funcao-funcionario {
  font-size: 14px;
  color: #6b7280;
}

/* ============================================================
   TERMINAL DE PONTO ELETRÔNICO
   ============================================================ */

/* Métodos de Identificação */
.metodos-identificacao {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.metodo-btn {
  background: white;
  border: 3px solid #e5e7eb;
  border-radius: 16px;
  padding: 30px 20px;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
}

.metodo-btn:hover {
  border-color: #667eea;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25);
}

.metodo-btn.active {
  border-color: #667eea;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.metodo-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.metodo-titulo {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.metodo-desc {
  font-size: 14px;
  opacity: 0.8;
}

/* Containers de Métodos */
.container-metodo {
  display: none;
  margin-top: 30px;
  padding: 30px;
  background: #f9fafb;
  border-radius: 16px;
}

.container-metodo.active {
  display: block;
}

/* Camera Container */
.camera-container {
  position: relative;
  max-width: 640px;
  margin: 0 auto 20px;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
}

#videoFacial {
  width: 100%;
  height: auto;
  display: block;
}

.camera-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.face-guide {
  width: 300px;
  height: 400px;
  border: 4px dashed #667eea;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

.camera-status {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 12px 24px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 14px;
  backdrop-filter: blur(10px);
}

/* Controles da Câmera */
.camera-controls {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
}

.btn-camera-primary,
.btn-camera-secondary {
  padding: 15px 30px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-camera-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-camera-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.btn-camera-secondary {
  background: #10b981;
  color: white;
}

.btn-camera-secondary:hover {
  background: #059669;
  transform: scale(1.05);
}

/* Form de Identificação */
.form-identificacao {
  max-width: 500px;
  margin: 0 auto;
}

.form-field-terminal {
  margin-bottom: 20px;
}

.form-field-terminal label {
  display: block;
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 10px;
}

.input-terminal {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 18px;
  transition: all 0.3s;
}

.input-terminal:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.btn-terminal-primary {
  width: 100%;
  padding: 18px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-terminal-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

/* Resultados da Busca */
.resultados-busca {
  margin-top: 20px;
  max-height: 400px;
  overflow-y: auto;
}

.resultado-item {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 15px;
}

.resultado-item:hover {
  border-color: #667eea;
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.resultado-avatar {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
  color: white;
}

.resultado-dados {
  flex: 1;
}

.resultado-nome {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 4px;
}

.resultado-info {
  font-size: 14px;
  color: #6b7280;
}

/* Painel de Confirmação */
.painel-confirmacao {
  margin-top: 30px;
  padding: 30px;
  background: white;
  border-radius: 16px;
  border: 3px solid #667eea;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.funcionario-identificado {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 25px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  margin-bottom: 25px;
  color: white;
}

.func-id-avatar {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  flex-shrink: 0;
  backdrop-filter: blur(10px);
}

.func-id-dados {
  flex: 1;
}

.func-id-nome {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
}

.func-id-funcao {
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: 4px;
}

.func-id-cpf {
  font-size: 14px;
  opacity: 0.8;
}

/* Botões de Tipo de Registro */
.tipo-registro-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 15px;
}

.btn-registrar-entrada,
.btn-registrar-saida,
.btn-registrar-saida-almoco,
.btn-registrar-retorno-almoco {
  padding: 18px 12px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
}

.btn-registrar-entrada {
  background: #10b981;
  color: white;
}

.btn-registrar-entrada:hover {
  background: #059669;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-registrar-saida {
  background: #ef4444;
  color: white;
}

.btn-registrar-saida:hover {
  background: #dc2626;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.btn-registrar-saida-almoco {
  background: #f59e0b;
  color: white;
}

.btn-registrar-saida-almoco:hover {
  background: #d97706;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.btn-registrar-retorno-almoco {
  background: #3b82f6;
  color: white;
}

.btn-registrar-retorno-almoco:hover {
  background: #2563eb;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-cancelar-identificacao {
  width: 100%;
  padding: 15px;
  background: #6b7280;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-cancelar-identificacao:hover {
  background: #4b5563;
}

/* Últimos Registros do Terminal */
.ultimos-registros-terminal {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid #e5e7eb;
}

.ultimos-registros-terminal h4 {
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 20px;
}

.lista-ultimos-registros {
  display: grid;
  gap: 12px;
}

.registro-terminal-item {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
}

.registro-terminal-item:hover {
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.registro-terminal-dados {
  display: flex;
  align-items: center;
  gap: 12px;
}

.registro-terminal-avatar {
  width: 50px;
  height: 50px;
  background: #f3f4f6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.registro-terminal-info {
  flex: 1;
}

.registro-terminal-nome {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 4px;
}

.registro-terminal-detalhes {
  font-size: 13px;
  color: #6b7280;
}

.registro-terminal-badge {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.registro-terminal-badge.entrada {
  background: #d1fae5;
  color: #065f46;
}

.registro-terminal-badge.saida {
  background: #fee2e2;
  color: #991b1b;
}

