/* Histórico de estoque: leitura e alinhamento pensados para desktop. */
.stock-panel .stock-history-filters {
  grid-template-columns: minmax(320px, 1fr) max-content max-content;
  align-items: center;
  gap: 10px;
  margin-bottom: 7px;
  padding: 6px 8px;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  background: linear-gradient(145deg, #f7f9fc, #f1f5f9);
}

.stock-panel .stock-history-filters > label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: #52627a;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.stock-panel .stock-history-filters input,
.stock-panel .stock-history-filters select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding-block: 7px;
  border-color: #cfd9e7;
  background: #fff;
}

.stock-panel .stock-history-filters .stock-search {
  position: relative;
  display: block;
  height: 38px;
}

.stock-panel .stock-history-filters .stock-search input {
  height: 38px;
  padding-left: 43px;
}

.stock-panel .stock-history-filters > label:not(.stock-search) select {
  width: 132px;
}

.stock-panel .stock-history-filters .stock-search > span {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 15px;
  width: 18px;
  height: 18px;
  color: transparent;
  font-size: 0;
  transform: translateY(-50%);
  pointer-events: none;
}

.stock-panel .stock-history-filters .stock-search > span::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: 10px;
  height: 10px;
  border: 2px solid #31557f;
  border-radius: 50%;
}

.stock-panel .stock-history-filters .stock-search > span::after {
  content: "";
  position: absolute;
  right: 1px;
  bottom: 2px;
  width: 7px;
  height: 2px;
  border-radius: 2px;
  background: #31557f;
  transform: rotate(45deg);
  transform-origin: right center;
}

.stock-panel .stock-period-summary {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: start;
  gap: 7px;
  margin-bottom: 6px;
  overflow-x: auto;
}

.stock-panel .stock-period-summary > span,
.stock-panel .stock-period-summary > small {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid #dce4ee;
  border-radius: 9px;
  background: #f8fafc;
  color: #52627a;
  font-size: 11px;
  font-weight: 800;
}

.stock-panel .stock-period-summary > span:first-child {
  border-color: #bfe5d2;
  background: #eefaf4;
}

.stock-panel .stock-period-summary > span:nth-child(2) {
  border-color: #f0cbc7;
  background: #fff4f3;
}

.stock-panel .stock-period-summary b {
  color: #087847;
  font-size: 15px;
  line-height: 1;
}

.stock-panel .stock-period-summary > span:nth-child(2) b {
  color: #b3261e;
}

.stock-panel .stock-period-summary > small {
  justify-self: start;
  justify-content: center;
  min-width: 0;
  color: var(--navy);
  font-size: 11px;
}

.stock-panel .stock-movement-list {
  gap: 8px;
}

.stock-panel .stock-replenishment-list {
  gap: 8px;
}

.stock-panel .stock-movement-row {
  grid-template-columns: 44px minmax(0, 1fr) minmax(64px, auto) 18px;
  min-height: 72px;
  gap: 13px;
  padding: 11px 14px;
  border-color: #d9e2ed;
  background: #fff;
  box-shadow: 0 3px 10px rgba(8, 38, 95, .035);
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.stock-panel .stock-movement-row:nth-child(even) {
  background: #f8fafc;
}

.stock-panel .stock-movement-row:hover {
  border-color: #e0b93b;
  background: #fffdf5;
  box-shadow: 0 7px 18px rgba(8, 38, 95, .075);
}

.stock-panel .stock-movement-row > div b {
  color: var(--navy);
  font-size: 14px;
}

.stock-panel .stock-movement-row > div small {
  margin-top: 3px;
  color: #607089;
  font-size: 11px;
  line-height: 1.35;
}

.stock-panel .stock-movement-row > strong {
  min-width: 56px;
  padding: 7px 9px;
  border-radius: 9px;
  background: #e8f7ef;
  color: #087847;
  font-size: 14px;
  text-align: center;
}

.stock-panel .stock-movement-row > strong.negative {
  background: #ffe9e7;
  color: #b3261e;
}

.stock-panel .stock-movement-row > i {
  color: #8290a5;
  font-size: 20px;
}

.stock-panel .stock-replenishment-row {
  grid-template-columns: 44px minmax(0, 1fr) minmax(92px, auto) 18px;
  min-height: 72px;
  gap: 13px;
  padding: 11px 14px;
  border-color: #d9e2ed;
  background: #fff;
  box-shadow: 0 3px 10px rgba(8, 38, 95, .035);
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.stock-panel .stock-replenishment-row:nth-child(even) {
  background: #f8fafc;
}

.stock-panel .stock-replenishment-row:hover {
  border-color: #e0b93b;
  background: #fffdf5;
  box-shadow: 0 7px 18px rgba(8, 38, 95, .075);
}

.stock-panel .stock-replenishment-row .stock-session-icon {
  width: 44px;
  height: 44px;
  border: 1px solid #efcf68;
  border-radius: 12px;
  background: #fff4cb;
  color: var(--navy);
  font-size: 19px;
}

.stock-panel .stock-replenishment-row > div b {
  color: var(--navy);
  font-size: 14px;
}

.stock-panel .stock-replenishment-row > div small {
  margin-top: 3px;
  color: #607089;
  font-size: 11px;
  line-height: 1.35;
}

.stock-panel .stock-replenishment-row > strong {
  padding: 7px 10px;
  border: 1px solid #d9e2ed;
  border-radius: 9px;
  background: #f5f8fc;
  color: var(--navy);
  font-size: 11px;
  text-align: center;
  white-space: nowrap;
}

.stock-panel .stock-replenishment-row > i {
  color: #8290a5;
  font-size: 20px;
}

@media (max-width: 900px) {
  .stock-panel .stock-history-filters {
    grid-template-columns: 1fr 1fr;
    padding: 8px;
  }

  .stock-panel .stock-history-filters .stock-search {
    grid-column: 1 / -1;
  }

  .stock-panel .stock-history-filters > label:not(.stock-search) select {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .stock-panel .stock-history-filters {
    grid-template-columns: 1fr;
  }
}
