.product-inventory-page {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  min-width: 0;
  gap: 14px;
}

.product-inventory-filter,
.product-inventory-card {
  background: #fff;
  border: 1px solid #d7e2ef;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(21, 54, 93, 0.05);
}

.product-inventory-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 14px;
  padding: 14px 16px;
}

.product-inventory-filter-grid {
  display: grid;
  grid-template-columns: 150px 170px minmax(230px, 1fr) 150px 18px 150px;
  align-items: end;
  gap: 10px;
  flex: 1 1 870px;
  min-width: 0;
}

.product-inventory-filter label:not(.product-inventory-check) {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.product-inventory-filter label > span {
  color: #58708c;
  font-size: 12px;
  font-weight: 700;
}

.product-inventory-filter select,
.product-inventory-filter input[type="date"] {
  width: 100%;
  min-width: 0;
  height: 40px;
  border: 1px solid #c9d8e8;
  border-radius: 7px;
  background: #fff;
  color: #0b315d;
  font-weight: 600;
  padding: 0 11px;
}

.product-inventory-date-separator {
  align-self: end;
  display: grid;
  place-items: center;
  height: 40px;
  color: #71849a;
}

.product-inventory-end-date > span {
  visibility: hidden;
}

.product-inventory-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
  flex-wrap: wrap;
}

.product-inventory-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 4px;
  white-space: nowrap;
  color: #36536f;
  font-size: 13px;
  font-weight: 700;
}

.product-inventory-check input {
  width: 16px;
  height: 16px;
  accent-color: #0b5fb6;
}

.product-inventory-card {
  overflow: hidden;
  min-width: 0;
}

.product-inventory-card > header {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid #dbe5f0;
}

.product-inventory-card > header small {
  display: block;
  margin-bottom: 3px;
  color: #2778ba;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.product-inventory-card > header h2 {
  margin: 0;
  color: #0a3769;
  font-size: 18px;
}

.product-inventory-totals {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.product-inventory-totals span {
  border: 1px solid #d8e5f3;
  border-radius: 999px;
  background: #f5f9fd;
  color: #57708b;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.product-inventory-totals b {
  color: #07549f;
}

.product-inventory-table-wrap {
  max-height: 520px;
  overflow: auto;
}

.product-inventory-table {
  text-align: center;
}

.product-inventory-table th,
.product-inventory-table td {
  height: 46px;
  text-align: center;
  vertical-align: middle;
}

.product-inventory-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.product-inventory-table td.is-incomplete {
  color: #b45b00;
}

.product-inventory-table td.is-complete {
  color: #087b51;
}

.product-inventory-table td.is-shipped {
  color: #426482;
}

.product-inventory-table td.is-stock {
  background: #eff8f3;
  color: #087649;
}
.product-inventory-table td.is-warehouse { background:#edf3ff; color:#3058a2; }
.product-inventory-note { margin:0; padding:12px 18px; font-size:12px; color:#46627e; line-height:1.6; }

.product-inventory-loading,
.product-inventory-error {
  min-height: 260px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 1px solid #d7e2ef;
  border-radius: 12px;
  background: #fff;
  color: #36536f;
  text-align: center;
}

.product-inventory-loading span {
  width: 28px;
  height: 28px;
  border: 3px solid #dbe8f5;
  border-top-color: #0b5fb6;
  border-radius: 50%;
  animation: product-inventory-spin 0.8s linear infinite;
}

@keyframes product-inventory-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1380px) {
  .product-inventory-filter {
    align-items: stretch;
    flex-direction: column;
  }
  .product-inventory-filter-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 900px) {
  .product-inventory-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .product-inventory-date-separator {
    display: none;
  }
  .product-inventory-end-date > span {
    visibility: visible;
  }
  .product-inventory-filter-actions {
    flex-wrap: wrap;
  }
  .product-inventory-card > header {
    align-items: flex-start;
    flex-direction: column;
  }
}
