.stock-field small,
.order-panel td small {
  display: block;
  margin-top: 5px;
  color: #78908a;
}

.stock-badge {
  display: inline-flex;
  padding: 5px 11px;
  border-radius: 999px;
  background: #edf4f1;
  color: var(--primary, #176b57);
  font-weight: 700;
}

.stock-badge.ordered,
.order-panel .badge.pending {
  background: #fff1d8;
  color: #a66b13;
}

.order-panel .badge.ready {
  background: #e4f4ed;
  color: var(--primary, #176b57);
}

.stock-type {
  min-width: 88px;
}

.invoice-table .stock-type-cell {
  min-width: 104px;
}

.invoice-table .stock-type {
  display: block;
  width: 100%;
  min-width: 96px;
  height: 40px;
  padding: 0 8px;
  border: 1px solid var(--line, #d9e3df);
  border-radius: 7px;
  background: #fff;
}

.invoice-table .stock-type:invalid,
.invoice-table .spec:invalid {
  border-color: #d98572;
  background: #fff8f5;
}

.order-filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) minmax(180px, 1fr) minmax(150px, .8fr) minmax(150px, .8fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid var(--line, #d9e3df);
  border-radius: 18px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 12px 32px rgba(29, 72, 62, .06);
}

.order-filter-bar label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: #61756f;
  font-size: 13px;
}

.order-filter-bar input {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line, #d9e3df);
  border-radius: 10px;
  background: #fff;
}

.order-filter-actions,
.order-tabs {
  display: flex;
  gap: 8px;
}

.fulfillment-panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.fulfillment-batch-button span {
  display: inline-grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  margin-left: 5px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .2);
  font-size: 11px;
}

.fulfillment-list-table .fulfillment-select-cell {
  width: 48px;
  min-width: 48px;
  padding-right: 8px;
  padding-left: 14px;
  text-align: center;
}

.fulfillment-select-cell input {
  width: 19px;
  height: 19px;
  accent-color: var(--primary, #176b57);
  cursor: pointer;
}

.order-filter-actions button {
  height: 44px;
  white-space: nowrap;
}

.order-panel table {
  min-width: 980px;
}

.fulfillment-list-table .fulfillment-product-cell {
  min-width: 360px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.fulfillment-product-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.fulfillment-model {
  color: #183b33;
  font-size: 17px;
  font-weight: 850;
  line-height: 1.25;
  letter-spacing: .01em;
}

.fulfillment-supplier {
  display: inline-flex;
  align-items: center;
  max-width: 180px;
  padding: 4px 9px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary, #176b57) 10%, white);
  color: var(--primary, #176b57);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-panel td .fulfillment-spec {
  margin-top: 6px;
  font-size: 12px;
}

.fulfillment-address.address-cell {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid rgba(116, 143, 135, .18);
}

.fulfillment-address.address-cell > span {
  min-width: 0;
}

.fulfillment-address.address-cell b {
  display: block;
  overflow: hidden;
  color: #506760 !important;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fulfillment-address.address-cell small {
  margin-top: 3px;
  font-size: 11px;
}

.order-summary {
  margin-bottom: 16px;
}

.order-link {
  padding: 7px 0;
  border: 0;
  background: none;
  color: var(--primary, #176b57);
  font-weight: 750;
  text-decoration: underline;
  cursor: pointer;
}

.ship-btn,
.done-text {
  white-space: nowrap;
}

.order-panel button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.done-text {
  color: #67847c;
  font-weight: 700;
}

@media (max-width: 1180px) {
  .order-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .order-search-field,
  .order-filter-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .order-filter-bar {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .order-filter-bar > *,
  .order-search-field,
  .order-filter-actions {
    grid-column: auto;
  }

  .order-filter-actions button {
    flex: 1;
  }

  .order-tabs {
    width: 100%;
  }

  .fulfillment-panel-actions,
  .fulfillment-batch-button {
    width: 100%;
  }

  .order-tabs button {
    flex: 1;
  }
}
