/* Listagens profissionais: linhas mais compactas, títulos horizontais e alinhamento consistente. */
.data-table {
  font-size: 13px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.data-table th,
.data-table td {
  padding: 9px 12px;
  vertical-align: middle;
  line-height: 1.35;
  writing-mode: horizontal-tb;
  text-orientation: mixed;
}

.data-table th {
  color: #728379;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .075em;
  white-space: normal;
}

.data-table th .sort-heading {
  max-width: 100%;
  line-height: 1.25;
  white-space: normal;
}

.data-table tbody tr {
  transition: background-color 120ms ease;
}

.data-table tbody tr:nth-child(even) {
  background: #fbfcfb;
}

.data-table tbody tr:hover td {
  background: #f1f7f2;
}

.data-table td:has(> .badge) {
  text-align: center;
  white-space: nowrap;
}

.data-table .registration-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}

.data-table td:has(> .registration-actions) {
  text-align: right;
  white-space: nowrap;
}

.data-table .registration-actions .btn.small {
  min-height: 30px;
  padding: 6px 9px;
  border-radius: 8px;
  font-size: 11.5px;
}

/* A lista de Produtos tem colunas numéricas e ações; alinhe cada grupo sem alterar a ordenação. */
.product-list-table {
  min-width: 1100px;
}

.product-list-table th:nth-child(6),
.product-list-table td:nth-child(6),
.product-list-table th:nth-child(7),
.product-list-table td:nth-child(7),
.product-list-table th:nth-child(8),
.product-list-table td:nth-child(8) {
  text-align: right;
  white-space: nowrap;
}

.product-list-table th:nth-child(9),
.product-list-table th:nth-child(10),
.product-list-table td:nth-child(9),
.product-list-table td:nth-child(10) {
  text-align: center;
}

.product-list-table th:nth-child(11),
.product-list-table td:nth-child(11) {
  text-align: right;
  white-space: nowrap;
}

.product-list-table td:nth-child(3) {
  min-width: 210px;
  max-width: 360px;
  line-height: 1.35;
}

@media (max-width: 720px) {
  .data-table th,
  .data-table td {
    padding: 8px 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .data-table tbody tr {
    transition: none;
  }
}


/* Busca e filtro de Produtos na mesma linha e no mesmo eixo vertical. */
.product-search-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, auto) auto auto;
  align-items: center;
  gap: 12px;
}

.product-search-toolbar #search {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  margin: 0;
}

.product-search-toolbar .toolbar-filter {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  margin: 0;
  white-space: nowrap;
}

.product-search-toolbar .toolbar-filter select {
  width: 150px;
  min-width: 138px;
  min-height: 44px;
  margin: 0;
}

.product-search-toolbar > .btn {
  min-width: 88px;
  min-height: 44px;
}

.product-search-toolbar > .muted {
  white-space: nowrap;
}

/* Campos de data em filtros de relatório: compactos para 10 caracteres, sem encolher buscas. */
.account-filters > label:has(> input[type="date"]) {
  flex: 0 1 168px;
  min-width: 150px;
}

.account-filters > label > input[type="date"] {
  width: 100%;
  min-width: 0;
  max-width: 168px;
}

@media (max-width: 680px) {
  .product-search-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .product-search-toolbar #search,
  .product-search-toolbar > .muted {
    grid-column: 1 / -1;
  }

  .product-search-toolbar .toolbar-filter {
    min-width: 0;
  }

  .product-search-toolbar .toolbar-filter select {
    width: 100%;
    min-width: 0;
    max-width: 160px;
  }

  .product-search-toolbar > .btn {
    width: auto;
  }
}

@media (max-width: 420px) {
  .product-search-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-search-toolbar .toolbar-filter,
  .product-search-toolbar > .btn,
  .product-search-toolbar > .muted {
    grid-column: 1;
  }

  .product-search-toolbar .toolbar-filter {
    width: 100%;
    justify-content: space-between;
  }

  .product-search-toolbar .toolbar-filter select {
    max-width: none;
    flex: 1 1 auto;
  }

  .product-search-toolbar > .btn {
    width: 100%;
  }
}
