/* Store Ops 2.0: pages-a styles (records, inventory, stock adjust, returns, SKU). Loaded after admin.css and base.css.
   Every rule is scoped to its page root ([data-order-records], [data-transactions], [data-stock-adjustments],
   [data-returns-page], [data-sku-db]) and starts with :root so it also wins over admin.css's light-theme rules.
   The shell owns the panel box around <main>; these rules lay out only what is inside it.
   Desktop-only layout sits under html[data-device="computer"]; phones keep the old stacking with the new look. */

/* ---------- Shared bits for these pages ---------- */
:root :is(.admin-order-records-layout, .admin-order-records-drawer, .admin-po-receiving, .admin-stock-adjust-layout, .admin-returns-layout, [data-sku-db] .admin-layout) [hidden],
:root .admin-order-records-drawer[hidden] {
  display: none !important;
}

:root :is([data-order-records], [data-transactions], [data-stock-adjustments], [data-returns-page], [data-sku-db]) :is(.admin-order-records-layout, .admin-order-records-drawer, .admin-po-receiving, .admin-stock-adjust-layout, .admin-returns-layout, .admin-layout) {
  font-size: 13.5px;
  line-height: 1.4;
}

/* Pill field: 34px, thin line, transparent. */
:root [data-order-records] :is(.admin-order-records-filters, .admin-order-records-repair-panel) :is(input, select),
:root [data-sku-db] .admin-sku-form-grid :is(input, select),
:root [data-returns-page] .admin-returns-layout :is(input[name="order_query"], input[name="quote_amount"], select) {
  box-sizing: border-box;
  height: 34px;
  min-height: 0;
  padding: 0 14px;
  border: 1px solid var(--so-line2);
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  color: var(--so-ink);
  font-family: var(--so-font);
  font-size: 12.5px;
  font-weight: 400;
  transition: border-color 0.25s var(--so-ease), box-shadow 0.25s var(--so-ease);
}

:root [data-order-records] :is(.admin-order-records-filters, .admin-order-records-repair-panel) :is(input, select):hover,
:root [data-sku-db] .admin-sku-form-grid :is(input, select):hover,
:root [data-returns-page] .admin-returns-layout :is(input[name="order_query"], input[name="quote_amount"], select):hover:not(:disabled) {
  border-color: var(--so-ink3);
}

:root [data-order-records] :is(.admin-order-records-filters, .admin-order-records-repair-panel) :is(input, select):focus,
:root [data-sku-db] .admin-sku-form-grid :is(input, select):focus,
:root [data-returns-page] .admin-returns-layout :is(input, select):focus {
  outline: none;
  border-color: var(--so-ink3);
  box-shadow: 0 0 0 4px var(--so-line);
}

:root :is([data-order-records], [data-sku-db], [data-returns-page], [data-transactions]) :is(input, select)::placeholder {
  color: var(--so-ink3);
  opacity: 1;
}

:root :is([data-order-records], [data-sku-db], [data-returns-page]) select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  cursor: pointer;
  color-scheme: dark;
}

:root[data-admin-theme='light'] :is([data-order-records], [data-sku-db], [data-returns-page], [data-transactions]) :is(input, select) {
  color-scheme: light;
}

:root :is([data-order-records], [data-sku-db], [data-returns-page]) select option {
  background: var(--so-card);
  color: var(--so-ink);
}

/* A chevron for the pill selects, drawn on the wrapping label. */
:root [data-order-records] .admin-order-records-filters label:has(> select),
:root [data-sku-db] .admin-sku-form-grid label:has(> select),
:root [data-returns-page] .admin-returns-partner-select {
  position: relative;
}

:root [data-order-records] .admin-order-records-filters label:has(> select)::after,
:root [data-sku-db] .admin-sku-form-grid label:has(> select)::after,
:root [data-returns-page] .admin-returns-partner-select::after {
  content: '';
  position: absolute;
  right: 13px;
  bottom: 10px;
  width: 14px;
  height: 14px;
  background: var(--so-ink3);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") center / contain no-repeat;
  pointer-events: none;
}

/* Buttons inside these pages: primary = solid ink pill, ghost = thin line pill. */
:root :is([data-order-records], [data-returns-page]) :is(.admin-order-records-layout, .admin-returns-layout) .admin-primary-btn,
:root [data-order-records] .admin-order-records-layout .admin-ghost-btn,
:root [data-returns-page] .admin-returns-layout .admin-ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-sizing: border-box;
  height: 34px;
  min-height: 0;
  padding: 0 16px;
  border: 1px solid var(--so-ink);
  border-radius: 999px;
  background: var(--so-ink);
  box-shadow: none;
  color: var(--so-panel);
  font-family: var(--so-font);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.35s var(--so-ease), background-color 0.25s, border-color 0.25s, color 0.25s, opacity 0.25s;
}

:root [data-order-records] .admin-order-records-layout .admin-ghost-btn,
:root [data-returns-page] .admin-returns-layout .admin-ghost-btn {
  padding: 0 14px;
  border-color: var(--so-line2);
  background: transparent;
  color: var(--so-ink);
  font-weight: 500;
}

:root :is([data-order-records], [data-returns-page]) :is(.admin-primary-btn, .admin-ghost-btn):hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: none;
}

:root :is([data-order-records], [data-returns-page]) .admin-ghost-btn:hover:not(:disabled) {
  border-color: var(--so-ink3);
  background: transparent;
}

:root :is([data-order-records], [data-returns-page]) :is(.admin-primary-btn, .admin-ghost-btn):active:not(:disabled) {
  transform: translateY(0) scale(0.97);
  transition-duration: 0.08s;
}

:root :is([data-order-records], [data-returns-page]) :is(.admin-order-records-layout, .admin-returns-layout) :is(.admin-primary-btn, .admin-ghost-btn):disabled {
  border-color: var(--so-line);
  background: transparent;
  color: var(--so-ink3);
  cursor: not-allowed;
  transform: none;
}

/* ---------- Order Records ---------- */
:root [data-order-records] .admin-order-records-layout {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: auto;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

/* Range snapshot strip */
:root [data-order-records] .admin-order-records-metrics {
  gap: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--so-line);
  border-radius: 16px;
  background: transparent;
  box-shadow: none;
  animation: so-rise 0.55s var(--so-ease) both;
}

:root [data-order-records] .admin-order-records-metrics > header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-height: 0;
  padding: 10px 16px;
  border-color: var(--so-line);
}

html[data-device="computer"] [data-order-records] .admin-order-records-metrics {
  grid-template-columns: minmax(150px, 1.1fr) repeat(3, minmax(96px, 0.75fr)) minmax(230px, 2.2fr);
}

html[data-device="computer"] [data-order-records] .admin-order-records-metrics > header {
  grid-column: auto;
  border: 0;
}

html[data-device="computer"] [data-order-records] .admin-order-records-metrics > .admin-order-record-stat {
  border: 0;
  border-left: 1px solid var(--so-line);
}

:root [data-order-records] .admin-order-records-metrics > header span {
  color: var(--so-ink);
  font: 600 13px/1.3 var(--so-font);
  letter-spacing: 0;
  text-transform: none;
}

:root [data-order-records] .admin-order-records-metrics > header small {
  color: var(--so-ink3);
  font-size: 11.5px;
  font-weight: 400;
}

:root [data-order-records] .admin-order-record-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  min-width: 0;
  min-height: 0;
  padding: 10px 16px;
  border-color: var(--so-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

:root [data-order-records] .admin-order-record-stat small,
:root [data-order-records] .admin-order-record-stat p {
  color: var(--so-ink3);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

:root [data-order-records] .admin-order-record-stat strong {
  color: var(--so-ink);
  font: 600 19px/1.25 var(--so-mono);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

:root [data-order-records] .admin-order-record-stat.is-duration {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: 'label label' 'value context';
  align-items: baseline;
  justify-content: stretch;
  gap: 1px 12px;
}

:root [data-order-records] .admin-order-record-stat.is-duration > span {
  display: contents;
}

:root [data-order-records] .admin-order-record-stat.is-duration small {
  grid-area: label;
}

:root [data-order-records] .admin-order-record-stat.is-duration strong {
  grid-area: value;
}

:root [data-order-records] .admin-order-record-stat.is-duration p {
  grid-area: context;
  max-width: none;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--so-ink2);
  font-size: 12px;
  line-height: 1.4;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Branch-only repair */
:root [data-order-records] .admin-order-records-repair-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 14px;
  padding: 12px 14px 12px 16px;
  border: 1px solid var(--so-line);
  border-radius: 16px;
  background: transparent;
  box-shadow: none;
  animation: so-rise 0.55s var(--so-ease) 0.05s both;
}

:root [data-order-records] .admin-order-records-repair-panel > div {
  display: block;
  flex: 1 1 330px;
  min-width: 0;
  padding-bottom: 1px;
}

:root [data-order-records] .admin-order-records-repair-panel > div > span {
  display: none;
}

:root [data-order-records] .admin-order-records-repair-panel h2 {
  margin: 0;
  color: var(--so-ink);
  font: 600 14px/1.35 var(--so-font);
  letter-spacing: 0;
}

:root [data-order-records] .admin-order-records-repair-panel > div > p {
  margin: 2px 0 0;
  color: var(--so-ink2);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
}

:root [data-order-records] .admin-order-records-repair-panel form {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 14px;
  min-width: 0;
}

:root [data-order-records] .admin-order-records-repair-panel label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

:root [data-order-records] .admin-order-records-repair-panel label:has([data-order-records-repair-order]) {
  flex: 0 1 210px;
}

:root [data-order-records] .admin-order-records-repair-panel label:has([data-order-records-repair-passcode]) {
  flex: 0 1 170px;
}

:root [data-order-records] .admin-order-records-repair-panel label > span {
  color: var(--so-ink3);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

:root [data-order-records] .admin-order-records-repair-panel [data-order-records-repair-order] {
  font-family: var(--so-mono);
}

html[data-device="computer"] [data-order-records] .admin-order-records-repair-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: end;
}

html[data-device="computer"] [data-order-records] .admin-order-records-repair-panel form {
  flex-wrap: nowrap;
}

html[data-device="computer"] [data-order-records] .admin-order-records-repair-panel label:has([data-order-records-repair-order]) {
  flex: 0 0 210px;
}

html[data-device="computer"] [data-order-records] .admin-order-records-repair-panel label:has([data-order-records-repair-passcode]) {
  flex: 0 0 170px;
}

html[data-device="computer"] [data-order-records] .admin-order-records-repair-panel .admin-primary-btn {
  flex: none;
}

html[data-device="computer"] [data-order-records] .admin-order-records-repair-result {
  grid-column: 1 / -1;
}

:root [data-order-records] .admin-order-records-repair-panel input {
  width: 100%;
}

:root [data-order-records] .admin-order-records-repair-result {
  flex: 1 0 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--so-mint) !important;
  font-size: 12.5px;
  font-weight: 600;
  animation: so-rise 0.4s var(--so-ease) both;
}

:root [data-order-records] .admin-order-records-repair-result.is-error {
  border: 0;
  background: transparent;
  color: var(--so-red) !important;
}

/* History head, filters and table: one flat workspace */
:root [data-order-records] .admin-order-records-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

:root [data-order-records] .admin-order-records-history-head {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  padding: 0;
  border: 0;
}

:root [data-order-records] .admin-order-records-history-head > div {
  display: block;
}

:root [data-order-records] .admin-order-records-history-head > div > span {
  display: none;
}

:root [data-order-records] .admin-order-records-history-head h2 {
  margin: 0;
  color: var(--so-ink);
  font: 600 15px/1.3 var(--so-font);
  letter-spacing: -0.01em;
}

:root [data-order-records] .admin-order-records-history-head > small {
  color: var(--so-ink2);
  font-size: 12.5px;
  font-weight: 400;
}

:root [data-order-records] .admin-order-records-filter-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

:root [data-order-records] .admin-order-records-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin: 0;
}

:root [data-order-records] .admin-order-records-filter-intro {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  justify-content: flex-end;
  align-self: flex-end;
  gap: 1px;
  min-height: 0;
  padding: 0 0 1px;
  border: 0;
}

:root [data-order-records] .admin-order-records-filter-intro span {
  color: var(--so-ink);
  font-size: 13px;
  font-weight: 600;
}

:root [data-order-records] .admin-order-records-filter-intro small {
  color: var(--so-ink3);
  font-size: 11.5px;
  font-weight: 400;
}

:root [data-order-records] .admin-order-records-filters label {
  display: flex;
  flex: 1 1 120px;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

:root [data-order-records] .admin-order-records-filters label:has(> select) {
  flex: 0 1 142px;
}

:root [data-order-records] .admin-order-records-filters label:has([data-order-records-source]) {
  flex: 1.5 1 120px;
}

:root [data-order-records] .admin-order-records-filters :is([data-order-records-source], [data-order-records-query]) {
  font-size: 12px;
  text-overflow: ellipsis;
}

html[data-device="computer"] [data-order-records] .admin-order-record-stat.is-duration p {
  display: block;
}

@media (max-width: 1399px) {
  html[data-device="computer"] [data-order-records] .admin-order-records-filter-intro {
    display: none;
  }

  html[data-device="computer"] [data-order-records] .admin-order-records-date-range label > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  html[data-device="computer"] [data-order-records] .admin-order-records-filters label:has(> select) {
    flex-basis: 132px;
  }
}

:root [data-order-records] .admin-order-records-filters label > span,
:root [data-order-records] .admin-order-records-date-range legend {
  color: var(--so-ink3);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

:root [data-order-records] .admin-order-records-filters [data-order-records-query] {
  font-family: var(--so-mono);
}

/* Date window: legend on top, one pill around From → To. */
:root [data-order-records] .admin-order-records-date-range {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 0 6px;
  min-width: 0;
  margin: 0;
  padding: 0 8px 0 14px;
  border: 0;
}

:root [data-order-records] .admin-order-records-date-range::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 34px;
  box-sizing: border-box;
  border: 1px solid var(--so-line2);
  border-radius: 999px;
  pointer-events: none;
  transition: border-color 0.25s var(--so-ease), box-shadow 0.25s var(--so-ease);
}

:root [data-order-records] .admin-order-records-date-range:hover::after {
  border-color: var(--so-ink3);
}

:root [data-order-records] .admin-order-records-date-range:focus-within::after {
  border-color: var(--so-ink3);
  box-shadow: 0 0 0 4px var(--so-line);
}

:root [data-order-records] .admin-order-records-date-range legend {
  float: left;
  grid-column: 1 / -1;
  width: auto;
  margin: 0 0 5px -14px;
  padding: 0;
}

:root [data-order-records] .admin-order-records-date-range label {
  display: flex;
  flex: 0 0 auto;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  height: 34px;
}

:root [data-order-records] .admin-order-records-date-range label > span {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  clip-path: none;
}

:root [data-order-records] .admin-order-records-date-range input {
  width: 102px;
  height: 26px;
  padding: 0 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  font-family: var(--so-mono);
  font-size: 12px;
}

:root [data-order-records] .admin-order-records-date-range input:hover,
:root [data-order-records] .admin-order-records-date-range input:focus {
  border: 0;
  box-shadow: none;
}

:root [data-order-records] .admin-order-records-date-range input::-webkit-calendar-picker-indicator {
  opacity: 0.55;
  cursor: pointer;
}

:root [data-order-records] .admin-order-records-date-range i {
  align-self: center;
  margin: 0;
  color: var(--so-ink3);
  font-size: 13px;
  font-style: normal;
}

:root [data-order-records] .admin-order-records-filter-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

:root [data-order-records] .admin-order-records-filter-actions .admin-primary-btn {
  min-width: 104px;
}

:root [data-order-records] .admin-order-records-filter-panel .admin-form-error {
  margin: -2px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--so-red);
  font-size: 12.5px;
  font-weight: 600;
  animation: so-rise 0.4s var(--so-ease) both;
}

/* Table: compact 46px rows; scrolls inside its own box. */
:root [data-order-records] .admin-order-records-table-wrap {
  max-height: none;
  min-height: 220px;
  overflow: auto;
  border: 0;
  border-top: 1px solid var(--so-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  scrollbar-width: thin;
  scrollbar-color: var(--so-line2) transparent;
}

/* On computers the table fills the rest of the panel and scrolls inside it. */
html[data-device="computer"] [data-order-records] .admin-order-records-panel {
  flex: 1 1 0;
  min-height: 0;
}

html[data-device="computer"] [data-order-records] .admin-order-records-table-wrap {
  flex: 1 1 0;
}

:root [data-order-records] .admin-order-records-table {
  width: 100%;
  table-layout: auto;
  border-collapse: collapse;
  border-spacing: 0;
  background: transparent;
}

:root [data-order-records] .admin-order-records-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--so-panel);
}

:root [data-order-records] .admin-order-records-table th {
  height: 34px;
  padding: 0 8px;
  border: 0;
  border-bottom: 1px solid var(--so-line);
  background: var(--so-panel);
  color: var(--so-ink3);
  font: 600 10.5px/1 var(--so-font);
  letter-spacing: 0.07em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

:root [data-order-records] .admin-order-records-table th:nth-child(1) { width: 22%; }
:root [data-order-records] .admin-order-records-table th:nth-child(5) { width: 16%; }

:root [data-order-records] .admin-order-records-table :is(th, td):first-child {
  padding-left: 12px;
}

:root [data-order-records] .admin-order-records-table :is(th, td):last-child {
  padding-right: 12px;
}

:root [data-order-records] .admin-order-records-table td {
  height: 46px;
  padding: 0 8px;
  border: 0;
  border-bottom: 1px solid var(--so-line);
  background: transparent;
  color: var(--so-ink);
  font-size: 12.5px;
  vertical-align: middle;
  white-space: nowrap;
}

:root [data-order-records] .admin-order-records-table tbody tr:last-child td {
  border-bottom: 1px solid var(--so-line);
}

:root [data-order-records] .admin-order-records-table td.admin-empty {
  height: auto;
  padding: 18px 12px;
  color: var(--so-ink3);
  font-size: 13px;
  font-weight: 400;
  text-align: left;
  white-space: normal;
  animation: so-rise 0.5s var(--so-ease) both;
}

:root [data-order-records] .admin-order-record-row {
  cursor: pointer;
  transition: background-color 0.2s;
  animation: so-rise 0.45s var(--so-ease) both;
}

:root [data-order-records] .admin-order-record-row:nth-child(2) { animation-delay: 30ms; }
:root [data-order-records] .admin-order-record-row:nth-child(3) { animation-delay: 60ms; }
:root [data-order-records] .admin-order-record-row:nth-child(4) { animation-delay: 90ms; }
:root [data-order-records] .admin-order-record-row:nth-child(5) { animation-delay: 120ms; }
:root [data-order-records] .admin-order-record-row:nth-child(6) { animation-delay: 150ms; }
:root [data-order-records] .admin-order-record-row:nth-child(7) { animation-delay: 180ms; }
:root [data-order-records] .admin-order-record-row:nth-child(8) { animation-delay: 210ms; }
:root [data-order-records] .admin-order-record-row:nth-child(n+9) { animation-delay: 240ms; }

:root [data-order-records] .admin-order-record-row:hover,
:root [data-order-records] .admin-order-record-row:focus-visible {
  background: var(--so-card2);
  outline: none;
}

:root [data-order-records] .admin-order-record-row:focus-visible td:first-child {
  box-shadow: inset 2px 0 0 var(--so-ink2);
}

:root [data-order-records] .admin-order-record-row td:first-child strong {
  display: inline;
  color: var(--so-ink);
  font: 600 12.5px/1 var(--so-mono);
}

:root [data-order-records] .admin-order-record-row td:first-child small {
  display: inline-flex;
  margin: 0 0 0 10px;
  vertical-align: 1px;
}

:root [data-order-records] .admin-order-record-row .admin-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--so-ink3);
  font: 400 11px/1 var(--so-font);
  letter-spacing: 0;
  text-transform: none;
}

:root [data-order-records] .admin-order-record-row .admin-status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--so-mint);
}

:root [data-order-records] .admin-order-record-row td:nth-child(2) strong {
  display: block;
  color: var(--so-ink);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
}

:root [data-order-records] .admin-order-record-row td:nth-child(2) small {
  display: block;
  margin: 0;
  color: var(--so-ink3);
  font: 400 10.5px/1.35 var(--so-mono);
}

:root [data-order-records] .admin-order-record-row td:nth-child(2) small:empty {
  display: none;
}

:root [data-order-records] .admin-order-record-customer {
  display: block;
  max-width: 220px;
  overflow: hidden;
  color: var(--so-ink);
  font-size: 12.5px;
  font-weight: 500;
  text-overflow: ellipsis;
}

:root [data-order-records] .admin-order-record-operator {
  display: inline;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--so-ink2);
  font-size: 12.5px;
  font-weight: 400;
}

:root [data-order-records] .admin-order-record-scan,
:root [data-order-records] .admin-order-record-duration {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  width: auto;
  height: 22px;
  min-height: 0;
  padding: 0 9px;
  border: 1px solid var(--so-line2);
  border-radius: 999px;
  background: transparent;
  color: var(--so-ink2);
  font: 400 11px/1 var(--so-mono);
  vertical-align: middle;
}

:root [data-order-records] .admin-order-record-scan.is-error {
  border-color: var(--so-red);
  color: var(--so-red);
}

:root [data-order-records] .admin-order-record-row td small.is-error {
  display: inline;
  margin: 0 0 0 8px;
  color: var(--so-red);
  font: 600 11px/1 var(--so-font);
  vertical-align: middle;
}

:root [data-order-records] .admin-order-record-row td:nth-child(6) {
  color: var(--so-ink2);
  font-family: var(--so-mono);
  font-size: 11.5px;
}

:root [data-order-records] .admin-order-record-duration {
  color: var(--so-ink);
}

:root [data-order-records] .admin-order-record-duration.is-missing {
  border-color: var(--so-line);
  background: transparent;
  color: var(--so-ink3);
}

/* Order details: a sheet that slides in from the right. */
:root [data-order-records] .admin-order-records-drawer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: block;
  padding: 0;
}

:root [data-order-records] .admin-order-records-drawer .admin-modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--so-scrim);
  backdrop-filter: none;
  animation: so-fade 0.45s var(--so-ease) both;
}

:root [data-order-records] .admin-order-records-drawer-card {
  position: absolute;
  top: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: min(640px, calc(100vw - 20px));
  height: auto;
  max-height: none;
  box-sizing: border-box;
  padding: 0 0 26px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 0;
  border-radius: 30px !important;
  background: var(--so-panel);
  box-shadow: var(--so-sh2);
  color: var(--so-ink);
  scrollbar-width: thin;
  scrollbar-color: var(--so-line2) transparent;
  animation: pa-sheet-in 0.6s var(--so-ease) both;
}

/* Phones: a full-height sheet with a small margin all round. */
html:not([data-device="computer"]) [data-order-records] .admin-order-records-drawer-card {
  inset: 6px;
  width: auto;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0 0 22px;
  border-radius: 24px !important;
}

html:not([data-device="computer"]) [data-order-records] .admin-order-records-drawer-card .admin-modal-head {
  padding: 18px 16px 14px 20px;
}

html:not([data-device="computer"]) [data-order-records] .admin-order-records-detail-section {
  padding: 0 20px;
}

@keyframes pa-sheet-in {
  from { transform: translate3d(calc(100% + 24px), 0, 0); }
  to { transform: none; }
}

:root [data-order-records] .admin-order-records-drawer-card .admin-modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin: 0;
  padding: 22px 22px 16px 26px;
  border-bottom: 1px solid var(--so-line);
  background: var(--so-panel);
}

:root [data-order-records] .admin-order-records-drawer-card .admin-modal-head > div {
  flex: 1;
  min-width: 0;
}

:root [data-order-records] .admin-order-records-drawer-card .admin-panel-kicker {
  display: none;
}

:root [data-order-records] .admin-order-records-drawer-card h3 {
  margin: 0;
  overflow: hidden;
  color: var(--so-ink);
  font: 600 19px/1.3 var(--so-mono);
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

:root [data-order-records] .admin-order-records-drawer-card [data-order-records-drawer-meta] {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 0;
  margin: 5px 0 0;
  color: var(--so-ink2);
  font-size: 12.5px;
  font-weight: 400;
}

:root [data-order-records] .admin-order-records-drawer-card [data-order-records-drawer-meta] :is(span, time) {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--so-ink2);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.4;
}

:root [data-order-records] .admin-order-records-drawer-card [data-order-records-drawer-meta] time {
  font-family: var(--so-mono);
  font-size: 12px;
}

:root [data-order-records] .admin-order-records-drawer-card [data-order-records-drawer-meta] > * + *::before {
  content: '·';
  padding: 0 7px;
  color: var(--so-ink3);
  font-family: var(--so-font);
}

:root [data-order-records] .admin-order-records-drawer-close-btn {
  display: grid;
  flex: none;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--so-line2);
  border-radius: 50%;
  background: transparent;
  color: var(--so-ink);
  cursor: pointer;
  transition: transform 0.35s var(--so-ease), border-color 0.25s;
}

:root [data-order-records] .admin-order-records-drawer-close-btn:hover {
  border-color: var(--so-ink3);
  background: transparent;
  transform: rotate(90deg);
}

:root [data-order-records] .admin-order-records-drawer-close-btn svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
}

:root [data-order-records] .admin-order-records-detail-section {
  display: block;
  margin: 0;
  padding: 0 26px;
}

:root [data-order-records] .admin-order-records-detail-section h4 {
  margin: 0 0 8px;
  color: var(--so-ink);
  font: 600 14px/1.3 var(--so-font);
  letter-spacing: 0;
  text-transform: none;
}

:root [data-order-records] .admin-order-records-detail-section:last-child h4 {
  margin-bottom: 12px;
}

:root [data-order-records] .admin-order-records-drawer-card .admin-empty {
  margin: 0;
  padding: 10px 0;
  border: 0;
  background: transparent;
  color: var(--so-ink3);
  font-size: 13px;
  font-weight: 400;
  text-align: left;
}

:root [data-order-records] [data-order-records-items-body] > .admin-empty {
  animation: so-breathe 1.2s ease-in-out infinite;
}

:root [data-order-records] .admin-order-records-drawer-card .admin-form-error {
  margin: 0;
  padding: 10px 0;
  border: 0;
  background: transparent;
  color: var(--so-red);
  font-size: 13px;
  font-weight: 600;
  animation: so-rise 0.45s var(--so-ease) both;
}

:root [data-order-records] .admin-order-record-products-list {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

:root [data-order-records] .admin-order-record-products-list > header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-height: 0;
  padding: 0 0 8px;
  border: 0;
  color: var(--so-ink3);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  animation: so-rise 0.45s var(--so-ease) both;
}

:root [data-order-records] .admin-order-record-products-list > header span {
  flex: 1;
}

:root [data-order-records] .admin-order-record-products-list > header strong {
  color: var(--so-ink);
  font: 600 12.5px/1.3 var(--so-mono);
}

:root [data-order-records] .admin-order-record-products-list .admin-order-record-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--so-line);
  border-radius: 0;
  background: transparent;
  animation: so-rise 0.45s var(--so-ease) both;
}

:root [data-order-records] .admin-order-record-products-list .admin-order-record-item:nth-of-type(2) { animation-delay: 40ms; }
:root [data-order-records] .admin-order-record-products-list .admin-order-record-item:nth-of-type(n+3) { animation-delay: 80ms; }

:root [data-order-records] .admin-order-record-item > span {
  display: block;
  flex: 1;
  min-width: 0;
}

:root [data-order-records] .admin-order-record-item strong {
  display: block;
  color: var(--so-ink);
  font-size: 13.5px;
  font-weight: 600;
}

:root [data-order-records] .admin-order-record-item small {
  display: block;
  color: var(--so-ink3);
  font: 400 11px/1.4 var(--so-mono);
}

:root [data-order-records] .admin-order-record-products-list .admin-order-record-item em {
  min-width: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--so-ink);
  font: 600 14px/1 var(--so-mono);
  font-style: normal;
  text-align: right;
}

/* Processing timeline */
:root [data-order-records] .admin-order-records-events {
  max-height: none;
  overflow: visible;
}

:root [data-order-records] .admin-order-record-timeline {
  position: static;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

:root [data-order-records] .admin-order-record-timeline::before {
  display: none;
}

:root [data-order-records] .admin-order-record-timeline .admin-order-record-event {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  min-height: 0;
  padding: 0 0 20px;
  border: 0;
  border-radius: 0;
  background: transparent;
  animation: so-rise 0.5s var(--so-ease) both;
}

:root [data-order-records] .admin-order-record-timeline .admin-order-record-event:nth-child(2) { animation-delay: 60ms; }
:root [data-order-records] .admin-order-record-timeline .admin-order-record-event:nth-child(3) { animation-delay: 120ms; }
:root [data-order-records] .admin-order-record-timeline .admin-order-record-event:nth-child(4) { animation-delay: 180ms; }

:root [data-order-records] .admin-order-record-timeline .admin-order-record-event + .admin-order-record-event {
  border-top: 0;
}

:root [data-order-records] .admin-order-record-timeline .admin-order-record-event:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 36px;
  bottom: 4px;
  left: 15px;
  width: 1px;
  background: var(--so-line2);
}

:root [data-order-records] .admin-order-record-timeline .admin-order-record-event.is-complete:has(+ .is-complete)::after {
  background: var(--so-mint);
}

:root [data-order-records] .admin-order-record-event-marker {
  display: grid !important;
  place-items: center;
  width: 30px;
  height: 30px;
  box-sizing: border-box;
  border: 1.5px solid var(--so-line2);
  border-radius: 50%;
  background: transparent;
  color: var(--so-ink3);
}

:root [data-order-records] .admin-order-record-event-marker svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.8;
}

:root [data-order-records] .admin-order-record-event.is-complete .admin-order-record-event-marker {
  border-color: var(--so-mint);
  background: transparent;
  color: var(--so-mint);
}

:root [data-order-records] .admin-order-record-event.is-scheduled .admin-order-record-event-marker {
  border-style: dashed;
  border-color: var(--so-amber);
  background: transparent;
  color: var(--so-amber);
}

:root [data-order-records] .admin-order-record-event.is-future .admin-order-record-event-marker {
  background: transparent;
  color: var(--so-ink3);
}

:root [data-order-records] .admin-order-record-event > div {
  display: block;
  min-width: 0;
  padding-top: 1px;
}

:root [data-order-records] .admin-order-record-event > div > header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-start;
  gap: 2px 10px;
}

:root [data-order-records] .admin-order-record-event > div > header strong {
  color: var(--so-ink);
  font-size: 13.5px;
  font-weight: 600;
}

:root [data-order-records] .admin-order-record-event > div > header time {
  color: var(--so-ink3);
  font: 400 11.5px/1.4 var(--so-mono);
}

:root [data-order-records] .admin-order-record-event > div > span {
  display: block;
  margin-top: 1px;
  color: var(--so-ink2);
  font-size: 12.5px;
  font-weight: 400;
}

:root [data-order-records] .admin-order-record-event.is-future > div > header strong {
  color: var(--so-ink3);
}

:root [data-order-records] .admin-order-record-event > em {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  height: 22px;
  margin-top: 3px;
  padding: 0 9px;
  border: 1px solid var(--so-line2);
  border-radius: 999px;
  background: transparent;
  color: var(--so-ink);
  font: 400 11px/1 var(--so-mono);
  font-style: normal;
  white-space: nowrap;
}

:root [data-order-records] .admin-order-record-event.is-scheduled > em {
  border-color: var(--so-amber);
  color: var(--so-amber);
}

:root [data-order-records] .admin-order-record-event.is-future > em {
  border-color: var(--so-line);
  color: var(--so-ink3);
}

/* ---------- Inventory (purchase-order receiving) ---------- */
:root [data-transactions] .admin-po-receiving {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: auto;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

:root [data-transactions] .admin-po-receiving-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

/* Segmented view switch with a gliding highlight. */
:root [data-transactions] .admin-po-filter-tabs {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  box-sizing: border-box;
  width: 100%;
  padding: 3px;
  border: 1px solid var(--so-line);
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
}

:root [data-transactions] .admin-po-filter-tabs::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc((100% - 6px) / 3);
  height: 30px;
  box-sizing: border-box;
  border: 1px solid var(--so-line2);
  border-radius: 999px;
  background: var(--so-card2);
  transition: transform 0.55s var(--so-ease);
}

html[data-device="computer"] [data-transactions] .admin-po-filter-tabs {
  grid-template-columns: repeat(3, 132px);
  width: max-content;
}

:root [data-transactions] .admin-po-filter-tabs:has(> :nth-child(2).is-active)::before {
  transform: translateX(100%);
}

:root [data-transactions] .admin-po-filter-tabs:has(> :nth-child(3).is-active)::before {
  transform: translateX(200%);
}

:root [data-transactions] .admin-po-receiving-toolbar .admin-po-filter-tabs button {
  position: relative;
  height: 30px;
  min-height: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  color: var(--so-ink2);
  font: 500 12.5px/1 var(--so-font);
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.3s;
}

:root [data-transactions] .admin-po-receiving-toolbar .admin-po-filter-tabs button:hover {
  background: transparent;
  color: var(--so-ink);
}

:root [data-transactions] .admin-po-receiving-toolbar .admin-po-filter-tabs button.is-active {
  background: transparent;
  box-shadow: none;
  color: var(--so-ink);
  font-weight: 600;
}

:root [data-transactions] .admin-po-toolbar-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
}

:root [data-transactions] .admin-po-toolbar-status span {
  color: var(--so-ink2);
  font-size: 12.5px;
  font-weight: 400;
  white-space: nowrap;
}

:root [data-transactions] .admin-po-toolbar-status b {
  color: var(--so-ink);
  font: 600 12.5px/1 var(--so-mono);
}

:root [data-transactions] .admin-po-receiving-toolbar > .admin-po-toolbar-status > [data-po-refresh] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  min-height: 0;
  padding: 0 4px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--so-ink);
  font: 600 12.5px/1 var(--so-font);
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.25s;
}

:root [data-transactions] .admin-po-receiving-toolbar > .admin-po-toolbar-status > [data-po-refresh]::before {
  content: '';
  flex: none;
  width: 14px;
  height: 14px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12a8 8 0 1 1-2.3-5.6L20 8.5M20 4v4.5h-4.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12a8 8 0 1 1-2.3-5.6L20 8.5M20 4v4.5h-4.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

:root [data-transactions] .admin-po-receiving-toolbar > .admin-po-toolbar-status > [data-po-refresh]:hover {
  background: transparent;
  color: var(--so-ink2);
}

:root [data-transactions] .admin-po-receiving-toolbar > .admin-po-toolbar-status > [data-po-refresh]:disabled {
  color: var(--so-ink3);
  cursor: progress;
}

:root [data-transactions] .admin-po-receiving-toolbar > .admin-po-toolbar-status > [data-po-refresh]:disabled::before {
  animation: so-spin 0.9s linear infinite;
}

:root [data-transactions] .admin-po-instruction {
  margin: 0;
  padding: 0;
  color: var(--so-ink2);
  font-size: 12.5px;
  font-weight: 400;
}

:root [data-transactions] .admin-po-receiving > .admin-form-error {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--so-red);
  font-size: 12.5px;
  font-weight: 600;
  animation: so-rise 0.4s var(--so-ease) both;
}

:root [data-transactions] .admin-po-feedback {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--so-mint);
  font-size: 12.5px;
  font-weight: 600;
  animation: so-rise 0.45s var(--so-ease) both;
}

:root [data-transactions] .admin-po-feedback::before {
  content: '';
  flex: none;
  width: 14px;
  height: 14px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

:root [data-transactions] .admin-po-order-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding-bottom: 2px;
}

html[data-device="computer"] [data-transactions] .admin-po-order-list {
  flex: 1 1 0;
  min-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--so-line2) transparent;
}

:root [data-transactions] .admin-po-empty {
  display: block;
  min-height: 0;
  margin: 0;
  padding: 18px 2px;
  border: 0;
  border-top: 1px solid var(--so-line);
  border-radius: 0;
  color: var(--so-ink3);
  font-size: 13px;
  font-weight: 400;
  text-align: left;
  animation: so-rise 0.5s var(--so-ease) both;
}

/* One purchase order */
:root [data-transactions] .admin-po-receive-card,
:root [data-transactions] .admin-po-receive-card[open] {
  flex: none;
  overflow: visible;
  margin: 0;
  border: 1px solid var(--so-line);
  border-radius: 16px;
  background: transparent;
  box-shadow: none;
  animation: so-rise 0.55s var(--so-ease) both;
}

:root [data-transactions] .admin-po-receive-card + .admin-po-receive-card {
  margin-top: 0;
}

:root [data-transactions] .admin-po-receive-card:nth-child(2) { animation-delay: 50ms; }
:root [data-transactions] .admin-po-receive-card:nth-child(3) { animation-delay: 100ms; }
:root [data-transactions] .admin-po-receive-card:nth-child(4) { animation-delay: 150ms; }
:root [data-transactions] .admin-po-receive-card:nth-child(n+5) { animation-delay: 200ms; }

:root [data-transactions] .admin-po-receive-card summary {
  min-height: 58px;
  padding: 10px 18px 10px 14px;
  border-radius: 16px;
  color: var(--so-ink);
  cursor: pointer;
  list-style: none;
}

:root [data-transactions] .admin-po-receive-card summary:focus-visible {
  outline: 2px solid var(--so-ink2);
  outline-offset: 2px;
}

html[data-device="computer"] [data-transactions] .admin-po-receive-card summary {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) minmax(190px, 290px) 52px;
  align-items: center;
  gap: 16px;
}

html[data-device="computer"] [data-transactions] .admin-po-receive-card summary::before {
  content: '';
  width: 16px;
  height: 16px;
  background: var(--so-ink3);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.45s var(--so-ease);
}

html[data-device="computer"] [data-transactions] .admin-po-receive-card[open] summary::before {
  transform: rotate(90deg);
}

:root [data-transactions] .admin-po-summary-id {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
  min-width: 0;
}

:root [data-transactions] .admin-po-summary-id > strong {
  order: 1;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  color: var(--so-ink);
  font: 600 13.5px/1.3 var(--so-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

:root [data-transactions] .admin-po-summary-id > span {
  display: inline-flex;
  order: 2;
  align-items: center;
  gap: 6px;
  width: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--so-ink2);
  font: 400 12px/1.3 var(--so-font);
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

:root [data-transactions] .admin-po-summary-id > span::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--so-ink3);
}

:root [data-transactions] .is-partially_received .admin-po-summary-id > span {
  color: var(--so-amber);
}

:root [data-transactions] .is-partially_received .admin-po-summary-id > span::before {
  background: var(--so-amber);
}

:root [data-transactions] .is-received .admin-po-summary-id > span {
  background: transparent;
  color: var(--so-mint);
}

:root [data-transactions] .is-received .admin-po-summary-id > span::before {
  background: var(--so-mint);
}

:root [data-transactions] .admin-po-summary-id small {
  flex: 1 0 100%;
  order: 3;
  overflow: hidden;
  color: var(--so-ink3);
  font: 400 11px/1.4 var(--so-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

:root [data-transactions] .admin-po-summary-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

:root [data-transactions] .admin-po-summary-progress > span {
  color: var(--so-ink2);
  font-size: 12px;
  font-weight: 400;
}

:root [data-transactions] .admin-po-summary-progress > span b {
  color: var(--so-ink);
  font: 600 12px/1 var(--so-mono);
}

:root [data-transactions] .admin-po-summary-progress > div {
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--so-line);
}

:root [data-transactions] .admin-po-summary-progress i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--so-ink);
  transform-origin: left center;
  animation: pa-grow 0.9s var(--so-ease) 0.15s both;
}

@keyframes pa-grow {
  from { transform: scaleX(0); }
  to { transform: none; }
}

:root [data-transactions] .is-received .admin-po-summary-progress i {
  background: var(--so-mint);
}

:root [data-transactions] .admin-po-summary-percent {
  color: var(--so-ink);
  font: 600 15px/1 var(--so-mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

:root [data-transactions] .is-received .admin-po-summary-percent {
  color: var(--so-mint);
}

:root [data-transactions] .admin-po-receive-card form {
  margin: 0 18px;
  border-top: 1px solid var(--so-line);
  animation: so-rise 0.45s var(--so-ease) both;
}

html[data-device="computer"] [data-transactions] .admin-po-receive-card form {
  margin-left: 46px;
}

:root [data-transactions] .admin-po-order-note {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  margin: 0;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--so-line);
  background: transparent;
  color: var(--so-ink2);
  font-size: 12.5px;
  font-weight: 400;
}

:root [data-transactions] .admin-po-order-note b {
  color: var(--so-ink);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

:root [data-transactions] .admin-po-receive-lines {
  display: block;
}

:root [data-transactions] .admin-po-receive-line {
  min-height: 50px;
  padding: 0;
  border-bottom: 1px solid var(--so-line);
  cursor: pointer;
  transition: opacity 0.4s;
}

html[data-device="computer"] [data-transactions] .admin-po-receive-line {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 130px 170px;
  align-items: center;
  gap: 14px;
}

:root [data-transactions] .admin-po-receive-line:hover {
  background: transparent;
}

:root [data-transactions] .admin-po-receive-line.is-received {
  opacity: 0.62;
  cursor: default;
}

:root [data-transactions] .admin-po-line-check {
  position: relative;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
}

:root [data-transactions] .admin-po-line-check i {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  box-sizing: border-box;
  border: 1.5px solid var(--so-line2);
  border-radius: 5px;
  background: transparent;
  transition: background-color 0.25s, border-color 0.25s;
}

:root [data-transactions] .admin-po-receive-line:hover .admin-po-line-check input:not(:disabled) + i {
  border-color: var(--so-ink3);
}

:root [data-transactions] .admin-po-line-check input:checked + i {
  border-color: var(--so-ink);
  background: var(--so-ink);
}

:root [data-transactions] .admin-po-line-check input:checked + i::after {
  content: '';
  width: 12px;
  height: 12px;
  background: var(--so-panel);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: so-pop 0.35s var(--so-spring) both;
}

:root [data-transactions] .admin-po-line-check input:focus-visible + i {
  outline: 2px solid var(--so-ink2);
  outline-offset: 2px;
}

:root [data-transactions] .admin-po-line-product,
:root [data-transactions] .admin-po-line-progress {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

:root [data-transactions] .admin-po-line-product strong {
  overflow: hidden;
  color: var(--so-ink);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

:root [data-transactions] .admin-po-line-product small {
  overflow: hidden;
  color: var(--so-ink3);
  font: 400 11px/1.4 var(--so-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

:root [data-transactions] .admin-po-line-progress b {
  color: var(--so-ink);
  font: 600 13px/1.3 var(--so-mono);
}

:root [data-transactions] .admin-po-line-progress small,
:root [data-transactions] .admin-po-line-quantity small {
  overflow: visible;
  color: var(--so-ink3);
  font-size: 11.5px;
  font-weight: 400;
  white-space: nowrap;
}

:root [data-transactions] .admin-po-line-quantity {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

:root [data-transactions] .admin-po-line-quantity input {
  width: 72px;
  height: 32px;
  min-height: 0;
  box-sizing: border-box;
  padding: 0 6px 0 14px;
  border: 1px solid var(--so-line2);
  border-radius: 999px;
  outline: 0;
  background: transparent;
  color: var(--so-ink);
  font: 400 13px/1 var(--so-mono);
  text-align: left;
  color-scheme: dark;
  transition: border-color 0.25s, box-shadow 0.25s;
}

:root[data-admin-theme='light'] [data-transactions] .admin-po-line-quantity input {
  color-scheme: light;
}

:root [data-transactions] .admin-po-line-quantity input:hover {
  border-color: var(--so-ink3);
}

:root [data-transactions] .admin-po-line-quantity input:focus {
  border-color: var(--so-ink3);
  box-shadow: 0 0 0 4px var(--so-line);
}

:root [data-transactions] .admin-po-line-quantity input:invalid {
  border-color: var(--so-red);
}

:root [data-transactions] .admin-po-line-done {
  justify-self: end;
  color: var(--so-mint);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

:root [data-transactions] .admin-po-receive-card footer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px 16px;
  padding: 12px 0 14px;
  background: transparent;
}

:root [data-transactions] .admin-po-receive-card footer > div {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 1px;
}

html[data-device="computer"] [data-transactions] .admin-po-receive-card footer {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

html[data-device="computer"] [data-transactions] .admin-po-receive-card footer > div {
  flex: 1 1 200px;
}

:root [data-transactions] .admin-po-receive-card footer > div > span {
  color: var(--so-ink);
  font-size: 13px;
  font-weight: 600;
}

:root [data-transactions] .admin-po-receive-card footer small {
  color: var(--so-ink3);
  font-size: 11.5px;
  font-weight: 400;
}

:root [data-transactions] .admin-po-receive-card footer button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  min-height: 0;
  padding: 0 18px;
  border: 1px solid var(--so-ink);
  border-radius: 999px;
  background: var(--so-ink);
  box-shadow: none;
  color: var(--so-panel);
  font: 600 12.5px/1 var(--so-font);
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.35s var(--so-ease), background-color 0.3s, color 0.3s, border-color 0.3s;
}

:root[data-admin-theme] [data-transactions] .admin-po-receive-card footer button:not(:disabled) {
  box-shadow: none;
}

:root [data-transactions] .admin-po-receive-card footer button:hover:not(:disabled) {
  transform: translateY(-1px);
}

:root [data-transactions] .admin-po-receive-card footer button:active:not(:disabled) {
  transform: scale(0.97);
  transition-duration: 0.08s;
}

:root[data-admin-theme] [data-transactions] .admin-po-receive-card footer button:disabled {
  border-color: var(--so-line);
  background: transparent;
  color: var(--so-ink3);
  cursor: not-allowed;
}

:root[data-admin-theme] [data-transactions] .admin-po-receive-card footer button[aria-busy="true"] {
  border-color: var(--so-ink);
  background: var(--so-ink);
  color: var(--so-panel);
  cursor: progress;
}

:root [data-transactions] .admin-po-receive-card footer button[aria-busy="true"]::before {
  content: '';
  width: 12px;
  height: 12px;
  box-sizing: border-box;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: so-spin 0.9s linear infinite;
}

:root [data-transactions] .admin-po-complete-stamp {
  color: var(--so-mint) !important;
  font: 400 12px/1.3 var(--so-mono);
}

/* ---------- Stock Adjust ---------- */
:root [data-stock-adjustments] .admin-stock-adjust-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  width: auto;
  min-width: 0;
  max-width: 100%;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 8px 0 0;
  overflow: visible;
}

:root [data-stock-adjustments] .admin-stock-adjust-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  width: min(100%, 720px);
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

:root [data-stock-adjustments] .admin-stock-adjust-card:hover {
  transform: none;
  box-shadow: none;
}

:root [data-stock-adjustments] .admin-stock-adjust-head {
  display: block;
  width: auto;
  padding: 0;
  border: 0;
  text-align: center;
}

:root [data-stock-adjustments] .admin-stock-adjust-head h2 {
  margin: 0;
  color: var(--so-ink);
  font: 650 22px/1.25 var(--so-font);
  letter-spacing: -0.02em;
}

:root [data-stock-adjustments] .admin-stock-adjust-card > .admin-stock-adjust-error {
  width: auto;
  max-width: 560px;
  margin: -4px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--so-red);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
  animation: so-rise 0.4s var(--so-ease) both;
}

:root [data-stock-adjustments] .admin-stock-adjust-card > .admin-stock-adjust-success {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: -2px 0 0;
  padding: 11px 14px;
  border: 1px solid var(--so-mint);
  border-radius: 16px;
  background: transparent;
  color: var(--so-mint);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
  animation: so-rise 0.5s var(--so-ease) both;
}

:root [data-stock-adjustments] .admin-stock-adjust-card > .admin-stock-adjust-success::before {
  content: '';
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Waiting for a scan */
:root [data-stock-adjustments] .admin-stock-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  box-sizing: border-box;
  width: 100%;
  height: 196px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 1px solid var(--so-line);
  border-radius: 20px;
  background: transparent;
  color: var(--so-ink);
  transition: border-color 0.35s;
  animation: so-rise 0.55s var(--so-ease) both;
}

:root [data-stock-adjustments] .admin-stock-empty:hover {
  border-color: var(--so-line2);
}

:root [data-stock-adjustments] .admin-stock-empty svg {
  width: 46px;
  height: 46px;
  margin: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.45;
  transition: opacity 0.35s, transform 0.5s var(--so-ease);
}

:root [data-stock-adjustments] .admin-stock-empty:hover svg {
  opacity: 0.8;
  transform: scale(1.06);
}

:root [data-stock-adjustments] .admin-stock-empty strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--so-ink3);
  font: 600 11px/1.3 var(--so-font);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

:root [data-stock-adjustments] .admin-stock-empty strong::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--so-ink3);
  animation: so-breathe 1.6s ease-in-out infinite;
}

/* The scanned product */
:root [data-stock-adjustments] .admin-stock-product {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: center;
  animation: so-rise 0.5s var(--so-ease) both;
}

:root [data-stock-adjustments] .admin-stock-product-copy {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 3px 0;
  padding: 8px 18px 0;
  text-align: center;
}

:root [data-stock-adjustments] .admin-stock-product-copy h3 {
  flex: 1 0 100%;
  order: 1;
  margin: 0;
  color: var(--so-ink);
  font: 650 18px/1.3 var(--so-font);
  letter-spacing: -0.01em;
}

:root [data-stock-adjustments] .admin-stock-product-copy code {
  order: 2;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--so-ink3);
  font: 400 12px/1.4 var(--so-mono);
}

:root [data-stock-adjustments] .admin-stock-product-copy span {
  order: 3;
  width: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--so-ink3);
  font: 400 12px/1.4 var(--so-font);
  letter-spacing: 0;
  text-transform: none;
}

:root [data-stock-adjustments] .admin-stock-product-copy span::before {
  content: '·';
  padding: 0 6px;
}

:root [data-stock-adjustments] .admin-stock-numbers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  width: min(420px, 100%);
  margin: 0;
}

:root [data-stock-adjustments] .admin-stock-numbers > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: center;
}

:root [data-stock-adjustments] .admin-stock-numbers > div + div {
  border-left: 1px solid var(--so-line);
}

:root [data-stock-adjustments] .admin-stock-numbers span {
  color: var(--so-ink3);
  font: 400 12px/1.4 var(--so-font);
  letter-spacing: 0;
  text-transform: none;
}

:root [data-stock-adjustments] .admin-stock-numbers :is(span, strong) {
  align-self: center;
}

:root [data-stock-adjustments] .admin-stock-numbers strong {
  color: var(--so-ink);
  font: 600 30px/1.15 var(--so-mono);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

:root [data-stock-adjustments] .admin-stock-numbers .is-pending strong {
  color: var(--so-ink);
}

:root [data-stock-adjustments] .admin-stock-adjust-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: min(460px, 100%);
  margin: 2px 0 0;
  animation: so-rise 0.5s var(--so-ease) 60ms both;
}

:root [data-stock-adjustments] .admin-stock-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 46px;
  min-height: 0;
  padding: 0 16px;
  border: 1px solid var(--so-ink);
  border-radius: 999px;
  background: var(--so-ink);
  box-shadow: none;
  color: var(--so-panel);
  text-align: center;
  cursor: pointer;
  transition: transform 0.35s var(--so-ease), background-color 0.3s, color 0.3s, border-color 0.3s;
}

:root [data-stock-adjustments] .admin-stock-action span {
  display: none;
}

:root [data-stock-adjustments] .admin-stock-action strong {
  color: inherit;
  font: 600 14px/1 var(--so-font);
}

:root[data-admin-theme] [data-stock-adjustments] .admin-stock-action.is-subtract {
  border-color: var(--so-red);
  background: transparent;
  color: var(--so-red);
}

:root[data-admin-theme] [data-stock-adjustments] .admin-stock-action.is-add {
  border-color: var(--so-ink);
  background: var(--so-ink);
  color: var(--so-panel);
}

:root [data-stock-adjustments] .admin-stock-action:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: none;
}

:root [data-stock-adjustments] .admin-stock-action:active:not(:disabled) {
  transform: scale(0.97);
  transition-duration: 0.08s;
}

:root[data-admin-theme] [data-stock-adjustments] .admin-stock-action:disabled {
  border-color: var(--so-line);
  background: transparent;
  color: var(--so-ink3);
  cursor: progress;
  transform: none;
}

:root [data-stock-adjustments] .admin-stock-clear {
  height: 30px;
  min-height: 0;
  margin: -6px 0 0;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--so-ink2);
  font: 500 12.5px/1 var(--so-font);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.25s;
}

:root [data-stock-adjustments] .admin-stock-clear:hover:not(:disabled) {
  color: var(--so-ink);
}

:root [data-stock-adjustments] .admin-stock-clear:disabled {
  color: var(--so-ink3);
  cursor: progress;
}

/* Recent adjustments */
:root [data-stock-adjustments] .admin-stock-history-card {
  display: flex;
  flex-direction: column;
  width: min(100%, 720px);
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  animation: so-rise 0.55s var(--so-ease) 80ms both;
}

:root [data-stock-adjustments] .admin-stock-history-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--so-line);
}

:root [data-stock-adjustments] .admin-stock-history-head h3 {
  margin: 0;
  color: var(--so-ink);
  font: 600 15px/1.3 var(--so-font);
  letter-spacing: 0;
}

:root [data-stock-adjustments] .admin-stock-history-head span {
  color: var(--so-ink3);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

:root [data-stock-adjustments] .admin-stock-history {
  display: block;
  border: 0;
}

:root [data-stock-adjustments] .admin-stock-history > .admin-empty {
  margin: 0;
  padding: 16px 2px;
  border: 0;
  background: transparent;
  color: var(--so-ink3);
  font-size: 13px;
  font-weight: 400;
  text-align: left;
}

:root [data-stock-adjustments] .admin-stock-history > .admin-form-error {
  margin: 0;
  padding: 16px 2px;
  border: 0;
  background: transparent;
  color: var(--so-red);
  font-size: 13px;
  font-weight: 600;
}

:root [data-stock-adjustments] .admin-stock-history-row {
  display: flex;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  min-height: 52px;
  padding: 7px 8px;
  border: 0;
  border-bottom: 1px solid var(--so-line);
  border-radius: 0;
  background: transparent;
  animation: so-rise 0.45s var(--so-ease) both;
}

:root [data-stock-adjustments] .admin-stock-history-row:nth-child(2) { animation-delay: 40ms; }
:root [data-stock-adjustments] .admin-stock-history-row:nth-child(3) { animation-delay: 80ms; }
:root [data-stock-adjustments] .admin-stock-history-row:nth-child(4) { animation-delay: 120ms; }
:root [data-stock-adjustments] .admin-stock-history-row:nth-child(5) { animation-delay: 160ms; }

:root [data-stock-adjustments] .admin-stock-history-mark {
  display: grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  box-sizing: border-box;
  border: 1px solid var(--so-mint);
  border-radius: 50%;
  background: transparent;
  color: var(--so-mint);
  font: 600 12px/1 var(--so-mono);
}

:root [data-stock-adjustments] .admin-stock-history-mark.is-subtract {
  border-color: var(--so-red);
  background: transparent;
  color: var(--so-red);
}

:root [data-stock-adjustments] .admin-stock-history-mark.is-add {
  background: transparent;
}

:root [data-stock-adjustments] .admin-stock-history-row > div {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

:root [data-stock-adjustments] .admin-stock-history-row strong {
  overflow: hidden;
  color: var(--so-ink);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

:root [data-stock-adjustments] .admin-stock-history-row > div > span {
  overflow: hidden;
  color: var(--so-ink3);
  font: 400 11px/1.4 var(--so-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Phones: let the long ASTRA line wrap instead of cutting it. */
html:not([data-device="computer"]) [data-stock-adjustments] .admin-stock-history-row > div > span {
  white-space: normal;
}

:root [data-stock-adjustments] .admin-stock-history-row em {
  flex: none;
  color: var(--so-ink2);
  font: 400 12.5px/1 var(--so-mono);
  font-style: normal;
}

/* ---------- Returns ---------- */
:root [data-returns-page] .admin-returns-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  align-items: start;
  gap: 14px;
  width: auto;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

html[data-device="computer"] [data-returns-page] .admin-returns-layout {
  grid-template-columns: minmax(0, 1fr) 336px;
  column-gap: 0;
}

/* Three steps with a gliding highlight under the current one. */
:root [data-returns-page] .admin-returns-progress {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 4px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  animation: so-rise 0.55s var(--so-ease) backwards;
}

:root [data-returns-page] .admin-returns-progress::before {
  content: '';
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 24px) / 3);
  box-sizing: border-box;
  border: 1px solid var(--so-line2);
  border-radius: 999px;
  background: var(--so-card);
  transition: transform 0.65s var(--so-ease);
}

:root [data-returns-page] .admin-returns-progress:has(> [data-return-progress="2"].is-active)::before {
  transform: translateX(calc(100% + 8px));
}

:root [data-returns-page] .admin-returns-progress:has(> [data-return-progress="3"].is-active)::before {
  transform: translateX(calc(200% + 16px));
}

:root [data-returns-page] .admin-returns-progress > i {
  display: none;
}

:root [data-returns-page] .admin-returns-progress > div {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  height: 46px;
  padding: 0 16px;
  color: var(--so-ink3);
}

html:not([data-device="computer"]) [data-returns-page] .admin-returns-progress > div {
  gap: 6px;
  padding: 0 8px;
}

html:not([data-device="computer"]) [data-returns-page] .admin-returns-progress strong {
  font-size: 12px;
}

html:not([data-device="computer"]) [data-returns-page] .admin-returns-progress > div::after {
  display: none;
}

:root [data-returns-page] .admin-returns-progress > div:not(:last-of-type)::after {
  content: '';
  flex: 1;
  min-width: 12px;
  height: 1px;
  margin-left: 6px;
  background: var(--so-line2);
  transition: background-color 0.7s var(--so-ease) 0.1s;
}

:root [data-returns-page] .admin-returns-progress > div.is-complete::after {
  background: var(--so-ink2);
}

:root [data-returns-page] .admin-returns-progress > div > b {
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  width: 24px;
  height: 24px;
  box-sizing: border-box;
  border: 1.5px solid var(--so-line2);
  border-radius: 50%;
  background: transparent;
  color: var(--so-ink3);
  font: 600 11.5px/1 var(--so-mono);
  transition: border-color 0.45s, color 0.45s;
}

:root [data-returns-page] .admin-returns-progress > div.is-active > b {
  border-color: var(--so-ink);
  background: transparent;
  color: var(--so-ink);
}

:root [data-returns-page] .admin-returns-progress > div.is-complete > b {
  border-color: var(--so-ink2);
  background: transparent;
  color: var(--so-ink);
  font-size: 0;
}

:root [data-returns-page] .admin-returns-progress > div.is-complete > b::after {
  content: '';
  width: 13px;
  height: 13px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: so-pop 0.45s var(--so-spring) both;
}

:root [data-returns-page] .admin-returns-progress > div > span {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

:root [data-returns-page] .admin-returns-progress strong {
  color: var(--so-ink3);
  font: 600 13px/1.3 var(--so-font);
  white-space: nowrap;
  transition: color 0.4s;
}

:root [data-returns-page] .admin-returns-progress > div:is(.is-active, .is-complete) strong {
  color: var(--so-ink);
}

:root [data-returns-page] .admin-returns-progress small {
  color: var(--so-ink3);
  font-size: 11.5px;
  font-weight: 400;
  white-space: nowrap;
}

/* Alerts */
:root [data-returns-page] .admin-returns-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid var(--so-red);
  border-radius: 14px;
  background: transparent;
  color: var(--so-red);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  animation: so-rise 0.45s var(--so-ease) both;
}

:root [data-returns-page] .admin-returns-alert::before {
  content: '';
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

:root [data-returns-page] .admin-returns-feedback {
  border-color: var(--so-mint);
  color: var(--so-ink);
  font-weight: 500;
}

:root [data-returns-page] .admin-returns-feedback::before {
  background: var(--so-mint);
}

/* Step cards: flat, no box */
:root [data-returns-page] .admin-returns-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  padding: 2px 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  animation: so-rise 0.5s var(--so-ease) backwards;
}

html[data-device="computer"] [data-returns-page] .admin-returns-card {
  padding-right: 28px;
}

:root [data-returns-page] .admin-returns-card[data-return-step="1"] {
  gap: 18px;
}

:root [data-returns-page] .admin-returns-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

:root [data-returns-page] .admin-returns-section-head > div {
  display: block;
  flex: 1;
  min-width: 0;
}

:root [data-returns-page] :is(.admin-returns-section-head, .admin-returns-history-head) > div > span {
  display: none;
}

:root [data-returns-page] .admin-returns-section-head h2 {
  margin: 0;
  color: var(--so-ink);
  font: 600 17px/1.3 var(--so-font);
  letter-spacing: -0.01em;
}

:root [data-returns-page] .admin-returns-section-head p {
  max-width: none;
  margin: 3px 0 0;
  color: var(--so-ink2);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.45;
}

:root [data-returns-page] .admin-returns-section-head > .admin-ghost-btn {
  flex: none;
}

/* Field labels: sentence case, quiet. */
:root [data-returns-page] :is(.admin-returns-platforms, .admin-returns-destinations, .admin-returns-fault) legend,
:root [data-returns-page] .admin-returns-search label > span,
:root [data-returns-page] .admin-returns-partner-select > span,
:root [data-returns-page] .admin-returns-quote label > span {
  float: left;
  width: 100%;
  margin: 0 0 8px;
  padding: 0;
  color: var(--so-ink2);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

:root [data-returns-page] .admin-returns-search label > span,
:root [data-returns-page] .admin-returns-partner-select > span,
:root [data-returns-page] .admin-returns-quote label > span {
  float: none;
  margin: 0;
}

/* Sales platform: pills with a radio dot */
:root [data-returns-page] .admin-returns-platforms {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
}

:root [data-returns-page] .admin-returns-platform-grid {
  display: grid;
  clear: both;
  gap: 8px;
}

html[data-device="computer"] [data-returns-page] .admin-returns-card[data-return-step="1"] {
  container-type: inline-size;
}

html[data-device="computer"] [data-returns-page] .admin-returns-platform-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Four even columns whenever the longest label ("Jenang Gemi Website") fits;
   when the column is narrower the radio dot gives way (the ink border and
   weight still mark the choice), then the grid drops to three columns. */
@container (max-width: 719px) {
  html[data-device="computer"] [data-returns-page] .admin-returns-platform-grid label > span {
    justify-content: center;
    padding: 0 12px;
    font-size: 12.5px;
  }

  html[data-device="computer"] [data-returns-page] .admin-returns-platform-grid label > span::before {
    display: none;
  }
}

@container (max-width: 591px) {
  html[data-device="computer"] [data-returns-page] .admin-returns-platform-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

:root [data-returns-page] :is(.admin-returns-platform-grid, .admin-returns-fault, .admin-returns-destinations) input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

:root [data-returns-page] .admin-returns-platform-grid label > span {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  box-sizing: border-box;
  min-width: 0;
  height: 40px;
  min-height: 0;
  padding: 0 14px;
  border: 1px solid var(--so-line2);
  border-radius: 999px;
  background: transparent;
  color: var(--so-ink2);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  transition: transform 0.4s var(--so-ease), border-color 0.3s, color 0.3s;
}

:root [data-returns-page] :is(.admin-returns-platform-grid label > span, .admin-returns-fault label, .admin-returns-destinations > label)::before {
  content: '';
  flex: none;
  width: 16px;
  height: 16px;
  box-sizing: border-box;
  border: 1.5px solid var(--so-line2);
  border-radius: 50%;
  background: var(--so-ink);
  box-shadow: inset 0 0 0 8px var(--so-panel);
  transition: border-color 0.3s, box-shadow 0.4s var(--so-spring);
}

:root [data-returns-page] .admin-returns-platform-grid input:checked + span {
  border-color: var(--so-ink);
  background: transparent;
  color: var(--so-ink);
  font-weight: 600;
}

:root [data-returns-page] .admin-returns-platform-grid input:checked + span::before,
:root [data-returns-page] :is(.admin-returns-fault label, .admin-returns-destinations > label):has(input:checked)::before {
  border-color: var(--so-ink);
  box-shadow: inset 0 0 0 2.5px var(--so-panel);
}

:root [data-returns-page] .admin-returns-platform-grid label:hover > span,
:root [data-returns-page] .admin-returns-platform-grid input:focus-visible + span {
  border-color: var(--so-ink3);
  transform: translateY(-2px);
}

:root [data-returns-page] .admin-returns-platform-grid input:checked + span,
:root [data-returns-page] .admin-returns-platform-grid label:hover > input:checked + span {
  border-color: var(--so-ink);
}

:root [data-returns-page] .admin-returns-platform-grid input:focus-visible + span {
  outline: 2px solid var(--so-ink2);
  outline-offset: 2px;
}

/* Search */
:root [data-returns-page] [data-return-standard-search] {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

:root [data-returns-page] .admin-returns-search {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

:root [data-returns-page] .admin-returns-search label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

:root [data-returns-page] .admin-returns-search-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

html[data-device="computer"] [data-returns-page] .admin-returns-search-row {
  flex-direction: row;
  align-items: flex-end;
}

:root [data-returns-page] .admin-returns-layout input[name="order_query"] {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 16px;
  font-size: 13.5px;
  transition: opacity 0.3s, border-color 0.25s, box-shadow 0.25s;
}

:root [data-returns-page] .admin-returns-layout input[name="order_query"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

:root [data-returns-page] .admin-returns-search-row > .admin-primary-btn {
  flex: none;
  height: 40px;
  min-width: 116px;
  padding: 0 18px;
  font-size: 13px;
}

:root [data-returns-page] .admin-returns-search > small,
:root [data-returns-page] .admin-returns-quote > small {
  color: var(--so-ink3);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
}

:root [data-returns-page] .admin-returns-search-results,
:root [data-returns-page] .admin-returns-partner-orders {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  max-height: none;
  overflow: visible;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

:root [data-returns-page] :is(.admin-returns-search-results, .admin-returns-partner-orders) > p {
  display: flex;
  align-self: stretch;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 14px 4px;
  border-top: 1px solid var(--so-line);
  color: var(--so-ink3);
  font-size: 13px;
  font-weight: 400;
  text-align: left;
  animation: so-fade 0.35s var(--so-ease) both;
}

:root [data-returns-page] .admin-returns-result-head,
:root [data-returns-page] .admin-returns-partner-orders > header {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 4px 8px;
}

:root [data-returns-page] .admin-returns-result-head strong,
:root [data-returns-page] .admin-returns-partner-orders > header strong {
  color: var(--so-ink);
  font-size: 13.5px;
  font-weight: 600;
}

:root [data-returns-page] .admin-returns-result-head small,
:root [data-returns-page] .admin-returns-partner-orders > header small {
  color: var(--so-ink3);
  font-size: 12px;
  font-weight: 400;
}

:root [data-returns-page] .admin-returns-profile {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 10px 0 6px;
  border: 0;
  border-top: 1px solid var(--so-line);
  border-radius: 0;
  background: transparent;
  animation: so-rise 0.45s var(--so-ease) backwards;
}

:root [data-returns-page] .admin-returns-profile:nth-of-type(2) { animation-delay: 40ms; }
:root [data-returns-page] .admin-returns-profile:nth-of-type(n+3) { animation-delay: 80ms; }

:root [data-returns-page] .admin-returns-profile > header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px 4px;
}

:root [data-returns-page] .admin-returns-profile > header > b {
  display: grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 30px;
  box-sizing: border-box;
  border: 1px solid var(--so-line2);
  border-radius: 50%;
  background: transparent;
  color: var(--so-ink2);
  font: 600 12.5px/1 var(--so-font);
}

:root [data-returns-page] .admin-returns-profile > header > span {
  display: flex;
  flex-direction: column;
  gap: 0;
}

:root [data-returns-page] .admin-returns-profile > header strong {
  color: var(--so-ink);
  font-size: 13.5px;
  font-weight: 600;
}

:root [data-returns-page] .admin-returns-profile > header small {
  color: var(--so-ink3);
  font-size: 12px;
  font-weight: 400;
}

:root [data-returns-page] .admin-returns-profile > div {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: 36px;
}

/* Order rows (customer matches and Partner orders) */
:root [data-returns-page] :is(.admin-returns-profile, .admin-returns-partner-orders) button {
  display: flex;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: 4px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--so-ink);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s;
}

:root [data-returns-page] .admin-returns-partner-orders button {
  flex: none;
  min-height: 46px;
  border-bottom: 1px solid var(--so-line);
  border-radius: 0;
  animation: so-rise 0.4s var(--so-ease) backwards;
}

:root [data-returns-page] .admin-returns-partner-orders > header + button {
  border-top: 1px solid var(--so-line);
}

:root [data-returns-page] :is(.admin-returns-profile, .admin-returns-partner-orders) button:hover,
:root [data-returns-page] :is(.admin-returns-profile, .admin-returns-partner-orders) button:focus-visible {
  border-color: var(--so-line);
  background: var(--so-card2);
  outline: none;
}

:root [data-returns-page] :is(.admin-returns-profile, .admin-returns-partner-orders) button:disabled {
  color: var(--so-ink2);
  cursor: progress;
}

:root [data-returns-page] :is(.admin-returns-profile, .admin-returns-partner-orders) button::after {
  content: '';
  flex: none;
  width: 14px;
  height: 14px;
  background: var(--so-ink3);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}

:root [data-returns-page] :is(.admin-returns-profile, .admin-returns-partner-orders) button > span {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

:root [data-returns-page] :is(.admin-returns-profile, .admin-returns-partner-orders) button strong {
  color: var(--so-ink);
  font: 600 12.5px/1.35 var(--so-mono);
}

:root [data-returns-page] :is(.admin-returns-profile, .admin-returns-partner-orders) button small {
  color: var(--so-ink3);
  font-size: 11.5px;
  font-weight: 400;
}

:root [data-returns-page] :is(.admin-returns-profile, .admin-returns-partner-orders) button time {
  flex: none;
  color: var(--so-ink3);
  font-size: 11.5px;
  font-weight: 400;
  white-space: nowrap;
}

/* Partner flow */
:root [data-returns-page] .admin-returns-partner-flow {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0;
}

:root [data-returns-page] .admin-returns-fault {
  margin: 0;
  padding: 0;
  border: 0;
}

:root [data-returns-page] .admin-returns-fault > div {
  display: grid;
  clear: both;
  gap: 8px;
}

html[data-device="computer"] [data-returns-page] .admin-returns-fault > div {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

:root [data-returns-page] .admin-returns-fault label {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  min-height: 58px;
  padding: 10px 14px;
  border: 1px solid var(--so-line2);
  border-radius: 16px;
  background: transparent;
  cursor: pointer;
  transition: transform 0.4s var(--so-ease), border-color 0.3s;
}

:root [data-returns-page] .admin-returns-fault label::before {
  width: 18px;
  height: 18px;
  box-shadow: inset 0 0 0 9px var(--so-panel);
}

:root [data-returns-page] .admin-returns-fault label:has(input:checked)::before {
  box-shadow: inset 0 0 0 3px var(--so-panel);
}

:root [data-returns-page] .admin-returns-fault label:hover {
  border-color: var(--so-ink3);
  transform: translateY(-2px);
}

:root [data-returns-page] .admin-returns-fault label:has(input:checked) {
  border-color: var(--so-ink);
}

:root [data-returns-page] .admin-returns-fault label:has(input:focus-visible) {
  outline: 2px solid var(--so-ink2);
  outline-offset: 2px;
}

:root [data-returns-page] .admin-returns-fault label > span {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

:root [data-returns-page] .admin-returns-fault input:checked + span {
  border: 0;
  box-shadow: none;
}

:root [data-returns-page] .admin-returns-fault strong {
  color: var(--so-ink);
  font-size: 13.5px;
  font-weight: 600;
}

:root [data-returns-page] .admin-returns-fault small {
  color: var(--so-ink2);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

:root [data-returns-page] .admin-returns-partner-select {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 360px;
}

:root [data-returns-page] .admin-returns-partner-select::after {
  bottom: 13px;
}

:root [data-returns-page] .admin-returns-layout select[name="return_partner"] {
  height: 40px;
  padding-left: 16px;
  font-size: 13px;
}

:root [data-returns-page] .admin-returns-layout select[name="return_partner"]:disabled {
  color: var(--so-ink3);
  cursor: not-allowed;
}

:root [data-returns-page] .admin-returns-partner-select:has(select:disabled)::after {
  opacity: 0.5;
}

/* Step 2: the order and its products */
:root [data-returns-page] .admin-returns-order-summary {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin: 0;
  padding: 0 0 12px;
  border: 0;
  border-bottom: 1px dashed var(--so-line2);
  border-radius: 0;
  background: transparent;
}

:root [data-returns-page] .admin-returns-order-summary > div {
  display: grid;
  flex: 1;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 2px 0;
  min-width: 0;
}

:root [data-returns-page] .admin-returns-order-summary h3 {
  grid-row: 1;
  grid-column: 1 / -1;
  margin: 0;
  color: var(--so-ink);
  font: 600 16px/1.3 var(--so-mono);
}

:root [data-returns-page] .admin-returns-order-summary span {
  grid-row: 2;
  grid-column: 1;
  color: var(--so-ink2);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

:root [data-returns-page] .admin-returns-order-summary span::after {
  content: '·';
  padding: 0 6px;
}

:root [data-returns-page] .admin-returns-order-summary p {
  grid-row: 2;
  grid-column: 2;
  margin: 0;
  color: var(--so-ink2);
  font-size: 12.5px;
  font-weight: 400;
}

:root [data-returns-page] .admin-returns-order-summary > b {
  color: var(--so-ink);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

:root [data-returns-page] .admin-returns-product-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

:root [data-returns-page] .admin-returns-product {
  display: flex;
  align-items: center;
  gap: 14px;
  box-sizing: border-box;
  min-height: 56px;
  padding: 4px 2px;
  border: 0;
  border-bottom: 1px solid var(--so-line);
  border-radius: 0;
  background: transparent;
  animation: so-rise 0.45s var(--so-ease) backwards;
}

:root [data-returns-page] .admin-returns-product:nth-child(2) { animation-delay: 40ms; }
:root [data-returns-page] .admin-returns-product:nth-child(n+3) { animation-delay: 80ms; }

:root [data-returns-page] .admin-returns-product.is-selected {
  border-color: var(--so-line);
  background: transparent;
}

:root [data-returns-page] .admin-returns-product > label {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 6px 0;
  cursor: pointer;
}

:root [data-returns-page] .admin-returns-product > label input[type="checkbox"] {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  box-sizing: border-box;
  border: 1.5px solid var(--so-line2);
  border-radius: 6px;
  background: transparent center / 12px 12px no-repeat;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 0.3s;
}

:root [data-returns-page] .admin-returns-product > label input[type="checkbox"]:checked {
  border-color: var(--so-ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ededed' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

:root[data-admin-theme='light'] [data-returns-page] .admin-returns-product > label input[type="checkbox"]:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23161616' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

:root [data-returns-page] .admin-returns-product > label input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--so-ink2);
  outline-offset: 2px;
}

:root [data-returns-page] .admin-returns-product > label > span {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

:root [data-returns-page] .admin-returns-product strong {
  color: var(--so-ink3);
  font-size: 13.5px;
  font-weight: 600;
  transition: color 0.3s;
}

:root [data-returns-page] .admin-returns-product.is-selected strong {
  color: var(--so-ink);
}

:root [data-returns-page] .admin-returns-product > label small {
  color: var(--so-ink3);
  font: 400 11.5px/1.4 var(--so-mono);
}

:root [data-returns-page] .admin-returns-quantity {
  display: flex;
  flex: none;
  align-items: center;
  gap: 6px;
}

:root [data-returns-page] .admin-returns-quantity button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--so-line2);
  border-radius: 50%;
  background: transparent;
  color: var(--so-ink);
  font: 400 15px/1 var(--so-font);
  cursor: pointer;
  transition: transform 0.35s var(--so-ease), border-color 0.25s;
}

:root [data-returns-page] .admin-returns-quantity button:hover {
  border-color: var(--so-ink3);
  transform: translateY(-1px);
}

:root [data-returns-page] .admin-returns-quantity button:active {
  transform: scale(0.94);
  transition-duration: 0.08s;
}

:root [data-returns-page] .admin-returns-quantity input {
  width: 52px;
  height: 30px;
  min-height: 0;
  box-sizing: border-box;
  padding: 0 6px;
  border: 1px solid var(--so-line2);
  border-radius: 999px;
  background: transparent;
  color: var(--so-ink);
  font: 600 13px/1 var(--so-mono);
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}

:root [data-returns-page] .admin-returns-quantity input::-webkit-inner-spin-button,
:root [data-returns-page] .admin-returns-quantity input::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

:root [data-returns-page] .admin-returns-quantity small {
  min-width: 36px;
  color: var(--so-ink3);
  font-size: 12px;
  font-weight: 400;
}

:root [data-returns-page] .admin-returns-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0;
  padding: 4px 0 0;
  border: 0;
  background: transparent;
}

:root [data-returns-page] .admin-returns-card-actions > span {
  flex: 1;
  color: var(--so-ink2);
  font-size: 13px;
  font-weight: 400;
}

:root [data-returns-page] .admin-returns-card-actions > span b {
  color: var(--so-ink);
  font: 600 13px/1 var(--so-mono);
}

:root [data-returns-page] .admin-returns-card-actions > .admin-primary-btn,
:root [data-returns-page] .admin-returns-card-actions > .admin-ghost-btn {
  height: 42px;
  padding: 0 22px;
  font-size: 13.5px;
}

:root [data-returns-page] .admin-returns-card-actions > .admin-ghost-btn {
  padding: 0 18px;
  font-size: 13px;
}

:root [data-returns-page] [data-return-products-next]::after {
  content: '';
  width: 15px;
  height: 15px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Step 3: destination cards */
:root [data-returns-page] .admin-returns-destinations {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

html[data-device="computer"] [data-returns-page] .admin-returns-destinations {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

html[data-device="computer"] [data-returns-page] .admin-returns-destinations:has(> label[data-return-unrecoverable]:not([hidden])) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

:root [data-returns-page] .admin-returns-destinations legend {
  grid-column: 1 / -1;
  margin: 0 0 -2px;
}

:root [data-returns-page] .admin-returns-destinations > label {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: 'icon dot' 'text text';
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  min-height: 118px;
  padding: 14px 16px;
  border: 1px solid var(--so-line2);
  border-radius: 18px;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  transition: transform 0.4s var(--so-ease), border-color 0.3s, background-color 0.3s;
}

:root [data-returns-page] .admin-returns-destinations > label::before {
  grid-area: dot;
  width: 18px;
  height: 18px;
  background: var(--so-ink);
  box-shadow: inset 0 0 0 9px var(--so-panel);
}

:root [data-returns-page] .admin-returns-destinations > label:has(input:checked)::before {
  box-shadow: inset 0 0 0 3px var(--so-card);
}

:root [data-returns-page] .admin-returns-destinations > label:hover {
  border-color: var(--so-ink3);
  transform: translateY(-2px);
}

:root [data-returns-page] .admin-returns-destinations > label:has(input:checked) {
  border-color: var(--so-ink);
  background: var(--so-card);
  box-shadow: none;
}

:root [data-returns-page] .admin-returns-destinations > label:has(input:focus-visible) {
  outline: 2px solid var(--so-ink2);
  outline-offset: 2px;
}

:root [data-returns-page] .admin-returns-destination-icon {
  display: grid;
  grid-area: icon;
  place-items: center;
  width: 34px;
  height: 34px;
  box-sizing: border-box;
  border: 1px solid var(--so-line2);
  border-radius: 50%;
  background: transparent;
  color: var(--so-ink2);
  transition: color 0.3s;
}

:root [data-returns-page] .admin-returns-destinations > label:has(input:checked) .admin-returns-destination-icon {
  color: var(--so-ink);
}

:root [data-returns-page] .admin-returns-destination-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:root [data-returns-page] .admin-returns-destinations label > span:last-child {
  display: flex;
  grid-area: text;
  flex-direction: column;
  gap: 2px;
  align-self: end;
}

:root [data-returns-page] .admin-returns-destinations strong {
  color: var(--so-ink);
  font-size: 13.5px;
  font-weight: 600;
}

:root [data-returns-page] .admin-returns-destinations small {
  color: var(--so-ink2);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

:root [data-returns-page] .admin-returns-partner-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: 'label amount' 'note amount';
  align-items: center;
  gap: 2px 18px;
  padding: 12px 2px;
  border: 0;
  border-top: 1px solid var(--so-line);
  border-bottom: 1px solid var(--so-line);
  border-radius: 0;
  background: transparent;
  animation: so-rise 0.45s var(--so-ease) both;
}

:root [data-returns-page] .admin-returns-partner-summary span {
  grid-area: label;
  color: var(--so-ink2);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

:root [data-returns-page] .admin-returns-partner-summary strong {
  grid-area: amount;
  color: var(--so-ink);
  font: 600 20px/1.2 var(--so-mono);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

:root [data-returns-page] .admin-returns-partner-summary small {
  grid-area: note;
  grid-column: auto;
  color: var(--so-ink3);
  font-size: 12px;
  font-weight: 400;
}

:root [data-returns-page] .admin-returns-quote {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 420px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  animation: so-rise 0.45s var(--so-ease) both;
}

:root [data-returns-page] .admin-returns-quote label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

:root [data-returns-page] .admin-returns-quote label > span {
  display: flex;
  align-items: center;
  gap: 8px;
}

:root [data-returns-page] .admin-returns-quote label > span b {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border: 1px solid var(--so-line2);
  border-radius: 5px;
  background: transparent;
  color: var(--so-ink2);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

:root [data-returns-page] .admin-returns-quote label > div {
  position: relative;
  display: flex;
  align-items: center;
}

:root [data-returns-page] .admin-returns-quote label i {
  position: absolute;
  left: 16px;
  z-index: 1;
  margin: 0;
  padding: 0;
  color: var(--so-ink3);
  font: 400 13px/1 var(--so-mono);
  font-style: normal;
  pointer-events: none;
}

:root [data-returns-page] .admin-returns-layout input[name="quote_amount"] {
  flex: 1;
  width: auto;
  min-width: 0;
  height: 40px;
  padding: 0 16px 0 44px;
  font: 600 14px/1 var(--so-mono);
}

:root [data-returns-page] .admin-returns-final-actions {
  justify-content: flex-end;
  gap: 8px;
}

:root [data-returns-page] .admin-returns-final-actions > [data-return-complete] {
  min-width: 210px;
}

/* Recent activity */
:root [data-returns-page] .admin-returns-history {
  position: static;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 2px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  animation: so-rise 0.55s var(--so-ease) 80ms backwards;
}

html[data-device="computer"] [data-returns-page] .admin-returns-history {
  position: sticky;
  top: 14px;
  grid-column: 2;
  padding-left: 20px;
  border-left: 1px solid var(--so-line);
}

:root [data-returns-page] .admin-returns-history-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 30px;
}

:root [data-returns-page] .admin-returns-history-head > div {
  display: block;
  flex: 1;
}

:root [data-returns-page] .admin-returns-history-head h2 {
  margin: 0;
  color: var(--so-ink);
  font: 600 15px/1.3 var(--so-font);
}

:root [data-returns-page] .admin-returns-history-head button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  min-height: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--so-ink2);
  font: 500 12.5px/1 var(--so-font);
  cursor: pointer;
  transition: color 0.25s, background-color 0.25s;
}

:root [data-returns-page] .admin-returns-history-head button::before {
  content: '';
  width: 13px;
  height: 13px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12a8 8 0 1 1-2.3-5.6L20 8.5M20 4v4.5h-4.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12a8 8 0 1 1-2.3-5.6L20 8.5M20 4v4.5h-4.5'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.6s var(--so-ease);
}

:root [data-returns-page] .admin-returns-history-head button:hover {
  background: transparent;
  color: var(--so-ink);
}

:root [data-returns-page] .admin-returns-history-head button:active::before {
  transform: rotate(180deg);
}

:root [data-returns-page] .admin-returns-history-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: none;
  overflow: visible;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--so-line);
  border-radius: 0;
  background: transparent;
}

html[data-device="computer"] [data-returns-page] .admin-returns-history-list {
  max-height: calc(100svh - 270px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--so-line2) transparent;
}

:root [data-returns-page] .admin-returns-history-list > p {
  align-self: stretch;
  margin: 0;
  padding: 16px 2px;
  color: var(--so-ink3);
  font-size: 12.5px;
  font-weight: 400;
  text-align: left;
}

:root [data-returns-page] .admin-returns-history-list > button {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 10px;
  box-sizing: border-box;
  width: 100%;
  min-height: 0;
  padding: 9px 4px;
  border: 0;
  border-bottom: 1px solid var(--so-line);
  border-radius: 0;
  background: transparent;
  color: var(--so-ink);
  text-align: left;
  opacity: 1;
  cursor: pointer;
  transition: background-color 0.25s;
  animation: so-rise 0.45s var(--so-ease) backwards;
}

:root [data-returns-page] .admin-returns-history-list > button:nth-child(2) { animation-delay: 30ms; }
:root [data-returns-page] .admin-returns-history-list > button:nth-child(3) { animation-delay: 60ms; }
:root [data-returns-page] .admin-returns-history-list > button:nth-child(n+4) { animation-delay: 90ms; }

:root [data-returns-page] .admin-returns-history-list > button:disabled {
  color: var(--so-ink);
  opacity: 1;
  cursor: default;
}

:root [data-returns-page] .admin-returns-history-list > button:not(:disabled):hover,
:root [data-returns-page] .admin-returns-history-list > button:not(:disabled):focus-visible {
  border-color: var(--so-line);
  background: var(--so-card2);
  outline: none;
}

:root [data-returns-page] .admin-returns-history-list button > span {
  display: contents;
}

/* Two independent lines: number + time, then order + status. */
:root [data-returns-page] .admin-returns-history-list > button::after {
  content: '';
  flex-basis: 100%;
  order: 3;
  height: 0;
}

:root [data-returns-page] .admin-returns-history-list strong {
  flex: 1 1 auto;
  order: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--so-ink);
  font: 600 11.5px/1.35 var(--so-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

:root [data-returns-page] .admin-returns-history-list small {
  flex: 1 1 auto;
  order: 4;
  min-width: 0;
  overflow: hidden;
  color: var(--so-ink2);
  font-size: 11.5px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

:root [data-returns-page] .admin-returns-history-list time {
  flex: none;
  order: 2;
  color: var(--so-ink3);
  font-size: 11px;
  font-weight: 400;
  white-space: nowrap;
}

:root [data-returns-page] .admin-returns-history-list em {
  display: inline-flex;
  flex: none;
  order: 5;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
  gap: 6px;
  width: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--so-mint);
  font-size: 11.5px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

:root [data-returns-page] .admin-returns-history-list em::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

:root [data-returns-page] .admin-returns-history-list em.is-draft {
  background: transparent;
  color: var(--so-amber);
}

:root [data-returns-page] .admin-returns-history-list em.is-complete {
  background: transparent;
  color: var(--so-mint);
}

/* ---------- SKU catalog ---------- */
:root [data-sku-db] .admin-layout {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: auto;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 2px 2px 0;
}

/* Intro line with the read-only chip and sync status on the right. */
:root [data-sku-db] .admin-hero-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 14px 24px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  animation: so-rise 0.55s var(--so-ease) backwards;
}

:root [data-sku-db] .admin-hero-panel:hover {
  transform: none;
  box-shadow: none;
}

:root [data-sku-db] .admin-hero-copy {
  display: contents;
}

:root [data-sku-db] .admin-hero-copy h2 {
  display: none;
}

:root [data-sku-db] .admin-hero-copy p {
  flex: 1 1 100%;
  order: 1;
  max-width: none;
  min-width: 0;
  margin: 0;
  color: var(--so-ink2);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.45;
}

:root [data-sku-db] .admin-hero-copy .admin-chip {
  display: inline-flex;
  flex: none;
  order: 2;
  align-items: center;
  box-sizing: border-box;
  height: 22px;
  margin: 0;
  padding: 0 8px;
  border: 1px solid var(--so-line2);
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  color: var(--so-ink2);
  font: 600 11.5px/1 var(--so-font);
  letter-spacing: 0;
  text-transform: none;
}

:root [data-sku-db] .admin-hero-actions {
  display: flex;
  flex: none;
  order: 3;
  align-items: center;
  height: 22px;
  margin: 0;
  padding: 0;
}

:root [data-sku-db] .admin-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--so-ink2);
  font-size: 12.5px;
  font-weight: 400;
}

:root [data-sku-db] .admin-status-dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--so-mint);
  box-shadow: none;
  animation: none;
}

/* Four numbers between two thin lines. */
:root [data-sku-db] .admin-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--so-line);
  border-bottom: 1px solid var(--so-line);
}

:root [data-sku-db] .admin-metric-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  min-height: 0;
  padding: 12px 18px;
  border: 0;
  border-left: 1px solid var(--so-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  animation: so-rise 0.55s var(--so-ease) 60ms backwards;
}

:root [data-sku-db] .admin-metric-card:nth-child(odd) {
  border-left: 0;
}

:root [data-sku-db] .admin-metric-card:nth-child(n+3) {
  border-top: 1px solid var(--so-line);
}

html[data-device="computer"] [data-sku-db] .admin-hero-copy p {
  flex-basis: 0;
}

html[data-device="computer"] [data-sku-db] .admin-metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

html[data-device="computer"] [data-sku-db] .admin-metric-card:nth-child(n) {
  border-top: 0;
  border-left: 1px solid var(--so-line);
}

html[data-device="computer"] [data-sku-db] .admin-metric-card:first-child {
  border-left: 0;
}

:root [data-sku-db] .admin-metric-card:nth-child(2) { animation-delay: 110ms; }
:root [data-sku-db] .admin-metric-card:nth-child(3) { animation-delay: 160ms; }
:root [data-sku-db] .admin-metric-card:nth-child(4) { animation-delay: 210ms; }

:root [data-sku-db] .admin-metric-card:hover {
  transform: none;
  box-shadow: none;
}

:root [data-sku-db] .admin-metric-card::before,
:root [data-sku-db] .admin-metric-card::after {
  display: none;
}

:root [data-sku-db] .admin-metric-card span {
  color: var(--so-ink2);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

:root [data-sku-db] .admin-metric-card strong {
  margin: 0;
  color: var(--so-ink);
  font: 600 21px/1.25 var(--so-mono);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

:root [data-sku-db] .admin-metric-card small {
  margin: 0;
  color: var(--so-ink3);
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.4;
}

/* Filters and the sheet: flat sections */
:root [data-sku-db] .admin-main-grid-sku {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
  margin: 0;
}

:root [data-sku-db] .admin-main-grid-sku > .admin-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  animation: so-rise 0.55s var(--so-ease) 120ms backwards;
}

:root [data-sku-db] .admin-main-grid-sku > .admin-panel:hover {
  transform: none;
  box-shadow: none;
}

:root [data-sku-db] .admin-main-grid-sku .admin-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 0;
}

:root [data-sku-db] .admin-main-grid-sku .admin-panel-head .admin-panel-kicker {
  display: none;
}

:root [data-sku-db] .admin-main-grid-sku .admin-panel-head h3 {
  margin: 0;
  color: var(--so-ink);
  font: 600 14px/1.3 var(--so-font);
  letter-spacing: 0;
}

:root [data-sku-db] .admin-main-grid-sku .admin-panel-meta {
  color: var(--so-ink3);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-align: right;
  text-transform: none;
}

:root [data-sku-db] .admin-sku-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin: 0;
}

html[data-device="computer"] [data-sku-db] .admin-sku-form-grid {
  grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr));
}

@media (max-width: 1399px) {
  html[data-device="computer"] [data-sku-db] .admin-sku-form-grid {
    grid-template-columns: minmax(0, 2.6fr) repeat(4, minmax(0, 1fr));
  }
}

:root [data-sku-db] .admin-sku-form-grid label {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

:root [data-sku-db] .admin-sku-form-grid label > span {
  color: var(--so-ink2);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

:root [data-sku-db] .admin-sku-form-grid :is(input, select) {
  width: 100%;
  height: 36px;
  font-size: 13px;
}

:root [data-sku-db] .admin-sku-form-grid label:has(> select)::after {
  bottom: 11px;
}

:root [data-sku-db] .admin-sku-form-grid [data-sku-search] {
  padding-left: 38px;
  text-overflow: ellipsis;
}

:root [data-sku-db] .admin-sku-form-grid label:has([data-sku-search])::before {
  content: '';
  position: absolute;
  bottom: 10px;
  left: 14px;
  width: 16px;
  height: 16px;
  background: var(--so-ink3);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='m20 20-4.2-4.2'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='m20 20-4.2-4.2'/%3E%3C/svg%3E") center / contain no-repeat;
  pointer-events: none;
}

:root [data-sku-db] .admin-main-grid-sku .admin-form-error {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--so-red);
  font-size: 13px;
  font-weight: 600;
  animation: so-rise 0.4s var(--so-ease) both;
}

/* The sheet */
:root [data-sku-db] .admin-sheet-wrap {
  min-height: 160px;
  margin: 0;
  overflow: auto;
  border: 0;
  border-top: 1px solid var(--so-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  scrollbar-width: thin;
  scrollbar-color: var(--so-line2) transparent;
}

html[data-device="computer"] [data-sku-db] .admin-main-grid-sku,
html[data-device="computer"] [data-sku-db] .admin-main-grid-sku > .admin-panel:last-child {
  flex: 1 1 0;
  min-height: 0;
}

html[data-device="computer"] [data-sku-db] .admin-sheet-wrap {
  flex: 1 1 0;
}

:root[data-admin-theme] [data-sku-db] .admin-sheet-wrap {
  background: transparent;
}

:root [data-sku-db] .admin-sheet-table {
  width: 100%;
  min-width: 1090px;
  border-collapse: collapse;
  border-spacing: 0;
  background: transparent;
}

:root [data-sku-db] .admin-sheet-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

:root [data-sku-db] .admin-sheet-table thead th {
  position: static;
  height: 34px;
  padding: 0 5px;
  border: 0;
  border-bottom: 1px solid var(--so-line);
  background: var(--so-panel);
  color: var(--so-ink3);
  font: 600 10.5px/1 var(--so-font);
  letter-spacing: 0.07em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

:root [data-sku-db] .admin-sheet-table tbody td {
  height: 40px;
  padding: 0 5px;
  border: 0;
  border-bottom: 1px solid var(--so-line);
  background: transparent;
  color: var(--so-ink2);
  font-size: 12.5px;
  font-weight: 400;
  vertical-align: middle;
  white-space: nowrap;
}

:root [data-sku-db] .admin-sheet-table :is(th, td):first-child {
  padding-left: 10px;
}

:root [data-sku-db] .admin-sheet-table :is(th, td):last-child {
  padding-right: 10px;
}

:root [data-sku-db] .admin-sheet-table :is(th, td):nth-child(n+7) {
  text-align: right;
}

:root [data-sku-db] .admin-sheet-table tbody td:nth-child(n+7) {
  color: var(--so-ink);
  font: 400 12px/1 var(--so-mono);
  font-variant-numeric: tabular-nums;
}

:root [data-sku-db] .admin-sheet-table tbody td:is(:nth-child(10), :nth-child(11)) {
  color: var(--so-ink2);
}

:root [data-sku-db] .admin-sheet-table tbody td:nth-child(2) {
  color: var(--so-ink);
}

:root [data-sku-db] .admin-sheet-table tbody td:first-child strong {
  color: var(--so-ink);
  font: 600 12px/1 var(--so-mono);
}

:root [data-sku-db] .admin-sheet-table tbody tr {
  transition: background-color 0.2s;
  animation: so-rise 0.45s var(--so-ease) backwards;
}

:root [data-sku-db] .admin-sheet-table tbody tr:nth-child(2) { animation-delay: 35ms; }
:root [data-sku-db] .admin-sheet-table tbody tr:nth-child(3) { animation-delay: 70ms; }
:root [data-sku-db] .admin-sheet-table tbody tr:nth-child(4) { animation-delay: 105ms; }
:root [data-sku-db] .admin-sheet-table tbody tr:nth-child(5) { animation-delay: 140ms; }
:root [data-sku-db] .admin-sheet-table tbody tr:nth-child(6) { animation-delay: 175ms; }
:root [data-sku-db] .admin-sheet-table tbody tr:nth-child(7) { animation-delay: 210ms; }
:root [data-sku-db] .admin-sheet-table tbody tr:nth-child(n+8) { animation-delay: 245ms; }

:root [data-sku-db] .admin-sheet-table tbody tr:hover td {
  background: var(--so-card2);
}

:root [data-sku-db] .admin-sheet-table tbody td.admin-empty {
  height: auto;
  padding: 44px 12px;
  color: var(--so-ink3);
  font: 400 13px/1.4 var(--so-font);
  text-align: center;
}

:root [data-sku-db] .admin-sheet-table tbody tr:hover td.admin-empty {
  background: transparent;
}

/* Phones: the order's date and line count wrap instead of being cut off. */
html[data-device="phone"] [data-transactions] .admin-po-summary-id small {
  overflow: visible;
  white-space: normal;
}
