.smart-search { position: relative; }
.smart-search input { padding-left: 43px; padding-right: 42px; }
.search-icon {
  position: absolute; left: 14px; top: 7px; z-index: 2;
  color: var(--green); font-size: 25px; line-height: 1;
}
.search-clear {
  position: absolute; right: 8px; top: 7px; z-index: 2;
  width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: var(--paper); color: var(--muted); font-size: 20px;
}
.inbound-results {
  display: none; position: absolute; z-index: 8; top: calc(100% + 6px);
  width: 100%; max-height: 350px; overflow: auto;
  border: 1px solid var(--line); border-radius: 12px;
  background: #fff; box-shadow: 0 16px 40px rgba(24,61,47,.16);
}
.inbound-results.open { display: block; }
#order-search-results { max-height: 190px; }
.result-head { padding: 9px 13px; color: var(--muted); font-size: 12px; background: var(--paper); }
.result-row { display: flex; border-top: 1px solid var(--line); background: #fff; }
.result-row:first-of-type { border-top: 0; }
.inbound-results .result-select {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  gap: 12px; padding: 12px 13px; text-align: left;
  border: 0; background: #fff;
}
.inbound-results .result-select:hover { background: var(--green2); }
.detail-link { align-self: stretch; border: 0; border-left: 1px solid var(--line); background: var(--blue2); color: var(--blue); padding: 0 12px; font-weight: 700; }
.result-main { display: flex; flex-direction: column; gap: 3px; }
.result-main b { color: var(--green); font-family: Consolas, monospace; }
.result-main small { color: var(--muted); }
.inbound-results strong { display: flex; flex-direction: column; text-align: right; white-space: nowrap; color: var(--green); }
.inbound-results strong small { color: var(--muted); font-weight: 400; }
mark { padding: 0 2px; border-radius: 3px; background: #ffe9a8; color: inherit; }
.no-result { display: flex; flex-direction: column; gap: 3px; padding: 17px; }
.no-result span { color: var(--muted); }
.selected-product {
  display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 13px;
  border: 1px solid #c9e3d4; border-radius: 11px; background: var(--green2);
}
.selected-product div { flex: 1; }
.selected-product p { margin: 2px 0; color: var(--muted); }
.selected-product strong { text-align: right; color: var(--muted); white-space: nowrap; }
.selected-product em { font-size: 23px; color: var(--green); font-style: normal; }
.reselect-btn { border: 1px solid #bdd8ca; border-radius: 7px; padding: 6px 8px; background: #fff; color: var(--green); }
.product-detail { width: min(520px, 100%); }
.product-detail-image { display: block; width: 100%; max-height: 230px; object-fit: cover; border-radius: 11px; margin: 12px 0; }
.product-detail-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.product-detail-meta p { display: flex; flex-direction: column; gap: 3px; margin: 0; padding: 9px; border-radius: 8px; background: var(--paper); }
.product-detail-meta span { color: var(--muted); }
.product-detail-meta strong { color: var(--green); font-size: 18px; }
.stock-locations { margin: 14px 0; }
.stock-locations h3 { margin: 0 0 7px; font-size: 15px; }
.stock-locations div { display: flex; justify-content: space-between; padding: 9px 10px; border-top: 1px solid var(--line); }
.stock-locations div:first-of-type { border-top: 0; }
.stock-locations b { color: var(--green); }
@media(max-width: 800px) {
  .inbound-results { max-height: 290px; }
  #order-search-results { max-height: 150px; }
  .selected-product { align-items: flex-start; flex-wrap: wrap; }
  .selected-product div { min-width: 150px; }
  .product-detail-meta { grid-template-columns: 1fr; }
}
