.stock-list {padding-bottom: 70px}
.stock-list h1 {margin: 12px 0 14px; font-size: 25px}
.stock-back {
  display: inline-block;
  color: var(--blue);
  padding-block: 5px;
  font-weight: 650;
}
.stock-table {
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  background: var(--white);
}
.stock-table table {width: 100%; border-collapse: collapse; table-layout: fixed}
.stock-table th {
  padding: 9px 12px;
  background: #f8faff;
  color: var(--muted);
  font-size: 12px;
  text-align: left;
}
.stock-table th:last-child {width: 88px; padding-right: 32px; text-align: right}
.stock-table td {
  position: relative;
  border-top: 1px solid #edf0f5;
  font-weight: 650;
}
.stock-table tbody tr:hover {background: #f8faff}
.stock-table td:last-child {
  padding: 8px 32px 8px 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.stock-table .portal-chevron {position: absolute; right: 15px; top: calc(50% - 3px)}
.stock-article {display: block; padding: 8px 12px; overflow-wrap: anywhere}
.stock-article:focus-visible {outline-offset: -3px}
.stock-card-fields {
  margin: 12px 0 0;
  padding-inline: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}
.stock-card-fields div {padding: 14px 0 16px}
.stock-card-fields div + div {border-top: 1px solid var(--line)}
.stock-card-fields dt {margin-bottom: 4px; color: var(--muted); font-size: 13px}
.stock-card-fields dd {margin: 0}
.stock-card-fields h1,
.stock-card-fields strong {font-size: 25px; font-weight: 700; overflow-wrap: anywhere}
.stock-actions {
  position: fixed;
  z-index: 1;
  inset: auto 0 0;
  padding: 9px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--white);
  border-top: 1px solid var(--line);
}
.stock-actions-inner {
  max-width: 712px;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: 8px;
}
.stock-scan-button,
.stock-search-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 9px;
  font-weight: 700;
}
.stock-scan-button {border: 1px solid var(--blue); color: var(--white); background: var(--blue)}
.stock-search-button {border: 1px solid #ccdafb; color: var(--blue); background: var(--blue-soft)}
.stock-icon-scan,
.stock-icon-search {position: relative; display: inline-block; width: 18px; height: 18px; flex: none}
.stock-icon-scan {border: 1.5px solid currentColor; border-radius: 3px}
.stock-icon-scan::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: repeating-linear-gradient(90deg,currentColor 0 1px,transparent 1px 3px);
}
.stock-icon-search::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: 10px;
  height: 10px;
  border: 1.6px solid currentColor;
  border-radius: 50%;
}
.stock-icon-search::after {
  content: "";
  position: absolute;
  top: 13px;
  left: 11px;
  width: 7px;
  height: 1.7px;
  transform: rotate(45deg);
  background: currentColor;
}
.portal:has(dialog[open]) {overflow: hidden}
.stock-search,
.stock-scanner {
  padding: 0;
  color: var(--ink);
  border: 0;
  border-radius: 14px;
}
.stock-search::backdrop,
.stock-scanner::backdrop {background: #17233675}
.stock-search {
  width: min(460px, 100%);
  max-width: 100%;
  max-height: min(72dvh, 560px);
  padding: 16px;
}
.stock-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.stock-close {
  display: grid;
  min-width: 40px;
  min-height: 40px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font-size: 23px;
}
.stock-search-input {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  padding: 0 9px;
  color: var(--blue);
  border: 1px solid #9db7f8;
  border-radius: 8px;
}
.stock-search-input:focus-within {box-shadow: 0 0 0 2px var(--blue-soft)}
.stock-search-input input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
}
.stock-search-input input:focus-visible {outline: none}
.stock-search-status {margin: 13px 0 0; color: var(--muted)}
.stock-search-table {margin-top: 12px}
.stock-scanner {
  width: min(540px, 100%);
  max-height: 95dvh;
  color: var(--white);
  background: #182131;
}
.stock-scanner .stock-dialog-head {justify-content: flex-start; margin: 0; padding: 8px}
.stock-scanner h2 {font-size: 17px}
.stock-camera {
  position: relative;
  display: grid;
  place-items: center;
  height: min(57dvh, 380px);
  overflow: hidden;
  background: #101826;
}
.stock-camera video {width: 100%; height: 100%; object-fit: cover; min-height: 0}
.stock-camera-frame {
  position: absolute;
  width: 78%;
  height: 34%;
  border-radius: 8px;
  box-shadow: 0 0 0 500px #080d1485;
  pointer-events: none;
}
.stock-camera-frame::after {
  content: "";
  position: absolute;
  inset: 50% 7px auto;
  border-top: 2px solid #83a7ff;
}
.stock-camera-frame i {position: absolute; width: 20px; height: 20px; border: 3px solid #f1f6ff}
.stock-camera-frame i:nth-child(1) {top: 0; left: 0; border-width: 3px 0 0 3px; border-top-left-radius: 8px}
.stock-camera-frame i:nth-child(2) {top: 0; right: 0; border-width: 3px 3px 0 0; border-top-right-radius: 8px}
.stock-camera-frame i:nth-child(3) {bottom: 0; left: 0; border-width: 0 0 3px 3px; border-bottom-left-radius: 8px}
.stock-camera-frame i:nth-child(4) {bottom: 0; right: 0; border-width: 0 3px 3px 0; border-bottom-right-radius: 8px}
.stock-scan-status {padding: 12px 16px; text-align: center}
@media (max-width: 600px) {
  .stock-search {inset: auto 0 0; margin: 0; width: 100%; border-radius: 16px 16px 0 0; padding-bottom: calc(16px + env(safe-area-inset-bottom))}
  .stock-scanner {inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; border-radius: 0}
  .stock-scanner[open] {display: flex; flex-direction: column}
  .stock-camera {flex: 1; min-height: 0}
}
