/* Diamond Almoxarifado — listagem compacta */
#page-estoque .ap-toolbar {
  gap: 8px !important;
  margin-bottom: 14px !important;
}

#page-estoque .ap-toolbar .btn,
#page-estoque .ap-toolbar button {
  min-height: 38px !important;
  padding: 9px 14px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  line-height: 1 !important;
  box-shadow: 0 8px 20px rgba(0,0,0,.06) !important;
}

#page-estoque h1 {
  margin-bottom: 4px !important;
}

#page-estoque .sub {
  font-size: 13px !important;
  margin-bottom: 14px !important;
}

#page-estoque .card.panel {
  padding: 18px !important;
  border-radius: 18px !important;
  overflow: visible !important;
}

#page-estoque .ap-filters {
  grid-template-columns: minmax(260px, 1.8fr) minmax(160px, .8fr) minmax(180px, .9fr) minmax(150px, .7fr) !important;
  gap: 10px !important;
  margin-bottom: 12px !important;
}

#page-estoque .ap-filters input,
#page-estoque .ap-filters select {
  height: 40px !important;
  padding: 8px 12px !important;
  border-radius: 11px !important;
  font-size: 13px !important;
}

#page-estoque .table-wrap {
  overflow-x: hidden !important;
  overflow-y: visible !important;
  max-height: none !important;
  width: 100% !important;
}

#page-estoque table {
  width: 100% !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
  font-size: 12.5px !important;
}

#page-estoque thead th {
  padding: 10px 10px !important;
  font-size: 10.5px !important;
  letter-spacing: .7px !important;
  color: #6b7280 !important;
  white-space: nowrap !important;
  background: #faf9f7 !important;
}

#page-estoque tbody td {
  padding: 12px 10px !important;
  vertical-align: middle !important;
  border-bottom: 1px solid #e8e1d7 !important;
  white-space: normal !important;
  word-break: normal !important;
}

#page-estoque tbody tr {
  min-height: auto !important;
}

#page-estoque tbody tr:hover {
  background: rgba(201,168,76,.045) !important;
}

#page-estoque th:nth-child(1),
#page-estoque td:nth-child(1) {
  width: 34% !important;
}

#page-estoque th:nth-child(2),
#page-estoque td:nth-child(2) {
  width: 13% !important;
}

#page-estoque th:nth-child(3),
#page-estoque td:nth-child(3) {
  width: 11% !important;
}

#page-estoque th:nth-child(4),
#page-estoque td:nth-child(4) {
  width: 9% !important;
}

#page-estoque th:nth-child(5),
#page-estoque td:nth-child(5) {
  width: 7% !important;
}

#page-estoque th:nth-child(6),
#page-estoque td:nth-child(6) {
  width: 10% !important;
}

#page-estoque th:nth-child(7),
#page-estoque td:nth-child(7) {
  width: 16% !important;
}

#page-estoque .almox-item-cell {
  line-height: 1.25 !important;
}

#page-estoque .almox-item-title {
  display: block !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  color: #0f172a !important;
  margin-bottom: 3px !important;
  text-transform: none !important;
}

#page-estoque .almox-destino-line {
  display: block !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  color: #64748b !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
}

#page-estoque .ap-actions {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 5px !important;
  flex-wrap: nowrap !important;
}

#page-estoque .btn-xs {
  min-height: 29px !important;
  padding: 6px 8px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
  line-height: 1 !important;
  font-weight: 850 !important;
  box-shadow: none !important;
}

#page-estoque .btn-xs.blue {
  background: #2563eb !important;
}

#page-estoque .btn-xs.gold {
  background: #c9a84c !important;
}

#page-estoque .btn-xs.green {
  background: #16a34a !important;
}

#page-estoque .btn-xs.red {
  background: #dc2626 !important;
}

/* fallback: se algum JS antigo ainda renderizar a coluna Local, esconde sem quebrar */
#page-estoque table[data-legacy-local="1"] th:nth-child(6),
#page-estoque table[data-legacy-local="1"] td:nth-child(6) {
  display: none !important;
}

@media (max-width: 1100px) {
  #page-estoque .ap-filters {
    grid-template-columns: 1fr 1fr !important;
  }

  #page-estoque .ap-actions {
    flex-wrap: wrap !important;
  }
}

@media (max-width: 760px) {
  #page-estoque .ap-filters {
    grid-template-columns: 1fr !important;
  }

  #page-estoque table,
  #page-estoque thead,
  #page-estoque tbody,
  #page-estoque th,
  #page-estoque td,
  #page-estoque tr {
    display: block !important;
    width: 100% !important;
  }

  #page-estoque thead {
    display: none !important;
  }

  #page-estoque tbody tr {
    border: 1px solid #e8e1d7 !important;
    border-radius: 14px !important;
    padding: 10px !important;
    margin-bottom: 10px !important;
    background: #fff !important;
  }

  #page-estoque tbody td {
    border: 0 !important;
    padding: 6px 0 !important;
  }

  #page-estoque .ap-actions {
    justify-content: flex-start !important;
  }
}
