/* Estilos para o módulo de Movimentações de Estoque */
.movimentacoes-container {
  padding: 20px;
  max-width: 100%;
}

.movimentacoes-header {
  text-align: center;
  margin-bottom: 30px;
}

.movimentacoes-header h2 {
  font-size: 28px;
  color: #333;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.movimentacoes-header p {
  font-size: 16px;
  color: #666;
}

/* Stats Section */
.stats-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: #ffffff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  gap: 15px;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stat-icon {
  font-size: 32px;
  line-height: 1;
}

.stat-content {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 13px;
  color: #666;
  margin-bottom: 4px;
  font-weight: 500;
}

.stat-value {
  font-size: 22px;
  font-weight: bold;
  color: #333;
  letter-spacing: -0.5px;
}

.stat-total .stat-value { color: #1976d2; }
.stat-entrada .stat-value { color: #2e7d32; }
.stat-saida .stat-value { color: #c62828; }
.stat-ajuste .stat-value { color: #f57c00; }

/* Filters Section */
.filters-section {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  align-items: flex-end;
  background: #f8f9fa;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-group label {
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.filter-group select,
.filter-group input[type="text"],
.filter-group input[type="date"] {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  min-width: 180px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-group select:focus,
.filter-group input:focus {
  outline: none;
  border-color: #1976d2;
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.btn-limpar-filtros {
  padding: 10px 16px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
  align-self: flex-end;
}

.btn-limpar-filtros:hover {
  background: linear-gradient(135deg, #ee5a6f 0%, #ff6b6b 100%);
  box-shadow: 0 4px 8px rgba(255, 107, 107, 0.4);
  transform: translateY(-2px);
}

/* Actions Section */
.actions-section {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.btn-export {
  background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(76, 175, 80, 0.3);
}

.btn-export:hover {
  background: linear-gradient(135deg, #388e3c 0%, #1b5e20 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(76, 175, 80, 0.4);
}

/* Table Section */
.table-container {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow-x: auto;
}

.movimentacoes-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1200px;
}

.movimentacoes-table th {
  background: #f0f4f8;
  padding: 15px 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #e0e0e0;
  font-size: 13px;
  white-space: nowrap;
}

.movimentacoes-table td {
  padding: 12px;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
  font-size: 13px;
  color: #555;
}

.movimentacoes-table tbody tr:hover {
  background: #f8f9fa;
}

.no-data {
  text-align: center;
  color: #888;
  font-style: italic;
  padding: 30px;
}

/* Células específicas */
.data-cell {
  white-space: nowrap;
  color: #666;
}

.numero-cell {
  text-align: center;
  font-family: monospace;
}

.diferenca-cell {
  text-align: center;
  font-family: monospace;
  font-size: 14px;
}

.diferenca-cell.positivo {
  color: #2e7d32;
  background-color: #e8f5e9;
}

.diferenca-cell.negativo {
  color: #c62828;
  background-color: #ffebee;
}

.diferenca-cell.neutro {
  color: #666;
  background-color: #f5f5f5;
}

.usuario-cell {
  font-size: 12px;
}

.usuario-cell strong {
  color: #333;
  font-size: 13px;
}

.usuario-cell small {
  color: #999;
  text-transform: uppercase;
  font-size: 10px;
}

.motivo-cell {
  max-width: 250px;
  font-size: 12px;
  color: #666;
}

.motivo-cell .observacao {
  color: #999;
  font-style: italic;
  display: block;
  margin-top: 4px;
}

/* Badges */
.badge-tipo {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-venda {
  background-color: #e3f2fd;
  color: #1976d2;
  border: 1px solid #bbdefb;
}

.badge-compra {
  background-color: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

.badge-ajuste {
  background-color: #fff3e0;
  color: #ef6c00;
  border: 1px solid #ffe0b2;
}

.badge-remocao {
  background-color: #ffebee;
  color: #c62828;
  border: 1px solid #ffcdd2;
}

.badge-devolucao {
  background-color: #f3e5f5;
  color: #7b1fa2;
  border: 1px solid #e1bee7;
}

.badge-transferencia {
  background-color: #e0f2f1;
  color: #00796b;
  border: 1px solid #b2dfdb;
}

.badge-inventario {
  background-color: #fce4ec;
  color: #c2185b;
  border: 1px solid #f8bbd0;
}

.badge-correcao {
  background-color: #fff9c4;
  color: #f57f17;
  border: 1px solid #fff59d;
}

.badge-campo {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  background-color: #f5f5f5;
  color: #555;
  border: 1px solid #e0e0e0;
}

/* Table Info */
.table-info {
  text-align: center;
  padding: 15px;
  color: #666;
  font-size: 13px;
  background: #f8f9fa;
  border-radius: 0 0 12px 12px;
  margin-top: -12px;
}

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

  .filters-section {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group select,
  .filter-group input {
    min-width: 100%;
  }

  .btn-limpar-filtros {
    width: 100%;
  }

  .actions-section {
    justify-content: stretch;
  }

  .btn-export {
    width: 100%;
  }

  .table-container {
    overflow-x: auto;
  }
}
