:root {
  --primary-color: #006f67;
  --secondary-color: #6ebf4d;
  --primary-light: rgba(0, 111, 103, 0.1);
  --secondary-light: rgba(110, 191, 77, 0.1);
  --text-color: #333;
  --text-light: #666;
  --background-color: #f9fafb;
  --card-bg: #ffffff;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --transition: all 0.3s ease;
  --radius: 8px;
}

.workflow-history-loading {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: #666;
}

.workflow-history-loading i {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #006f67;
}

.workflow-history-empty {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: #666;
}

.workflow-history-empty i {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #006f67;
}

.workflow-history-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin-bottom: 1rem;
  background-color: #fff;
  border-radius: 4px;
  overflow: hidden;
}

.workflow-history-table-fixed-header {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid #ddd;
}

.workflow-history-table td {
  padding: 0.75rem;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.workflow-history-table tbody tr {
  transition: background-color 0.2s ease;
}

.workflow-history-table tbody tr:hover {
  background-color: #f8f9fa;
}

.workflow-history-table tbody tr:hover .fa-external-link-alt {
  opacity: 1 !important;
  transform: scale(1.1);
  transition: all 0.2s ease;
}

.workflow-history-table tbody tr:active {
  background-color: #e9ecef;
}

.fa-external-link-alt {
  transition: all 0.2s ease;
}

.workflow-history-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
  background-color: #fff;
}

.workflow-history-table thead tr:first-child {
  background-color: #f5f8f8;
}

.workflow-history-table thead tr:last-child {
  background-color: #f8f9fa;
}

.workflow-history-table th {
  padding: 0.75rem;
  font-weight: 500;
  text-align: center;
  height: 52px;
  vertical-align: middle;
  font-size: 14px;
}

.workflow-history-table th:last-child {
  border-right: none;
}

.workflow-type-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  font-size: 14px;
}

.workflow-type-icon i {
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.workflow-type-icon.bonificacao {
  background-color: #4caf50;
}

.workflow-type-icon.demonstracao {
  background-color: #2196f3;
}

.workflow-type-icon.amostra {
  background-color: #9c27b0;
}

.workflow-type-icon.chop {
  background-color: #ff5722;
}

.workflow-type-icon.devolucao {
  background-color: #f44336 !important;
}

.workflow-type-icon.comodato {
  background-color: #795548;
}

.workflow-type-icon.ordem-de-servico {
  background-color: #009688;
}

.workflow-type-icon.baixa-manual-de-comodato {
  background-color: #607d8b;
}

.workflow-type-icon.treinamento-de-cliente {
  background-color: #3f51b5;
}

.workflow-type-icon.troca {
  background-color: #ffc107;
}

.workflow-type-icon.pvc {
  background-color: #6f42c1;
}

.workflow-history-table th .sort-indicator {
  margin-left: 0.5rem;
  font-size: 12px;
  opacity: 0.5;
  vertical-align: middle;
  display: inline;
}

.workflow-history-table th:hover .sort-indicator {
  opacity: 0.8;
}

.workflow-history-table th[data-sort="asc"] .sort-indicator {
  opacity: 1;
}

.workflow-history-table th[data-sort="desc"] .sort-indicator {
  opacity: 1;
}

.workflow-history-table tbody tr:hover {
  background-color: #f5f8f8;
}

.workflow-history-table .filter-input {
  width: calc(100% - 16px);
  padding: 0.25rem 0.5rem;
  font-size: 13px;
  line-height: 1.4;
  color: #495057;
  background-color: #fff;
  border: 1px solid #ced4da;
  border-radius: 4px;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  height: 28px;
  margin: 8px;
}

.workflow-history-table .filter-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.workflow-history-table .status-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  min-width: 90px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.workflow-history-table .status-badge.finalizado {
  background-color: #28a745;
  color: #fff;
}

.workflow-history-table .status-badge.em-andamento {
  background-color: #007bff;
  color: #fff;
}

.workflow-history-table .status-badge.pendente {
  background-color: #ffc107;
  color: #000;
}

.workflow-history-table .status-badge.cancelado {
  background-color: #dc3545;
  color: #fff;
}

.workflow-history-grid {
  overflow: visible;
  position: relative;
  border-radius: 4px;
  background-color: #fff;
}

.workflow-history-grid::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.workflow-history-grid::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.workflow-history-grid::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.workflow-history-grid::-webkit-scrollbar-thumb:hover {
  background: #555;
}

#workflow-filter-row th {
  padding: 0.5rem;
  background-color: #f8f9fa;
  border-top: 1px solid #ddd;
  height: 52px;
  vertical-align: middle;
}

.external-link {
  background-color: #006f67;
  padding: 1px 7px 1px 7px;
  border-radius: 5px;
}
