:root {
  --green-950: #12352c;
  --green-900: #173f35;
  --green-800: #245348;
  --green-700: #397063;
  --green-100: #dcebe5;
  --green-050: #edf5f1;
  --gold: #9a7331;
  --gold-soft: #f5ecd9;
  --paper: #fffefa;
  --canvas: #f3f5f3;
  --ink: #1b2823;
  --muted: #6b7771;
  --line: #dce3df;
  --line-strong: #c8d2cd;
  --red: #9a443d;
  --red-soft: #f7e9e6;
  --blue: #316d8d;
  --blue-soft: #e7f0f5;
  --shadow: 0 16px 44px rgba(18, 53, 44, 0.12);
  --focus: 0 0 0 3px rgba(57, 112, 99, 0.22);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  letter-spacing: 0;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--canvas); }
body { min-width: 320px; min-height: 100vh; margin: 0; background: var(--canvas); }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.5; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 0;
  box-shadow: var(--focus);
}
[hidden] { display: none !important; }

.login-view {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 68px minmax(0, 1fr);
  background: var(--canvas);
}

.login-brand,
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-brand {
  width: 100%;
  min-height: 68px;
  padding: 0 max(20px, calc((100vw - 1080px) / 2));
  color: white;
  background: var(--green-950);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.login-brand > span:last-child,
.brand-lockup > span:last-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.login-brand strong,
.brand-lockup strong {
  overflow: hidden;
  font-family: "Songti SC", "STSong", serif;
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-brand small { color: #afc3bb; font-size: 12px; }

.brand-logo {
  width: 68px;
  height: 56px;
  flex: 0 0 auto;
  display: block;
  padding: 3px;
  object-fit: contain;
  background: white;
  border: 1px solid rgba(220, 185, 100, 0.65);
  border-radius: 4px;
}

.brand-logo--small { width: 50px; height: 41px; padding: 2px; }

.login-main {
  display: grid;
  align-items: start;
  justify-items: center;
  padding: clamp(42px, 8vh, 84px) 20px 72px;
}

.login-panel {
  width: min(100%, 520px);
  padding: 32px 34px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(18, 53, 44, 0.08);
}

.login-heading { margin-bottom: 25px; }
.login-heading p,
.page-heading p,
.section-heading p {
  margin: 0 0 5px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 750;
}

.login-heading h1,
.page-heading h1,
.section-heading h2 { margin: 0; letter-spacing: 0; }
.login-heading h1 { font-size: 24px; }

.field-label {
  display: block;
  margin: 16px 0 7px;
  color: #44534c;
  font-size: 13px;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  color: var(--ink);
  background: white;
  border: 1px solid #cbd5d0;
  border-radius: 6px;
}

input, select { min-height: 46px; padding: 0 13px; }
select { appearance: none; padding-right: 38px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-repeat: no-repeat; background-size: 5px 5px, 5px 5px; }
textarea { min-height: 78px; padding: 12px 13px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #9aa49f; }
input:focus, select:focus, textarea:focus { border-color: var(--green-700); }

.form-error,
.global-error {
  color: var(--red);
  background: var(--red-soft);
  border-left: 3px solid var(--red);
  font-size: 13px;
  line-height: 1.5;
}

.form-error { margin: 16px 0 0; padding: 10px 12px; }
.global-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding: 11px 14px;
}

.primary-button,
.secondary-button,
.text-button,
.icon-button,
.dialog-close {
  border: 0;
  border-radius: 6px;
}

.primary-button {
  min-height: 44px;
  padding: 0 19px;
  color: white;
  background: var(--green-800);
  font-weight: 700;
}

.primary-button:hover { background: var(--green-900); }
.login-button { width: 100%; margin-top: 22px; }

.secondary-button {
  min-height: 42px;
  padding: 0 17px;
  color: var(--green-900);
  background: white;
  border: 1px solid var(--line-strong);
  font-weight: 650;
}

.text-button { padding: 8px; color: var(--green-800); background: transparent; }
.icon-button {
  width: 40px;
  height: 40px;
  color: var(--green-800);
  background: var(--green-050);
  font-size: 22px;
}

.workspace-view { min-height: 100vh; padding-bottom: 78px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 18px;
  background: rgba(255, 254, 250, 0.97);
  border-bottom: 1px solid var(--line);
}

.brand-lockup { min-width: 0; }
.brand-lockup strong { max-width: min(52vw, 420px); color: var(--green-950); font-size: 17px; }
.brand-lockup small {
  max-width: min(52vw, 420px);
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar-actions { display: flex; align-items: center; gap: 3px; }

.main-content { width: min(100%, 920px); margin: 0 auto; padding: 25px 18px 34px; }
.page-panel { min-height: calc(100vh - 180px); }

.page-heading,
.section-heading,
.dialog-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.page-heading { margin-bottom: 20px; }
.page-heading h1 { font-size: 25px; }
.page-heading time { color: var(--muted); font-size: 11px; white-space: nowrap; }
.section-heading { margin-bottom: 14px; }
.section-heading h2 { font-size: 19px; }

.count-label {
  flex: 0 0 auto;
  color: var(--green-800);
  font-size: 12px;
  font-weight: 700;
}

.section-link {
  min-height: 34px;
  padding: 0;
  color: var(--green-800);
  background: transparent;
  border: 0;
  font-size: 13px;
  font-weight: 650;
}

.metric-band {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 0 -18px 28px;
  padding: 20px 18px;
  background: var(--green-950);
  color: white;
}

.metric-band article {
  min-width: 0;
  padding: 2px 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.metric-band article:first-child { padding-left: 0; }
.metric-band article:last-child { padding-right: 0; border-right: 0; }
.metric-band span, .metric-band small { display: block; color: #b8cbc3; }
.metric-band span { font-size: 11px; }
.metric-band strong {
  display: block;
  margin: 7px 0 4px;
  overflow: hidden;
  color: #fffdf8;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 25px;
  text-overflow: ellipsis;
}
.metric-band small { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.metric-band article.has-warning strong,
.metric-band article.has-warning small { color: #f0ce83; }

.content-section { padding: 23px 0; border-top: 1px solid var(--line); }
.content-section:first-of-type { border-top: 0; }
.state-block { padding: 42px 10px; color: var(--muted); text-align: center; font-size: 13px; }

.pending-breakdown {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
  border-block: 1px solid var(--line);
}
.pending-breakdown span {
  min-width: 0;
  padding: 11px 12px;
  color: var(--muted);
  border-right: 1px solid var(--line);
  font-size: 11px;
}
.pending-breakdown span:last-child { border-right: 0; }
.pending-breakdown strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pending-limit-notice {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 14px;
  padding: 10px 12px;
  color: #664b16;
  background: var(--gold-soft);
  border-left: 3px solid var(--gold);
  font-size: 11px;
  line-height: 1.5;
}
.pending-limit-notice span { min-width: 0; overflow-wrap: anywhere; }
.pending-limit-notice .section-link { flex: 0 0 auto; }

.inventory-list,
.organization-list,
.dialog-items { border-top: 1px solid var(--line); }

.inventory-item,
.organization-item,
.dialog-item {
  min-width: 0;
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
}

.inventory-item { grid-template-columns: minmax(0, 0.8fr) minmax(390px, 1.2fr); }
.inventory-item.low-stock { background: #fffcf6; box-shadow: inset 3px 0 0 var(--gold); }
.inventory-main, .product-main, .order-copy { min-width: 0; }
.inventory-main strong, .product-main h2, .order-copy h3, .organization-item strong {
  display: block;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
}
.inventory-main span, .product-main p, .organization-item span {
  display: block;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.inventory-policy {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-top: 8px;
}
.inventory-main .inventory-status {
  width: max-content;
  margin: 0;
  padding: 3px 6px;
  color: var(--muted);
  background: #edf0ee;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 750;
}
.inventory-main .inventory-status.normal { color: var(--green-800); background: var(--green-050); }
.inventory-main .inventory-status.low { color: #755514; background: var(--gold-soft); }
.inventory-main .inventory-policy-copy {
  min-width: 150px;
  flex: 1 1 150px;
  margin: 0;
  overflow-wrap: anywhere;
  line-height: 1.45;
}
.inventory-replenish-button {
  min-height: 30px;
  padding: 0 10px;
  color: var(--green-800);
  background: white;
  border: 1px solid #9ab7ad;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
}
.inventory-stats {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(44px, 1fr));
  gap: 10px;
}
.inventory-stat { min-width: 0; text-align: right; }
.inventory-stat span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 10px; }
.inventory-stat strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; }
.inventory-stat.available strong { color: var(--green-700); }
.inventory-stat.inbound strong { color: #1b6d7a; }
.inventory-stat.internal-transfer strong { color: #48645a; }
.inventory-stat.projected strong { color: var(--blue); }
.inventory-stat.outbound strong { color: #8a5b19; }

.warehouse-page-heading { align-items: flex-start; }
.warehouse-section-heading { align-items: center; }
.warehouse-heading-actions { display: flex; align-items: center; gap: 10px; }
.warehouse-heading-actions .primary-button { min-height: 38px; padding-inline: 14px; font-size: 12px; }
.warehouse-filter-heading { align-items: flex-end; }
.compact-select { width: min(210px, 48vw); }
.compact-select > span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-align: right;
}
.compact-select select { min-height: 38px; font-size: 12px; }
.warehouse-list,
.inventory-transfer-list { display: grid; gap: 10px; }
.warehouse-card,
.inventory-transfer-card {
  min-width: 0;
  padding: 15px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
}
.warehouse-card.inactive { background: #f4f5f4; }
.warehouse-card-head,
.warehouse-card-foot,
.inventory-transfer-card-head,
.inventory-transfer-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.warehouse-card-title,
.inventory-transfer-card-title { min-width: 0; }
.warehouse-card-title strong,
.inventory-transfer-card-title button {
  display: block;
  max-width: 100%;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  background: transparent;
  border: 0;
  font-size: 14px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.warehouse-card-title span,
.inventory-transfer-card-title span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}
.warehouse-card-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}
.warehouse-card-summary div {
  min-width: 0;
  padding: 9px;
  background: var(--canvas);
  border-left: 3px solid var(--line-strong);
}
.warehouse-card-summary span { display: block; color: var(--muted); font-size: 10px; }
.warehouse-card-summary strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  text-overflow: ellipsis;
}
.warehouse-card-foot { min-height: 35px; padding-top: 11px; border-top: 1px solid var(--line); }
.warehouse-card-foot small { color: var(--muted); font-size: 10px; }
.warehouse-toggle-button { min-width: 76px; }
.warehouse-inventory-list { border-top: 1px solid var(--line); }
.warehouse-inventory-item {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) repeat(4, minmax(58px, 0.55fr));
  align-items: center;
  gap: 10px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
}
.warehouse-inventory-copy { min-width: 0; }
.warehouse-inventory-copy strong,
.warehouse-inventory-copy span { display: block; overflow-wrap: anywhere; }
.warehouse-inventory-copy strong { font-size: 13px; }
.warehouse-inventory-copy span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.warehouse-inventory-stat { min-width: 0; text-align: right; }
.warehouse-inventory-stat span { display: block; color: var(--muted); font-size: 9px; }
.warehouse-inventory-stat strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  text-overflow: ellipsis;
}
.warehouse-inventory-stat.available strong { color: var(--green-700); }
.warehouse-inventory-stat.transit strong { color: #315f7d; }
.transfer-filters { grid-template-columns: repeat(7, minmax(58px, 1fr)); }
.inventory-transfer-route {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  padding: 11px;
  background: var(--canvas);
}
.inventory-transfer-route div { min-width: 0; }
.inventory-transfer-route span,
.inventory-transfer-route strong { display: block; overflow-wrap: anywhere; }
.inventory-transfer-route span { color: var(--muted); font-size: 9px; }
.inventory-transfer-route strong { margin-top: 4px; font-size: 12px; }
.inventory-transfer-route b { color: var(--gold); font-size: 17px; font-weight: 700; }
.inventory-transfer-copy { margin: 0 0 12px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.inventory-transfer-card-foot { min-height: 35px; padding-top: 11px; border-top: 1px solid var(--line); }
.inventory-transfer-card-foot time { color: var(--muted); font-size: 10px; }
.inventory-transfer-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.warehouse-dialog { width: min(100% - 24px, 500px); }
.warehouse-dialog form,
.inventory-transfer-dialog form { margin: 0; }
.warehouse-form-body { padding-top: 18px; }
.warehouse-form-body label,
.inventory-transfer-form-body label { display: block; }
.warehouse-form-body label + label { margin-top: 15px; }
.warehouse-form-body label > span,
.inventory-transfer-form-body label > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.warehouse-form-note { margin: 13px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.inventory-transfer-dialog { width: min(100% - 24px, 660px); }
.inventory-transfer-form-body { padding-top: 18px; }
.inventory-transfer-warehouse-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.inventory-transfer-items-heading { margin: 20px 0 8px; }
.inventory-transfer-item-list { border-top: 1px solid var(--line); }
.inventory-transfer-form-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 110px;
  align-items: center;
  gap: 10px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--line);
}
.inventory-transfer-form-item > input[type="checkbox"] { width: 18px; min-height: 18px; }
.inventory-transfer-form-copy { min-width: 0; }
.inventory-transfer-form-copy strong,
.inventory-transfer-form-copy span { display: block; overflow-wrap: anywhere; }
.inventory-transfer-form-copy strong { font-size: 12px; }
.inventory-transfer-form-copy span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.inventory-transfer-quantity { min-height: 38px; text-align: center; }
.inventory-transfer-note { margin-top: 17px; }
.inventory-transfer-meta dd { overflow-wrap: anywhere; }

.stocktake-heading-actions { display: flex; align-items: center; gap: 10px; }
.stocktake-heading-actions .primary-button { min-height: 38px; padding-inline: 14px; font-size: 12px; }
.stocktake-filters { margin-top: 2px; }
.stocktake-list { display: grid; gap: 10px; }
.stocktake-card {
  min-width: 0;
  padding: 15px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
}
.stocktake-card-head,
.stocktake-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.stocktake-card-title {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  background: transparent;
  border: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stocktake-card-copy { margin: 11px 0; }
.stocktake-card-warehouse {
  margin-bottom: 7px;
  overflow-wrap: anywhere;
  color: var(--green-800);
  font-size: 11px;
  font-weight: 700;
}
.stocktake-card-copy p { margin: 0; overflow-wrap: anywhere; color: var(--muted); font-size: 11px; line-height: 1.55; }
.stocktake-variance-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.stocktake-variance-summary span {
  min-width: 0;
  padding: 7px 8px;
  color: var(--muted);
  background: var(--canvas);
  border-radius: 5px;
  font-size: 10px;
  text-align: center;
}
.stocktake-variance-summary strong { display: block; margin-top: 3px; color: var(--ink); font-size: 13px; }
.stocktake-variance-summary .gain strong { color: var(--green-700); }
.stocktake-variance-summary .loss strong { color: var(--red); }
.stocktake-card-foot { min-height: 35px; padding-top: 11px; border-top: 1px solid var(--line); }
.stocktake-card-foot time { color: var(--muted); font-size: 10px; }

.ledger-list { border-top: 1px solid var(--line); }
.ledger-item {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px 14px;
  padding: 15px 4px;
  border-bottom: 1px solid var(--line);
}
.ledger-main { min-width: 0; }
.ledger-main strong { display: block; overflow-wrap: anywhere; font-size: 13px; }
.ledger-main span {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ledger-delta { text-align: right; }
.ledger-delta strong {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.ledger-delta span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.ledger-delta.positive strong { color: var(--green-700); }
.ledger-delta.negative strong { color: var(--red); }
.ledger-meta {
  min-width: 0;
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  color: var(--muted);
  font-size: 10px;
}
.ledger-reference-text { min-width: 0; overflow-wrap: anywhere; }
.ledger-pagination,
.ledger-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 4px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 11px;
}
.ledger-error { color: var(--red); }
.ledger-pagination[hidden], .ledger-error[hidden] { display: none; }
.ledger-pagination .secondary-button { min-width: 96px; }

.pending-order-notice {
  margin-bottom: 18px;
  padding: 13px 15px;
  color: #6f5623;
  background: var(--gold-soft);
  border-left: 3px solid var(--gold);
}
.pending-order-notice strong, .pending-order-notice span { display: block; }
.pending-order-notice strong { font-size: 13px; }
.pending-order-notice span { margin-top: 3px; color: #876f41; font-size: 11px; }

.product-list { display: grid; gap: 10px; }
.product-item {
  min-height: 82px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 15px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
}
.product-item.selected { border-color: #9ab7ad; background: #fbfefa; }
.product-item.unpriced { background: #fafafa; }
.product-item.unpriced .product-mark { color: var(--muted); background: #eef1ef; }
.product-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--green-800);
  background: var(--green-050);
  border-radius: 5px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 17px;
  font-weight: 750;
}
.product-main h2 { font-size: 15px; }
.product-main .product-price {
  display: block;
  margin-top: 7px;
  color: var(--green-800);
  font-size: 13px;
  font-weight: 750;
}
.product-main .product-price.missing { color: var(--red); font-size: 11px; }
.product-pricing-meta { color: var(--green-800) !important; font-weight: 700; }
.product-next-tier { color: #876f41 !important; }
.quote-status {
  margin: 0 0 12px;
  padding: 10px 12px;
  color: var(--green-800);
  background: var(--green-050);
  border-left: 3px solid var(--green-700);
  font-size: 11px;
  font-weight: 700;
}
.quote-status.loading { color: #315f7d; background: #edf6fb; border-left-color: var(--blue); }
.quote-status.error { color: var(--red); background: var(--red-soft); border-left-color: var(--red); }
.quote-status[hidden] { display: none; }
.product-main .product-stock-policy {
  margin-top: 7px;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.45;
}
.product-main .product-stock-policy.normal { color: var(--green-700); }
.product-main .product-stock-policy.low { color: #755514; }
.quantity-stepper {
  width: 116px;
  height: 38px;
  display: grid;
  grid-template-columns: 36px 44px 36px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  overflow: hidden;
}
.quantity-stepper button {
  color: var(--green-900);
  background: #f7faf8;
  border: 0;
  font-size: 19px;
}
.quantity-stepper input {
  min-height: 36px;
  padding: 0 2px;
  border: 0;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-radius: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  text-align: center;
  appearance: textfield;
}
.quantity-stepper input::-webkit-inner-spin-button { margin: 0; appearance: none; }

.order-form { margin-top: 22px; padding-top: 2px; border-top: 1px solid var(--line); }
.order-address-section { padding: 16px 0 4px; }
.order-address-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}
.order-address-heading > div { display: flex; align-items: baseline; gap: 7px; }
.order-address-heading .field-label { margin: 0; }
.order-address-heading small { color: var(--red); font-size: 10px; font-weight: 700; }
.order-address-select { display: block; }
.order-address-select select { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.address-state,
.address-empty {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
}
.address-state--error { color: var(--red); background: var(--red-soft); border-color: #dfc3be; }
.address-empty p { margin: 0; }
.address-empty .secondary-button { min-height: 36px; padding-inline: 12px; font-size: 12px; }
.order-submit-bar {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 12px 0;
}
.order-submit-bar span { display: block; color: var(--muted); font-size: 11px; }
.order-submit-bar strong { display: block; margin-top: 3px; color: var(--green-950); font-size: 18px; }
.cart-warning { display: block; margin-top: 5px; color: var(--red); font-size: 10px; }

.segmented-control {
  height: 39px;
  display: grid;
  grid-template-columns: repeat(6, minmax(48px, 1fr));
  margin-bottom: 16px;
  padding: 3px;
  overflow-x: auto;
  background: #e8ece9;
  border-radius: 7px;
}
.segmented-control button {
  min-width: 0;
  padding: 0 5px;
  overflow: hidden;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 5px;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.segmented-control button.active { color: var(--ink); background: white; box-shadow: 0 1px 5px rgba(18, 53, 44, 0.1); font-weight: 700; }

.order-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.order-search label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.order-search input { min-width: 0; }
.order-search .text-button { min-width: 48px; }

.order-list { display: grid; gap: 10px; }
.order-card {
  padding: 15px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
}
.order-card-head, .order-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.order-card-head button {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  background: transparent;
  border: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.status-badge {
  flex: 0 0 auto;
  padding: 4px 7px;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 750;
}
.status-badge.approved { color: #786022; background: var(--gold-soft); }
.status-badge.partially-shipped { color: #6f5b23; background: #f5edcf; }
.status-badge.shipped { color: #7a5127; background: #f7e9d9; }
.status-badge.partially-received { color: #255d62; background: #dff0ef; }
.status-badge.received { color: var(--green-800); background: var(--green-050); }
.status-badge.rejected, .status-badge.stale { color: var(--red); background: var(--red-soft); }
.status-badge.cancelled { color: var(--red); background: var(--red-soft); }
.order-copy { margin: 12px 0; }
.order-copy h3 { font-size: 14px; }
.order-copy p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.order-copy .order-amount { display: block; margin-top: 8px; color: var(--green-800); font-size: 12px; }
.order-delivery {
  min-width: 0;
  margin: 0 0 12px;
  padding: 10px 11px;
  background: var(--green-050);
  border-left: 3px solid var(--green-700);
}
.order-delivery > span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 10px; }
.order-delivery strong { display: block; overflow-wrap: anywhere; font-size: 12px; }
.order-delivery p { margin: 3px 0 0; overflow-wrap: anywhere; color: var(--muted); font-size: 11px; line-height: 1.5; }
.order-delivery.missing { background: #f1f2f1; border-left-color: var(--line-strong); }
.order-delivery.missing p { color: var(--muted); }
.order-card-foot { min-height: 35px; padding-top: 11px; border-top: 1px solid var(--line); }
.order-card-foot time { color: var(--muted); font-size: 10px; }
.order-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.order-action-button {
  min-height: 34px;
  padding: 0 12px;
  color: var(--green-900);
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  font-size: 12px;
  font-weight: 650;
}
.order-action-button.primary { color: white; background: var(--green-800); border-color: var(--green-800); }
.order-action-button.danger { color: var(--red); border-color: #dfc3be; }
.order-pagination {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 11px;
}
.order-pagination[hidden] { display: none; }
.order-pagination .secondary-button { min-width: 96px; }

.identity-panel {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 0 24px;
}
.profile-mark {
  width: 72px;
  height: 60px;
  flex: 0 0 auto;
  display: block;
  padding: 4px;
  object-fit: contain;
  background: white;
  border: 1px solid rgba(154, 115, 49, 0.42);
  border-radius: 5px;
}
.identity-panel h2 { margin: 0; font-size: 20px; }
.identity-panel p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.profile-details { margin: 0; border-top: 1px solid var(--line); }
.profile-details > div {
  min-height: 49px;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid var(--line);
}
.profile-details dt { color: var(--muted); font-size: 12px; }
.profile-details dd { margin: 0; overflow-wrap: anywhere; text-align: right; font-size: 13px; font-weight: 650; }
.address-book-section { margin-top: 26px; }
.add-address-button { min-height: 38px; padding-inline: 14px; font-size: 12px; }
.address-book-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 4px;
  color: var(--red);
  border-top: 1px solid var(--line);
  font-size: 11px;
}
.address-list { display: grid; gap: 10px; }
.address-item {
  min-width: 0;
  padding: 15px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
}
.address-item.inactive { background: #f2f3f2; }
.address-item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.address-contact { min-width: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 10px; }
.address-contact strong { overflow-wrap: anywhere; font-size: 14px; }
.address-contact span { overflow-wrap: anywhere; color: var(--muted); font-size: 12px; }
.address-badges { flex: 0 0 auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.address-badge { padding: 4px 6px; border-radius: 4px; font-size: 10px; font-weight: 750; }
.address-badge.default { color: #786022; background: var(--gold-soft); }
.address-badge.active { color: var(--green-800); background: var(--green-050); }
.address-badge.inactive { color: var(--muted); background: #e2e5e3; }
.address-detail { margin: 10px 0 0; overflow-wrap: anywhere; color: #44534c; font-size: 12px; line-height: 1.6; }
.address-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line); }
.pricing-section { margin-top: 26px; }
.pricing-list { display: grid; gap: 10px; }
.pricing-item {
  min-width: 0;
  padding: 15px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
}
.pricing-item.has-error { border-color: #d7aaa5; }
.pricing-item.has-success { border-color: #9ab7ad; }
.pricing-item-heading {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.pricing-product { min-width: 0; }
.pricing-product strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 14px;
}
.pricing-product span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}
.pricing-badge {
  flex: 0 0 auto;
  max-width: 48%;
  padding: 4px 7px;
  overflow-wrap: anywhere;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 750;
  text-align: right;
}
.pricing-badge.configured { color: var(--green-800); background: var(--green-050); }
.pricing-badge.zero { color: #755a23; background: var(--gold-soft); }
.pricing-badge.missing { color: var(--red); background: var(--red-soft); }
.pricing-form { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.pricing-field { display: block; }
.pricing-field-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}
.pricing-controls {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px;
  gap: 8px;
}
.pricing-input-shell { position: relative; min-width: 0; }
.pricing-currency {
  position: absolute;
  z-index: 1;
  left: 12px;
  top: 50%;
  color: var(--muted);
  font-size: 13px;
  transform: translateY(-50%);
}
.pricing-input-shell input {
  min-width: 0;
  min-height: 42px;
  padding: 0 10px 0 29px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.pricing-save-button { min-width: 0; min-height: 42px; padding-inline: 10px; font-size: 12px; }
.pricing-feedback { margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.pricing-feedback.loading { color: var(--blue); }
.pricing-feedback.success { color: var(--green-700); }
.pricing-feedback.error { color: var(--red); }
.pricing-load-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 4px;
  color: var(--red);
  border-top: 1px solid var(--line);
  font-size: 11px;
}
.pricing-load-error[hidden] { display: none; }
.dealer-pricing-summary {
  margin-bottom: 18px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.dealer-pricing-summary > span { display: block; color: var(--muted); font-size: 10px; font-weight: 700; }
.dealer-pricing-summary > strong { display: block; margin-top: 4px; color: var(--green-900); font-size: 18px; }
.dealer-pricing-summary > p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.pricing-management { display: grid; gap: 24px; }
.pricing-workspace { padding-top: 18px; border-top: 1px solid var(--line); }
.pricing-schedule-workspace { margin-top: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcfb; }
.pricing-schedule-form { display: grid; gap: 12px; margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.pricing-schedule-time-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pricing-schedule-status { color: var(--muted); font-size: 10px; white-space: nowrap; }
.pricing-schedule-status.ready { color: var(--green-700); }
.pricing-schedule-status.loading { color: var(--blue); }
.pricing-schedule-status.error { color: var(--red); }
.pricing-schedule-status.muted { color: var(--muted); }
.pricing-schedule-workspace .table-wrap { margin-top: 14px; }
.pricing-schedule-workspace td strong, .pricing-schedule-workspace td small { display: block; }
.pricing-schedule-workspace td small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.pricing-schedule-workspace .table-action + .table-action { margin-left: 6px; }
.pricing-schedule-workspace .is-hidden { display: none !important; }
.pricing-tier-editor.is-hidden { display: none; }
@media (max-width: 760px) {
  .pricing-schedule-time-fields { grid-template-columns: 1fr; }
}
.pricing-workspace-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.pricing-workspace-heading h3 { font-size: 13px; }
.pricing-workspace-heading > div > span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.price-level-create-form { margin-bottom: 12px; }
.price-level-create-form > label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.price-level-create-form > div { display: grid; grid-template-columns: minmax(0, 1fr) 76px; gap: 8px; }
.price-level-create-form input, .price-level-create-form button { min-height: 40px; }
.price-level-list, .price-assignment-list { display: grid; gap: 8px; }
.price-level-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 62px;
  align-items: center;
  gap: 8px;
  padding: 11px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
}
.price-level-item.inactive { background: #f5f6f5; }
.price-level-item input[type="text"] { min-width: 0; min-height: 38px; }
.price-level-toggle { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.price-level-toggle input { width: 16px; height: 16px; margin: 0; accent-color: var(--green-700); }
.price-level-save { min-height: 38px; padding-inline: 8px; }
.price-level-item .pricing-feedback { grid-column: 1 / -1; margin: 0; }
.price-assignment-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(138px, 42%);
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
}
.price-assignment-copy { min-width: 0; }
.price-assignment-copy strong, .price-assignment-copy span { display: block; overflow-wrap: anywhere; }
.price-assignment-copy strong { font-size: 12px; }
.price-assignment-copy span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.price-assignment-item select { min-width: 0; min-height: 38px; }
.price-assignment-item .pricing-feedback { grid-column: 1 / -1; margin: 0; }
.price-policy-heading { align-items: flex-end; }
.price-policy-heading > label { min-width: min(180px, 48%); color: var(--muted); font-size: 10px; font-weight: 700; }
.price-policy-heading select { width: 100%; min-height: 38px; margin-top: 5px; }
.price-tier-list { display: grid; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.price-tier-row {
  display: grid;
  grid-template-columns: minmax(88px, 0.8fr) minmax(110px, 1fr) 36px;
  align-items: end;
  gap: 8px;
}
.price-tier-row label > span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 9px; font-weight: 700; }
.price-tier-row input { width: 100%; min-width: 0; min-height: 38px; }
.price-tier-remove { width: 36px; height: 38px; color: var(--red); background: var(--red-soft); }
.price-policy-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; margin-top: 12px; }
.price-policy-actions button { min-height: 38px; padding-inline: 10px; font-size: 11px; }
.danger-text { color: var(--red); }
.dealer-price-list { margin-top: 12px; }
.dealer-tier-list { display: grid; gap: 6px; margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--line); }
.dealer-tier-row { color: var(--green-800); font-size: 11px; font-weight: 700; }
.dialog-item-pricing { color: var(--green-700) !important; font-weight: 700; }
.organization-section { margin-top: 26px; }
.organization-item { grid-template-columns: minmax(0, 1fr) auto; }
.organization-type { color: var(--green-800); font-size: 11px; font-weight: 700; }
.logout-button { width: 100%; margin-top: 22px; }

.finance-page-heading .icon-button { flex: 0 0 auto; }
.order-finance-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 10px;
}
.order-data-error {
  margin: 9px 0 0;
  padding: 7px 9px;
  color: var(--red);
  background: var(--red-soft);
  border-radius: 5px;
  font-size: 10px;
  line-height: 1.45;
}
.finance-metric-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 20px;
  color: white;
  background: var(--green-950);
  border-radius: 7px;
  overflow: hidden;
}
.finance-metric-band article {
  min-width: 0;
  padding: 17px 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}
.finance-metric-band article:nth-child(3n) { border-right: 0; }
.finance-metric-band article:nth-child(-n + 3) { border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.finance-metric-band article:last-child { border-right: 0; }
.finance-metric-band span,
.finance-metric-band small { display: block; color: #b8cbc3; }
.finance-metric-band span { font-size: 10px; }
.finance-metric-band strong {
  display: block;
  margin: 7px 0 4px;
  overflow: hidden;
  color: #fffdf8;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.finance-metric-band small { font-size: 9px; }
.finance-metric-band article.has-warning strong,
.finance-metric-band article.has-warning small { color: #f0ce83; }
.finance-scope-control { margin-bottom: 4px; }

.return-workspace-section { margin-top: 26px; }
.return-workspace-heading { align-items: flex-start; }
.return-scope-control {
  height: auto;
  min-height: 39px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 2px 0 14px;
}
.return-scope-control button { min-height: 38px; padding: 6px 8px; white-space: normal; }
.return-workspace-list { display: grid; gap: 10px; }
.return-card {
  min-width: 0;
  padding: 15px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
}
.return-card.needs-attention { border-left: 4px solid var(--gold); }
.return-card-head,
.return-card-foot,
.return-card-progress,
.return-refund-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.return-card-head button {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  background: transparent;
  border: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.return-card-parties,
.return-card-reason { margin: 9px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.return-card-progress { margin-top: 12px; padding: 10px; background: var(--canvas); border-radius: 5px; }
.return-card-progress span { min-width: 0; color: var(--muted); font-size: 9px; }
.return-card-progress strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.return-card-progress > span:last-child { text-align: right; }
.return-card-foot { align-items: flex-end; min-height: 35px; padding-top: 11px; }
.return-card-foot time { color: var(--muted); font-size: 10px; }
.return-card-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.return-action-data-error { margin-top: 10px; }

.status-badge.requested { color: #755a23; background: var(--gold-soft); }
.status-badge.goods-received { color: var(--blue); background: var(--blue-soft); }
.status-badge.completed { color: var(--green-800); background: var(--green-050); }
.status-badge.refund-pending { color: #755a23; background: var(--gold-soft); }
.status-badge.partially-returned { color: var(--blue); background: var(--blue-soft); }
.status-badge.returned { color: var(--green-800); background: var(--green-050); }

.finance-order-list { display: grid; gap: 10px; }
.finance-order-card {
  min-width: 0;
  padding: 15px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
}
.finance-order-card.overdue { background: #fffbfa; border-color: #dfc3be; }
.finance-order-head,
.finance-order-foot,
.finance-receipt-head,
.settlement-account-head,
.settlement-account-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.finance-order-head button {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  background: transparent;
  border: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.finance-order-parties { margin: 10px 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.finance-order-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.finance-order-values span { min-width: 0; color: var(--muted); font-size: 9px; }
.finance-order-values strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.finance-order-values .outstanding strong { color: #835e17; }
.finance-order-card.overdue .finance-order-values .outstanding strong { color: var(--red); }
.finance-order-foot { min-height: 35px; padding-top: 11px; }
.finance-order-foot time { color: var(--muted); font-size: 10px; }
.finance-order-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }

.status-badge.unpaid,
.status-badge.credit-pending { color: #755a23; background: var(--gold-soft); }
.status-badge.partial,
.status-badge.credit-reserved,
.status-badge.receivable-open,
.status-badge.receivable-partial { color: var(--blue); background: var(--blue-soft); }
.status-badge.paid,
.status-badge.settled,
.status-badge.no-charge { color: var(--green-800); background: var(--green-050); }
.status-badge.overdue { color: var(--red); background: var(--red-soft); }
.status-badge.legacy-untracked { color: var(--muted); background: #edf0ee; }

.finance-receipt-list,
.finance-dialog-receipt-list,
.settlement-account-list { border-top: 1px solid var(--line); }
.finance-receipt-item,
.finance-dialog-receipt-item,
.settlement-account-item {
  min-width: 0;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
}
.finance-receipt-copy,
.settlement-account-copy { min-width: 0; }
.finance-receipt-copy strong,
.settlement-account-copy strong { display: block; overflow-wrap: anywhere; font-size: 13px; }
.finance-receipt-copy span,
.settlement-account-copy span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.finance-receipt-amount {
  flex: 0 0 auto;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.finance-receipt-meta { margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.finance-receipt-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 10px; }
.settlement-account-head { align-items: flex-start; }
.settlement-account-balance {
  flex: 0 0 auto;
  color: var(--green-800);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 700;
}
.settlement-account-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 11px 0;
}
.settlement-account-metrics span { min-width: 0; padding: 8px; color: var(--muted); background: var(--canvas); border-radius: 5px; font-size: 9px; }
.settlement-account-metrics strong { display: block; margin-top: 4px; overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.settlement-account-foot span { color: var(--muted); font-size: 10px; }

.finance-ledger-list { border-top: 1px solid var(--line); }
.finance-ledger-item {
  min-width: 0;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
}
.finance-ledger-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.finance-ledger-head > div { min-width: 0; }
.finance-ledger-head strong,
.finance-ledger-head span { display: block; overflow-wrap: anywhere; }
.finance-ledger-head span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.finance-ledger-amount {
  flex: 0 0 auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.finance-ledger-balances,
.finance-ledger-meta { margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }

.finance-order-dialog { width: min(100% - 24px, 660px); }
.return-detail-dialog { width: min(100% - 24px, 720px); }
.return-detail-state { min-height: 220px; margin: 0; padding: 28px 18px; }
.return-detail-state.ledger-error { justify-content: center; border-top: 0; }
.return-detail-meta dd { white-space: pre-line; line-height: 1.55; }
.return-finance-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 22px;
}
.return-finance-grid div { min-width: 0; padding: 10px; background: var(--canvas); border-radius: 5px; }
.return-finance-grid dt { color: var(--muted); font-size: 9px; }
.return-finance-grid dd {
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.return-refund-list { border-top: 1px solid var(--line); }
.return-refund-item { min-width: 0; padding: 13px 0; border-bottom: 1px solid var(--line); }
.return-refund-copy { min-width: 0; }
.return-refund-copy strong,
.return-refund-copy span { display: block; overflow-wrap: anywhere; }
.return-refund-copy strong { font-size: 12px; }
.return-refund-copy span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.return-refund-amount {
  flex: 0 0 auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}
.return-refund-meta { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.return-action-dialog { width: min(100% - 24px, 640px); }
.return-action-dialog form { margin: 0; }
.return-action-body { padding-top: 18px; }
.return-action-fields { display: grid; gap: 15px; margin-top: 16px; }
.return-request-selection { min-width: 0; }
.return-request-heading { align-items: center; }
.return-request-selection-actions {
  display: flex;
  justify-content: flex-end;
  gap: 13px;
  margin: 4px 0 7px;
}
.return-request-selection-actions button:disabled { color: var(--muted); cursor: not-allowed; }
.return-request-item-list { border-top: 1px solid var(--line); }
.return-request-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 92px;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.return-request-item > input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  accent-color: var(--green-800);
}
.return-request-item-copy { min-width: 0; }
.return-request-item-copy strong,
.return-request-item-copy span { display: block; overflow-wrap: anywhere; }
.return-request-item-copy strong { font-size: 12px; }
.return-request-item-copy span { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.return-request-quantity { min-width: 0; }
.return-request-quantity span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 9px; text-align: right; }
.return-request-quantity input {
  width: 100%;
  height: 36px;
  padding: 0 8px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  text-align: right;
}
.return-request-quantity input:disabled { color: var(--muted); background: var(--canvas); }
.return-request-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 11px 12px;
  background: var(--green-050);
  border-radius: 5px;
}
.return-request-total span { color: var(--muted); font-size: 11px; }
.return-request-total strong { color: var(--green-800); font-size: 14px; }
.return-action-fields label { min-width: 0; }
.return-action-fields label > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.return-action-fields > label > textarea { width: 100%; }
.return-action-fields .payment-receipt-fields { margin: 0; }
.return-action-fields .payment-receipt-fields + label { margin-top: 0; }
.return-action-fields .shipment-methods { margin: 0; }
.return-confirm-copy {
  margin: 16px 0 0;
  padding: 12px;
  color: var(--ink);
  background: var(--gold-soft);
  border-left: 4px solid var(--gold);
  font-size: 12px;
  line-height: 1.65;
}
.return-action-body .form-error { margin-bottom: 0; }
.finance-order-meta dd { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; }
.payment-receipt-dialog,
.reject-payment-dialog,
.settlement-account-dialog { width: min(100% - 24px, 520px); }
.payment-receipt-dialog form,
.reject-payment-dialog form,
.settlement-account-dialog form { margin: 0; }
.payment-receipt-form-body,
.settlement-account-form-body { padding-top: 18px; }
.payment-receipt-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.payment-receipt-fields label,
.payment-receipt-form-body > label,
.reject-payment-dialog .dialog-body > label,
.settlement-credit-fields label { min-width: 0; }
.payment-receipt-fields label > span,
.payment-receipt-form-body > label > span,
.reject-payment-dialog .dialog-body > label > span,
.settlement-credit-fields label > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.payment-receipt-form-body > label { display: block; margin-top: 15px; }
.payment-receipt-form-body .form-error,
.reject-payment-dialog .form-error,
.settlement-account-form-body .form-error { margin-bottom: 0; }
.reject-payment-dialog .dialog-body { padding-top: 18px; }
.settlement-credit-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 0.55fr); gap: 14px; margin-top: 18px; }

.code-stocktake-page-heading { align-items: flex-end; }
.code-stocktake-queue-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding: 14px 16px;
  background: var(--gold-soft);
  border: 1px solid #dec99f;
  border-radius: 6px;
}
.code-stocktake-queue-notice > div { min-width: 0; }
.code-stocktake-queue-notice strong,
.code-stocktake-queue-notice span { display: block; }
.code-stocktake-queue-notice strong { margin-bottom: 3px; font-size: 13px; }
.code-stocktake-queue-notice span { color: #6d5b37; font-size: 11px; line-height: 1.5; }
.code-stocktake-filter-heading { margin-bottom: 12px; }
.code-stocktake-filter-form,
.code-stocktake-report-filter-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 15px;
}
.code-stocktake-filter-form label,
.code-stocktake-report-filter-form label { min-width: 0; }
.code-stocktake-filter-form label > span,
.code-stocktake-report-filter-form label > span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}
.code-stocktake-session-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.code-stocktake-session-card {
  min-width: 0;
  padding: 15px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.code-stocktake-session-card-heading,
.code-stocktake-session-card-foot,
.code-stocktake-workspace-heading,
.code-stocktake-block-heading,
.code-stocktake-scan-actions,
.code-stocktake-report-item-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.code-stocktake-session-card-heading .section-link {
  min-width: 0;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.code-stocktake-session-card > p { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.code-stocktake-session-products {
  min-height: 34px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.5;
}
.code-stocktake-session-card-foot {
  align-items: flex-start;
  margin-top: 12px;
  padding-top: 10px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 10px;
}
.code-stocktake-workspace { margin-top: 18px; scroll-margin-top: 82px; }
.code-stocktake-workspace-heading { align-items: flex-start; }
.code-stocktake-workspace-heading > div { min-width: 0; }
.code-stocktake-workspace-heading h2 { margin: 7px 0 2px; font-size: 20px; overflow-wrap: anywhere; }
.code-stocktake-workspace-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.code-stocktake-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 18px 0 0;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.code-stocktake-meta > div { min-width: 0; padding: 12px; background: var(--green-050); }
.code-stocktake-meta dt { color: var(--muted); font-size: 10px; }
.code-stocktake-meta dd { margin: 5px 0 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 700; }
.code-stocktake-scope-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-top: 12px; }
.code-stocktake-scope { min-width: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.code-stocktake-scope span {
  max-width: 100%;
  padding: 5px 8px;
  overflow: hidden;
  color: var(--green-900);
  background: var(--green-050);
  border: 1px solid var(--green-100);
  border-radius: 4px;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.code-stocktake-scanner,
.code-stocktake-report { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.code-stocktake-block-heading { align-items: flex-start; }
.code-stocktake-block-heading h3 { margin: 0; font-size: 16px; }
.code-stocktake-block-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.code-stocktake-camera-wrap {
  position: relative;
  width: min(100%, 480px);
  margin: 14px auto;
  overflow: hidden;
  background: #14201b;
  border-radius: 6px;
  aspect-ratio: 4 / 3;
}
.code-stocktake-camera { width: 100%; height: 100%; display: block; object-fit: cover; }
.code-stocktake-camera-frame {
  position: absolute;
  inset: 16%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 4px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.32);
  pointer-events: none;
}
.code-stocktake-camera-wrap .secondary-button { position: absolute; right: 10px; bottom: 10px; min-height: 36px; }
.code-stocktake-scan-form { margin-top: 14px; }
.code-stocktake-scan-form label > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 650; }
.code-stocktake-scan-form textarea {
  min-height: 108px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.55;
}
.code-stocktake-scan-actions { margin-top: 10px; }
.code-stocktake-scan-actions > span { min-width: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.code-stocktake-open-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.danger-button { color: var(--red); border-color: #d9b7b2; }
.code-stocktake-report-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 14px 0;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.code-stocktake-report-metric {
  min-width: 0;
  min-height: 68px;
  padding: 10px;
  color: var(--ink);
  background: white;
  border: 0;
  text-align: left;
}
.code-stocktake-report-metric span,
.code-stocktake-report-metric strong { display: block; }
.code-stocktake-report-metric span { color: var(--muted); font-size: 10px; }
.code-stocktake-report-metric strong { margin-top: 5px; font-size: 17px; }
.code-stocktake-report-items { display: grid; gap: 8px; }
.code-stocktake-report-item { min-width: 0; padding: 12px 14px; background: white; border: 1px solid var(--line); border-left: 4px solid var(--green-700); border-radius: 4px; }
.code-stocktake-report-item.classification-unknown,
.code-stocktake-report-item.classification-wrong_warehouse,
.code-stocktake-report-item.classification-wrong_product { border-left-color: var(--red); }
.code-stocktake-report-item.classification-missing_expected { border-left-color: var(--gold); }
.code-stocktake-report-item-heading { align-items: flex-start; }
.code-stocktake-report-item-heading strong { font-size: 12px; }
.code-stocktake-report-item-heading span { min-width: 0; overflow-wrap: anywhere; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; text-align: right; }
.code-stocktake-report-item p { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.code-stocktake-create-dialog { width: min(680px, calc(100% - 24px)); }
.code-stocktake-create-body { max-height: min(68vh, 640px); overflow-y: auto; }
.code-stocktake-create-date { display: flex; justify-content: space-between; gap: 12px; margin: 14px 0; padding: 10px 12px; background: var(--green-050); border-radius: 4px; font-size: 12px; }
.code-stocktake-create-body fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.code-stocktake-create-body legend { width: 100%; display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: 12px; font-weight: 700; }
.code-stocktake-create-body legend span { color: var(--muted); font-size: 10px; font-weight: 500; }
.code-stocktake-create-products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.code-stocktake-product-option { min-width: 0; display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: start; gap: 8px; padding: 10px; background: white; border: 1px solid var(--line); border-radius: 4px; }
.code-stocktake-product-option input { width: 16px; height: 16px; margin: 2px 0 0; }
.code-stocktake-product-option span,
.code-stocktake-product-option strong,
.code-stocktake-product-option small { min-width: 0; display: block; }
.code-stocktake-product-option strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.code-stocktake-product-option small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.retail-sell-out-panel,
.retail-sell-out-panel *,
.retail-sell-out-detail-dialog * { min-width: 0; }
.retail-sell-out-page-heading { align-items: flex-end; }
.retail-sell-out-recovery {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 13px 15px;
  color: #684714;
  background: #fff7df;
  border: 1px solid #ecd596;
  border-radius: 6px;
}
.retail-sell-out-recovery strong,
.retail-sell-out-recovery span { display: block; overflow-wrap: anywhere; }
.retail-sell-out-recovery span { margin-top: 3px; font-size: 11px; line-height: 1.5; }
.retail-sell-out-recovery-actions { display: flex; flex: 0 0 auto; gap: 7px; }
.retail-sell-out-heading { align-items: flex-end; }
.retail-sell-out-warehouse-field { display: block; margin-bottom: 15px; }
.retail-sell-out-warehouse-field select { width: 100%; margin-top: 6px; }
.retail-sell-out-warehouse-field small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.retail-sell-out-product-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; }
.retail-sell-out-product-card {
  padding: 13px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.retail-sell-out-product-heading,
.retail-sell-out-product-controls,
.retail-sell-out-product-trace,
.retail-sell-out-trace-heading,
.retail-sell-out-submit-row,
.retail-sell-out-record-heading,
.retail-sell-out-record-context,
.retail-sell-out-detail-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.retail-sell-out-product-heading > div > strong,
.retail-sell-out-product-heading > div > span,
.retail-sell-out-detail-item > div > strong,
.retail-sell-out-detail-item > div > span { display: block; overflow-wrap: anywhere; }
.retail-sell-out-product-heading > div > strong { font-size: 13px; }
.retail-sell-out-product-heading > div > span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.retail-sell-out-stock { flex: 0 0 auto; padding: 4px 7px; color: var(--green-800); background: var(--green-050); border-radius: 999px; font-size: 10px; font-weight: 700; }
.retail-sell-out-stock.empty { color: var(--red); background: #fff0ed; }
.retail-sell-out-product-controls { flex-wrap: wrap; margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--line); }
.retail-sell-out-product-controls > label { display: grid; grid-template-columns: auto 112px; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.retail-sell-out-product-controls input { width: 92px; }
.retail-sell-out-product-controls .retail-sell-out-price-input { width: 112px; }
.retail-sell-out-product-line-amount { flex: 0 0 auto; color: var(--green-900); font-size: 11px; }
.retail-sell-out-product-trace { color: var(--muted); font-size: 10px; }
.retail-sell-out-product-trace span.complete { color: var(--green-800); font-weight: 700; }
.retail-sell-out-no-trace { color: var(--muted); font-size: 10px; }
.retail-sell-out-trace-editor { margin-top: 14px; padding: 14px; background: var(--green-050); border: 1px solid #cbded6; border-radius: 6px; }
.retail-sell-out-trace-heading { align-items: flex-start; margin-bottom: 11px; }
.retail-sell-out-trace-heading p { margin: 0 0 3px; color: var(--green-700); font-size: 9px; font-weight: 800; letter-spacing: 0.12em; }
.retail-sell-out-trace-heading h3 { margin: 0; font-size: 15px; }
.retail-sell-out-trace-heading span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.retail-sell-out-trace-editor label,
.retail-sell-out-trace-editor textarea { display: block; width: 100%; }
.retail-sell-out-trace-editor textarea { margin-top: 6px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.retail-sell-out-trace-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 9px; }
.retail-sell-out-camera-wrap { position: relative; margin-top: 11px; overflow: hidden; background: #07120f; border-radius: 6px; }
.retail-sell-out-camera { width: 100%; max-height: 360px; display: block; object-fit: cover; }
.retail-sell-out-camera-frame { position: absolute; inset: 18% 18%; border: 2px solid rgba(255, 255, 255, 0.85); border-radius: 8px; box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.25); pointer-events: none; }
.retail-sell-out-camera-wrap .secondary-button { position: absolute; right: 10px; bottom: 10px; }
.retail-sell-out-trace-feedback { margin: 9px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.retail-sell-out-trace-preview { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.retail-sell-out-trace-chip { padding: 4px 7px; color: var(--green-800); background: white; border: 1px solid #cbded6; border-radius: 999px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; }
.retail-sell-out-trace-chip.more { color: var(--muted); font-family: inherit; }
.retail-sell-out-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.retail-sell-out-summary > div { padding: 10px; background: var(--canvas); border: 1px solid var(--line); border-radius: 5px; text-align: center; }
.retail-sell-out-summary span,
.retail-sell-out-summary strong { display: block; overflow-wrap: anywhere; }
.retail-sell-out-summary span { color: var(--muted); font-size: 9px; }
.retail-sell-out-summary strong { margin-top: 4px; color: var(--green-900); font-size: 14px; }
.retail-sell-out-summary strong.invalid { color: var(--red); }
.retail-sell-out-payment-editor { margin-top: 14px; padding: 13px; background: #fbfcfb; border: 1px solid var(--line); border-radius: 6px; }
.retail-sell-out-payment-heading,
.retail-sell-out-payment-row,
.retail-sell-out-detail-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.retail-sell-out-payment-heading h3,
.retail-sell-out-detail-section-heading h3 { margin: 0; color: var(--green-900); font-size: 13px; }
.retail-sell-out-payment-heading p { margin: 3px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.retail-sell-out-payment-list { display: grid; gap: 8px; margin-top: 10px; }
.retail-sell-out-payment-row { align-items: end; padding: 10px; background: white; border: 1px solid var(--line); border-radius: 5px; }
.retail-sell-out-payment-fields { display: grid; flex: 1 1 auto; grid-template-columns: 120px minmax(120px, 1fr) minmax(160px, 1.3fr); gap: 8px; }
.retail-sell-out-payment-fields label,
.retail-sell-out-payment-fields label > span { display: block; }
.retail-sell-out-payment-fields label > span { margin-bottom: 5px; color: var(--muted); font-size: 9px; }
.retail-sell-out-payment-fields input,
.retail-sell-out-payment-fields select { width: 100%; }
.retail-sell-out-payment-remove { flex: 0 0 auto; }
.retail-sell-out-payment-empty { margin: 10px 0 0; color: var(--muted); font-size: 10px; }
.retail-sell-out-submit-row { align-items: flex-end; margin-top: 13px; }
.retail-sell-out-submit-row > span { max-width: 560px; color: var(--muted); font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.retail-sell-out-filter-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; align-items: end; gap: 8px; margin-bottom: 12px; }
.retail-sell-out-filter-form label,
.retail-sell-out-filter-form label > span { display: block; }
.retail-sell-out-filter-form label > span { margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.retail-sell-out-filter-form select,
.retail-sell-out-filter-form input { width: 100%; }
.retail-sell-out-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.retail-sell-out-record { width: 100%; padding: 12px 13px; color: inherit; background: white; border: 1px solid var(--line); border-radius: 6px; text-align: left; }
.retail-sell-out-record:hover { border-color: var(--green-500); }
.retail-sell-out-record-heading strong { overflow-wrap: anywhere; color: var(--green-900); font-size: 12px; }
.retail-sell-out-record-heading span { flex: 0 0 auto; color: var(--muted); font-size: 9px; }
.retail-sell-out-record-context { margin-top: 7px; color: var(--muted); font-size: 10px; }
.retail-sell-out-record-context span { overflow-wrap: anywhere; }
.retail-sell-out-detail-dialog { width: min(720px, calc(100% - 24px)); }
.retail-sell-out-detail-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.retail-sell-out-detail-meta > div { padding: 9px 10px; background: var(--canvas); border-radius: 4px; }
.retail-sell-out-detail-meta dt { color: var(--muted); font-size: 9px; }
.retail-sell-out-detail-meta dd { margin: 4px 0 0; font-size: 11px; overflow-wrap: anywhere; }
.retail-sell-out-detail-items { display: grid; gap: 7px; margin-top: 13px; }
.retail-sell-out-detail-item { align-items: flex-start; padding: 10px 11px; border: 1px solid var(--line); border-radius: 5px; }
.retail-sell-out-detail-item > div:last-child { flex: 0 0 auto; text-align: right; }
.retail-sell-out-detail-item strong { font-size: 11px; }
.retail-sell-out-detail-item span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.retail-sell-out-detail-note { margin: 12px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; overflow-wrap: anywhere; }
.retail-sell-out-detail-facts { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.retail-sell-out-detail-section-heading span { color: var(--muted); font-size: 10px; }
.retail-sell-out-detail-fact-list { display: grid; gap: 7px; margin-top: 9px; }
.retail-sell-out-detail-fact { padding: 10px 11px; background: var(--canvas); border-radius: 5px; }
.retail-sell-out-detail-fact-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.retail-sell-out-detail-fact strong,
.retail-sell-out-detail-fact span { display: block; overflow-wrap: anywhere; }
.retail-sell-out-detail-fact strong { color: var(--green-900); font-size: 11px; }
.retail-sell-out-detail-fact span { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.retail-sell-out-detail-refund-button { margin-top: 8px; }
.retail-sell-out-detail-empty { margin: 9px 0 0; color: var(--muted); font-size: 10px; }
.retail-sell-out-action-dialog { width: min(680px, calc(100% - 24px)); }
.retail-sell-out-action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.retail-sell-out-action-grid label,
.retail-sell-out-action-grid label > span { display: block; }
.retail-sell-out-action-grid label > span { margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.retail-sell-out-action-grid input,
.retail-sell-out-action-grid select { width: 100%; }
.retail-sell-out-reversal-items { display: grid; gap: 8px; margin-bottom: 13px; }
.retail-sell-out-reversal-item { padding: 10px; border: 1px solid var(--line); border-radius: 5px; }
.retail-sell-out-reversal-item-heading { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.retail-sell-out-reversal-item-heading strong,
.retail-sell-out-reversal-item-heading span { display: block; overflow-wrap: anywhere; }
.retail-sell-out-reversal-item-heading strong { font-size: 11px; }
.retail-sell-out-reversal-item-heading span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.retail-sell-out-reversal-item-fields { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px; margin-top: 9px; }
.retail-sell-out-reversal-item-fields label,
.retail-sell-out-reversal-item-fields label > span { display: block; }
.retail-sell-out-reversal-item-fields label > span { margin-bottom: 4px; color: var(--muted); font-size: 9px; }
.retail-sell-out-reversal-item-fields input,
.retail-sell-out-reversal-item-fields textarea { width: 100%; }
.retail-sell-out-reversal-item-fields textarea { min-height: 68px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }

.bottom-nav {
  position: fixed;
  z-index: 20;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 64px;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  padding: 5px max(8px, env(safe-area-inset-right)) max(5px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  background: rgba(255, 254, 250, 0.98);
  border-top: 1px solid var(--line);
}
.bottom-nav button {
  position: relative;
  min-width: 0;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #7d8883;
  background: transparent;
  border: 0;
  font-size: 10px;
}
.bottom-nav button.active { color: var(--green-900); font-weight: 700; }
.nav-icon { height: 24px; font-size: 21px; line-height: 24px; }
.nav-badge {
  position: absolute;
  top: 2px;
  left: calc(50% + 10px);
  min-width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  color: white;
  background: var(--red);
  border: 2px solid white;
  border-radius: 9px;
  font-size: 9px;
}

.order-dialog {
  width: min(100% - 24px, 620px);
  max-height: min(86vh, 780px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(15, 36, 29, 0.3);
}
.order-dialog::backdrop { background: rgba(16, 33, 27, 0.5); }
.shipment-dialog { width: min(100% - 24px, 480px); }
.shipment-dialog form, .address-dialog form, .stocktake-dialog form { margin: 0; }
.order-warehouse-snapshots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.order-warehouse-snapshots > div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--green-050);
}
.order-warehouse-snapshots span,
.order-warehouse-snapshots strong { display: block; }
.order-warehouse-snapshots span { color: var(--muted); font-size: 10px; }
.order-warehouse-snapshots strong {
  margin-top: 3px;
  overflow-wrap: anywhere;
  font-size: 11px;
  font-weight: 650;
}
.address-dialog { width: min(100% - 24px, 620px); }
.stocktake-dialog, .stocktake-detail-dialog { width: min(100% - 24px, 700px); }
.dialog-header {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}
.dialog-header > div { min-width: 0; }
.dialog-header h2 {
  margin: 6px 0 0;
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dialog-close { width: 38px; height: 38px; flex: 0 0 auto; color: var(--muted); background: var(--canvas); font-size: 24px; }
.dialog-body { max-height: calc(86vh - 146px); padding: 0 18px 22px; overflow: auto; }
.order-parties { margin: 0 0 22px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.order-parties > div { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 12px; padding: 5px 0; }
.order-parties dt { color: var(--muted); font-size: 11px; }
.order-parties dd { margin: 0; overflow-wrap: anywhere; font-size: 12px; }
#dialog-delivery-address { white-space: pre-line; line-height: 1.55; }
#dialog-delivery-address.missing { color: var(--muted); }
.shipment-form-body { padding-top: 18px; }
.stocktake-form-body { padding-top: 18px; }
.stocktake-form-body .pending-order-notice { margin-bottom: 14px; }
.pending-stocktake-upgrade-action { margin-top: 10px; color: #73541c; }
.stocktake-warehouse-field { display: grid; gap: 7px; margin-bottom: 14px; }
.stocktake-warehouse-field > span { color: var(--muted); font-size: 11px; font-weight: 700; }
.stocktake-warehouse-field select { width: 100%; min-height: 42px; }
.stocktake-picker-tools {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.stocktake-picker-tools input { min-width: 0; min-height: 40px; }
.stocktake-selection-actions { display: flex; align-items: center; gap: 10px; }
.stocktake-selection-actions .section-link { min-height: 32px; }
.stocktake-column-head {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 120px;
  gap: 12px;
  padding: 0 4px 8px;
  color: var(--muted);
  font-size: 10px;
}
.stocktake-column-head span:last-child { text-align: right; }
.stocktake-item-empty { min-height: 112px; margin: 0; border-top: 1px solid var(--line); }
.stocktake-item-list { border-top: 1px solid var(--line); }
.stocktake-form-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 120px;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
}
.stocktake-form-item.selected { background: var(--green-050); }
.stocktake-form-item input.stocktake-selector {
  width: 20px;
  min-width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0;
  padding: 0;
  accent-color: var(--green-800);
}
.stocktake-form-product { min-width: 0; }
.stocktake-form-product { cursor: pointer; }
.stocktake-form-product strong { display: block; overflow-wrap: anywhere; font-size: 13px; }
.stocktake-form-product span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.stocktake-form-item input[data-stocktake-product-id] {
  min-width: 0;
  height: 42px;
  min-height: 42px;
  padding-inline: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  text-align: right;
}
.stocktake-form-item input[data-stocktake-product-id]:disabled {
  color: var(--muted);
  background: var(--canvas);
}
.stocktake-warning {
  margin: 14px 0 0;
  padding: 11px 12px;
  border-left: 4px solid var(--gold);
  color: #5f4618;
  background: var(--gold-soft);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
}
.stocktake-note-field { display: block; margin-top: 17px; }
.stocktake-note-field > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.stocktake-form-body .form-error { margin-bottom: 0; }
.stocktake-meta dd { white-space: pre-line; }
.stocktake-detail-items { border-top: 1px solid var(--line); }
.stocktake-detail-item {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(3, minmax(66px, auto));
  align-items: center;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.stocktake-detail-product { min-width: 0; }
.stocktake-detail-product strong { display: block; overflow-wrap: anywhere; font-size: 12px; }
.stocktake-detail-product span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.stocktake-detail-value { min-width: 0; text-align: right; }
.stocktake-detail-value span { display: block; color: var(--muted); font-size: 9px; }
.stocktake-detail-value strong {
  display: block;
  margin-top: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}
.stocktake-detail-value.gain strong { color: var(--green-700); }
.stocktake-detail-value.loss strong { color: var(--red); }
.stocktake-detail-state { min-height: 180px; margin: 0; padding: 24px 18px; }
.stocktake-detail-state.ledger-error { justify-content: center; border-top: 0; }
.address-form-body { display: grid; gap: 17px; padding-top: 18px; }
.address-contact-fields,
.address-region-fields { display: grid; gap: 12px; }
.address-contact-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.address-region-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.address-contact-fields label,
.address-region-fields label,
.address-detail-field { min-width: 0; }
.address-contact-fields label > span,
.address-region-fields label > span,
.address-detail-field > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.address-option-fields { display: grid; gap: 10px; }
.check-row { min-height: 38px; display: flex; align-items: center; gap: 9px; color: #44534c; font-size: 12px; }
.check-row input { width: 18px; min-height: 18px; height: 18px; flex: 0 0 auto; margin: 0; padding: 0; accent-color: var(--green-800); }
.check-row:has(input:disabled) { color: var(--muted); }
.address-form-body .form-error { margin: 0; }
.shipment-order-no {
  margin: 0 0 18px;
  overflow-wrap: anywhere;
  color: var(--green-800);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 700;
}
.shipping-method-fieldset { margin: 0; padding: 0; border: 0; }
.shipping-method-fieldset legend,
.shipment-logistics-fields label > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.shipping-method-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.shipping-method-options label { position: relative; min-width: 0; }
.shipping-method-options input { position: absolute; opacity: 0; pointer-events: none; }
.shipping-method-options span {
  min-height: 42px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--canvas);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
}
.shipping-method-options input:checked + span {
  color: var(--green-900);
  background: var(--green-050);
  border-color: var(--green-700);
}
.shipping-method-options input:focus-visible + span { box-shadow: var(--focus); }
.shipment-logistics-fields { display: grid; gap: 14px; margin-top: 18px; }
.shipment-logistics-fields input {
  width: 100%;
  height: 42px;
  padding: 0 11px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  font-size: 13px;
}
.shipment-items-fieldset {
  min-width: 0;
  margin: 18px 0 0;
  padding: 0;
  border: 0;
}
.shipment-items-fieldset legend {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.shipment-item-fields { display: grid; gap: 8px; }
.shipment-item-field {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--green-050);
}
.shipment-item-field span,
.shipment-item-field strong { display: block; }
.shipment-item-field span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.shipment-item-field input { width: 100%; min-width: 0; height: 40px; text-align: right; }
.shipment-form-body .form-error { margin: 14px 0 0; }
.shipment-receipt-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
  padding-block: 11px;
  border-block: 1px solid var(--line);
}
.shipment-receipt-progress div { min-width: 0; padding-inline: 10px; }
.shipment-receipt-progress div + div { border-left: 1px solid var(--line); }
.shipment-receipt-progress span,
.shipment-receipt-progress strong { display: block; }
.shipment-receipt-progress span { color: var(--muted); font-size: 10px; }
.shipment-receipt-progress strong { margin-top: 4px; font-size: 14px; overflow-wrap: anywhere; }
.shipment-receipt-intent-warning {
  margin: 12px 0 0;
  padding-left: 10px;
  color: var(--gold);
  border-left: 3px solid var(--gold);
  font-size: 11px;
  line-height: 1.6;
}
.shipment-receipt-history-section { margin-top: 20px; }
.shipment-receipt-history { display: grid; margin-top: 8px; }
.shipment-receipt-history-item {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.shipment-receipt-history-item strong,
.shipment-receipt-history-item span { display: block; }
.shipment-receipt-history-item span { margin-top: 3px; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.shipment-receipt-history-quantity { align-self: center; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }
.dialog-body section + section { margin-top: 25px; }
.dialog-section-heading { min-height: 30px; }
.dialog-section-heading h3 { margin: 0; font-size: 14px; }
.dialog-section-heading span { color: var(--muted); font-size: 11px; }
.dialog-item { grid-template-columns: minmax(0, 1fr) auto; padding-inline: 0; }
.dialog-item strong, .dialog-item span { display: block; }
.dialog-item strong { font-size: 13px; }
.dialog-item span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.dialog-item-amount { min-width: 88px; text-align: right; }
.dialog-item-amount strong,
.dialog-item-amount span { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.dialog-item-amount span { color: var(--green-800); font-size: 11px; font-weight: 700; }
.dialog-shipments { display: grid; gap: 8px; margin-top: 10px; }
.dialog-shipment {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: white;
}
.dialog-shipment strong,
.dialog-shipment span { display: block; }
.dialog-shipment span { margin-top: 3px; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.dialog-shipment-progress { color: var(--green-800) !important; font-weight: 700; }
.dialog-shipment-receipts { margin-top: 6px !important; }
.dialog-shipment .order-action-button { min-height: 36px; white-space: nowrap; }
.dialog-shipment-empty { margin: 10px 0 0; color: var(--muted); font-size: 11px; }
.order-timeline { margin: 10px 0 0; padding: 0; list-style: none; }
.timeline-item {
  position: relative;
  min-height: 57px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 9px;
  padding-bottom: 16px;
}
.timeline-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 14px;
  bottom: -1px;
  width: 1px;
  background: var(--line-strong);
}
.timeline-dot { width: 15px; height: 15px; margin-top: 2px; background: var(--green-100); border: 4px solid var(--green-700); border-radius: 50%; }
.timeline-copy strong { display: block; font-size: 12px; }
.timeline-copy span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.timeline-item time { color: var(--muted); font-size: 10px; white-space: nowrap; }
.dialog-actions {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  background: var(--canvas);
  border-top: 1px solid var(--line);
}

.toast {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: max(84px, calc(72px + env(safe-area-inset-bottom)));
  max-width: calc(100vw - 32px);
  padding: 10px 15px;
  color: white;
  background: rgba(22, 37, 31, 0.95);
  border-radius: 6px;
  box-shadow: var(--shadow);
  transform: translateX(-50%);
  font-size: 13px;
  text-align: center;
}

@media (min-width: 760px) {
  .topbar { padding-inline: max(30px, calc((100vw - 920px) / 2)); }
  .main-content { padding-top: 32px; }
  .metric-band { margin-inline: 0; border-radius: 7px; }
  .metric-band article:first-child { padding-left: 18px; }
  .metric-band article:last-child { padding-right: 18px; }
  .product-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-list:not(.compact) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stocktake-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pricing-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .price-level-list, .price-assignment-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .address-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finance-order-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .warehouse-list, .inventory-transfer-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .retail-sell-out-product-list,
  .retail-sell-out-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bottom-nav {
    left: 50%;
    right: auto;
    width: min(100%, 620px);
    transform: translateX(-50%);
    border-right: 1px solid var(--line);
    border-left: 1px solid var(--line);
  }
}

@media (max-width: 520px) {
  .login-view { grid-template-rows: 62px minmax(0, 1fr); }
  .login-brand { min-height: 62px; padding-inline: 16px; }
  .login-panel { padding: 26px 20px; }
  .main-content { padding-inline: 15px; }
  .metric-band { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-inline: -15px; padding: 8px 15px; }
  .metric-band article,
  .metric-band article:first-child,
  .metric-band article:last-child { padding: 12px 10px; }
  .metric-band article:nth-child(2n) { border-right: 0; }
  .metric-band article:nth-child(-n + 4) { border-bottom: 1px solid rgba(255, 255, 255, 0.15); }
  .pending-breakdown span { padding-inline: 8px; font-size: 10px; }
  .pending-limit-notice { align-items: flex-start; flex-direction: column; }
  .inventory-item { grid-template-columns: minmax(0, 1fr); }
  .warehouse-filter-heading { align-items: stretch; flex-direction: column; }
  .compact-select { width: 100%; }
  .compact-select > span { text-align: left; }
  .warehouse-inventory-item { grid-template-columns: minmax(0, 1fr) repeat(2, minmax(62px, 0.45fr)); }
  .warehouse-inventory-item .warehouse-inventory-stat:nth-last-child(-n + 2) { grid-column: auto; }
  .warehouse-inventory-copy { grid-row: span 2; }
  .inventory-transfer-warehouse-fields { grid-template-columns: minmax(0, 1fr); }
  .inventory-transfer-form-item { grid-template-columns: 24px minmax(0, 1fr); }
  .retail-sell-out-page-heading,
  .retail-sell-out-heading,
  .retail-sell-out-recovery,
  .retail-sell-out-submit-row,
  .retail-sell-out-detail-item { align-items: stretch; flex-direction: column; }
  .retail-sell-out-page-heading .secondary-button,
  .retail-sell-out-recovery-actions,
  .retail-sell-out-recovery-actions button,
  .retail-sell-out-submit-row .primary-button { width: 100%; }
  .retail-sell-out-recovery-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  .retail-sell-out-product-controls { align-items: stretch; flex-direction: column; }
  .retail-sell-out-product-controls > label { grid-template-columns: minmax(0, 1fr) 96px; }
  .retail-sell-out-product-trace { width: 100%; }
  .retail-sell-out-trace-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  .retail-sell-out-trace-actions button { width: 100%; }
  .retail-sell-out-payment-heading,
  .retail-sell-out-payment-row,
  .retail-sell-out-detail-fact-heading { align-items: stretch; flex-direction: column; }
  .retail-sell-out-payment-heading .secondary-button,
  .retail-sell-out-payment-remove { width: 100%; }
  .retail-sell-out-payment-fields,
  .retail-sell-out-action-grid,
  .retail-sell-out-reversal-item-fields { grid-template-columns: minmax(0, 1fr); width: 100%; }
  .retail-sell-out-filter-form,
  .retail-sell-out-product-list,
  .retail-sell-out-list { grid-template-columns: minmax(0, 1fr); }
  .retail-sell-out-filter-form .secondary-button { width: 100%; }
  .retail-sell-out-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .retail-sell-out-detail-meta { grid-template-columns: minmax(0, 1fr); }
  .retail-sell-out-detail-item > div:last-child { text-align: left; }
  .inventory-transfer-quantity { grid-column: 2; }
  .transfer-filters { grid-template-columns: repeat(7, minmax(72px, 1fr)); }
  .inventory-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product-item { grid-template-columns: 40px minmax(0, 1fr); }
  .product-mark { width: 40px; height: 40px; }
  .quantity-stepper { grid-column: 1 / -1; width: 100%; grid-template-columns: 42px minmax(0, 1fr) 42px; }
  .order-card-foot { align-items: flex-end; flex-direction: column; }
  .order-card-foot time { align-self: flex-start; }
  .order-warehouse-snapshots { grid-template-columns: minmax(0, 1fr); }
  .shipment-item-field { grid-template-columns: minmax(0, 1fr) 88px; gap: 8px; }
  .shipment-receipt-progress div { padding-inline: 7px; }
  .shipment-receipt-progress strong { font-size: 12px; }
  .shipment-receipt-history-item { grid-template-columns: minmax(0, 1fr); }
  .shipment-receipt-history-quantity { justify-self: start; }
  .dialog-shipment { grid-template-columns: minmax(0, 1fr); }
  .dialog-shipment .order-action-button { width: 100%; }
  .order-pagination { align-items: stretch; flex-direction: column; }
  .order-pagination .secondary-button { width: 100%; }
  .ledger-pagination { align-items: stretch; flex-direction: column; }
  .ledger-pagination .secondary-button { width: 100%; }
  .stocktake-heading { align-items: flex-start; }
  .stocktake-heading-actions { align-items: flex-end; flex-direction: column-reverse; }
  .stocktake-heading-actions .primary-button { min-height: 36px; padding-inline: 11px; }
  .stocktake-detail-item { grid-template-columns: minmax(0, 1fr) repeat(3, minmax(54px, auto)); gap: 7px; }
  .stocktake-picker-tools { grid-template-columns: minmax(0, 1fr) auto; }
  .stocktake-picker-tools input { grid-column: 1 / -1; }
  .stocktake-selection-actions { justify-self: end; }
  .stocktake-form-item, .stocktake-column-head { grid-template-columns: 22px minmax(0, 1fr) 96px; gap: 8px; }
  .pricing-load-error { align-items: stretch; flex-direction: column; }
  .pricing-load-error .section-link { align-self: flex-start; }
  .pricing-workspace-heading, .price-policy-heading { align-items: stretch; flex-direction: column; }
  .price-policy-heading > label { width: 100%; max-width: none; }
  .price-level-item { grid-template-columns: minmax(0, 1fr) auto; }
  .price-level-save { grid-column: 1 / -1; width: 100%; }
  .price-assignment-item { grid-template-columns: minmax(0, 1fr); }
  .price-tier-row { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr) 36px; }
  .price-policy-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .price-policy-actions .primary-button { grid-column: 1 / -1; }
  .address-contact-fields, .address-region-fields { grid-template-columns: minmax(0, 1fr); }
  .address-book-error { align-items: stretch; flex-direction: column; }
  .address-book-error .section-link { align-self: flex-start; }
  .address-empty { align-items: stretch; flex-direction: column; }
  .address-empty .secondary-button { width: 100%; }
  .finance-metric-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finance-metric-band article:nth-child(3n) { border-right: 1px solid rgba(255, 255, 255, 0.14); }
  .finance-metric-band article:nth-child(2n) { border-right: 0; }
  .finance-metric-band article:nth-child(-n + 4) { border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
  .finance-metric-band article:nth-child(n + 5) { border-bottom: 0; }
  .return-scope-control { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .return-finance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .return-card-foot { align-items: flex-start; flex-direction: column; }
  .return-card-actions { width: 100%; justify-content: flex-start; }
  .return-request-item { grid-template-columns: 22px minmax(0, 1fr) 82px; gap: 8px; }
  .finance-order-values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finance-order-values span:first-child { grid-column: 1 / -1; }
  .finance-receipt-head { align-items: flex-start; }
  .payment-receipt-fields,
  .settlement-credit-fields { grid-template-columns: minmax(0, 1fr); }
  .dialog-actions .order-action-button { flex: 1 1 0; }
  .code-stocktake-page-heading { align-items: stretch; flex-direction: column; }
  .code-stocktake-page-heading .primary-button { width: 100%; }
  .code-stocktake-queue-notice { align-items: stretch; flex-direction: column; }
  .code-stocktake-queue-notice .secondary-button { width: 100%; }
  .code-stocktake-filter-form,
  .code-stocktake-report-filter-form { grid-template-columns: minmax(0, 1fr); }
  .code-stocktake-filter-form .secondary-button,
  .code-stocktake-report-filter-form .secondary-button { width: 100%; }
  .code-stocktake-session-list { grid-template-columns: minmax(0, 1fr); }
  .code-stocktake-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .code-stocktake-scope-row { flex-direction: column; }
  .code-stocktake-block-heading { align-items: stretch; flex-direction: column; }
  .code-stocktake-block-heading .primary-button { width: 100%; }
  .code-stocktake-scan-actions { align-items: stretch; flex-direction: column; }
  .code-stocktake-scan-actions .primary-button { width: 100%; }
  .code-stocktake-open-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  .code-stocktake-report-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .code-stocktake-report-item-heading { flex-direction: column; gap: 4px; }
  .code-stocktake-report-item-heading span { text-align: left; }
  .code-stocktake-create-products { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
.order-heading-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}


/* Shipment receipt exception close-loop */
.shipment-exception-panel {
  grid-column: 1 / -1;
  min-width: 0;
  width: 100%;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #dfe6e2;
  overflow: hidden;
}
.shipment-exception-panel-heading,
.shipment-exception-card-head,
.shipment-exception-card-foot,
.shipment-exception-refund-head,
.shipment-exception-inline-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.shipment-exception-panel-heading > div { font-size: 12px; font-weight: 700; }
.shipment-exception-panel-heading > span { color: #6a756f; font-size: 10px; }
.shipment-exception-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  min-width: 0;
  margin: 12px 0;
}
.shipment-exception-progress > div,
.shipment-exception-finance > div {
  min-width: 0;
  padding: 9px;
  border-radius: 6px;
  background: #f4f7f5;
}
.shipment-exception-progress span,
.shipment-exception-progress strong,
.shipment-exception-finance span,
.shipment-exception-finance strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}
.shipment-exception-progress span,
.shipment-exception-finance span { color: #6a756f; font-size: 9px; }
.shipment-exception-progress strong,
.shipment-exception-finance strong { margin-top: 4px; font-size: 11px; }
.shipment-exception-list,
.shipment-exception-detail-items,
.shipment-exception-refunds { display: grid; gap: 9px; min-width: 0; }
.shipment-exception-card,
.shipment-exception-refund,
.shipment-exception-detail-item {
  min-width: 0;
  padding: 11px;
  border: 1px solid #dfe6e2;
  border-radius: 7px;
  background: #fff;
}
.shipment-exception-card p,
.shipment-exception-refund p {
  margin: 7px 0 0;
  color: #65716b;
  font-size: 10px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.shipment-exception-card-foot { margin-top: 9px; justify-content: flex-end; }
.shipment-exception-status,
.shipment-exception-refund-status {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  color: #795b20;
  background: #f8edca;
  font-size: 9px;
  line-height: 1;
}
.shipment-exception-status.completed,
.shipment-exception-refund-status.confirmed { color: #16633f; background: #e6f4ec; }
.shipment-exception-status.cancelled,
.shipment-exception-refund-status.rejected { color: #68716d; background: #edf0ee; }
.shipment-exception-status.reported { color: #9a3d23; background: #fbe8df; }
.shipment-exception-button {
  min-height: 34px;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid #cbd4cf;
  border-radius: 6px;
  color: #27332d;
  background: #fff;
  font: inherit;
  font-size: 10px;
  overflow-wrap: anywhere;
}
.shipment-exception-button.primary { color: #fff; border-color: #205b3f; background: #205b3f; }
.shipment-exception-button.danger { color: #9a3d23; border-color: #e7b8a7; background: #fff7f3; }
.shipment-exception-report-button { width: 100%; margin-top: 10px; }
.shipment-exception-empty,
.shipment-exception-data-error {
  margin: 9px 0 0;
  color: #77817c;
  font-size: 10px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.shipment-exception-data-error { color: #a03b24; }
.shipment-exception-dialog {
  width: min(760px, calc(100% - 24px));
  max-width: calc(100vw - 24px);
  max-height: min(88vh, 900px);
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  color: #27332d;
  background: #fff;
}
.shipment-exception-dialog::backdrop { background: rgba(14, 25, 19, 0.55); }
.shipment-exception-dialog > form,
.shipment-exception-detail-dialog {
  min-width: 0;
}
.shipment-exception-dialog > form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: min(88vh, 900px);
}
.shipment-exception-dialog-header,
.shipment-exception-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 15px 18px;
  border-bottom: 1px solid #e4e9e6;
}
.shipment-exception-dialog-header h2 { margin: 3px 0 0; font-size: 18px; }
.shipment-exception-dialog-header p { margin: 5px 0 0; color: #6a756f; font-size: 10px; line-height: 1.5; }
.shipment-exception-kicker { color: #99782b; font-size: 8px; letter-spacing: .14em; }
.shipment-exception-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 0;
  color: #58635e;
  background: transparent;
  font-size: 22px;
}
.shipment-exception-dialog-body {
  min-width: 0;
  max-width: 100%;
  padding: 16px 18px;
  overflow-x: hidden;
  overflow-y: auto;
}
.shipment-exception-dialog-actions {
  justify-content: flex-end;
  border-top: 1px solid #e4e9e6;
  border-bottom: 0;
}
.shipment-exception-context { margin: 0 0 10px; font-weight: 700; overflow-wrap: anywhere; }
.shipment-exception-report-items,
.shipment-exception-action-form { display: grid; gap: 10px; min-width: 0; }
.shipment-exception-report-item,
.shipment-exception-resolution-item {
  min-width: 0;
  margin: 0;
  padding: 10px;
  border: 1px solid #dfe6e2;
  border-radius: 7px;
}
.shipment-exception-report-item legend,
.shipment-exception-resolution-item legend {
  max-width: 100%;
  padding: 0 5px;
  font-size: 10px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.shipment-exception-quantity-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin-top: 7px;
}
.shipment-exception-field { display: grid; gap: 6px; min-width: 0; margin-top: 11px; }
.shipment-exception-field > span { font-size: 10px; font-weight: 700; }
.shipment-exception-field input,
.shipment-exception-field select,
.shipment-exception-field textarea,
.shipment-exception-quantity-row input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 8px 9px;
  border: 1px solid #cfd8d3;
  border-radius: 6px;
  color: inherit;
  background: #fff;
  font: inherit;
}
.shipment-exception-field textarea { resize: vertical; }
.shipment-exception-intent-warning,
.shipment-exception-error,
.shipment-exception-rejection {
  margin: 10px 0 0;
  padding: 9px 10px;
  border-radius: 6px;
  color: #785d22;
  background: #fbf1d2;
  font-size: 10px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.shipment-exception-error,
.shipment-exception-rejection { color: #9a3d23; background: #fff0e9; }
.shipment-exception-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  margin: 0;
}
.shipment-exception-meta > div { min-width: 0; padding: 9px; background: #f6f8f7; border-radius: 6px; }
.shipment-exception-meta dt { color: #6a756f; font-size: 9px; }
.shipment-exception-meta dd { margin: 4px 0 0; font-size: 11px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.shipment-exception-finance {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  margin-top: 12px;
}
.shipment-exception-detail-section { min-width: 0; margin-top: 17px; }
.shipment-exception-detail-section h3 { margin: 0 0 9px; font-size: 12px; }
.shipment-exception-detail-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}
.shipment-exception-detail-item strong,
.shipment-exception-detail-item span { display: block; min-width: 0; overflow-wrap: anywhere; }
.shipment-exception-detail-item span { margin-top: 4px; color: #6a756f; font-size: 9px; }
.shipment-exception-detail-item-outcome { text-align: right; }
.shipment-exception-refund-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 10px;
  min-width: 0;
}
.shipment-exception-timeline { display: grid; gap: 9px; margin: 0; padding-left: 18px; }
.shipment-exception-timeline li { min-width: 0; padding-left: 4px; }
.shipment-exception-timeline strong,
.shipment-exception-timeline span { display: block; overflow-wrap: anywhere; }
.shipment-exception-timeline span { margin-top: 3px; color: #6a756f; font-size: 9px; }
.shipment-exception-timeline p { margin: 4px 0 0; font-size: 10px; overflow-wrap: anywhere; }
.shipment-exception-workbench { display: grid; gap: 14px; min-width: 0; }
.shipment-exception-workbench-heading,
.shipment-exception-workbench-pagination,
.shipment-exception-recovery {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
.shipment-exception-workbench-heading strong,
.shipment-exception-workbench-heading span { display: block; overflow-wrap: anywhere; }
.shipment-exception-workbench-heading strong { font-size: 15px; }
.shipment-exception-workbench-heading span { margin-top: 4px; color: #6a756f; font-size: 10px; }
.shipment-exception-workbench-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}
.shipment-exception-workbench-summary > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e0e7e3;
  border-radius: 8px;
  background: #fff;
}
.shipment-exception-workbench-summary span,
.shipment-exception-workbench-summary strong { display: block; overflow-wrap: anywhere; }
.shipment-exception-workbench-summary span { color: #6a756f; font-size: 9px; }
.shipment-exception-workbench-summary strong { margin-top: 5px; font-size: 13px; }
.shipment-exception-task-filters { display: flex; flex-wrap: wrap; gap: 7px; min-width: 0; }
.shipment-exception-task-button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid #d3dcd7;
  border-radius: 999px;
  color: #3f4b45;
  background: #fff;
  font: inherit;
  font-size: 10px;
}
.shipment-exception-task-button.active { color: #fff; border-color: #205b3f; background: #205b3f; }
.shipment-exception-workbench-filters {
  display: grid;
  grid-template-columns: minmax(130px, .55fr) minmax(220px, 1.45fr) auto auto;
  align-items: end;
  gap: 9px;
  min-width: 0;
}
.shipment-exception-workbench-filters label { display: grid; gap: 5px; min-width: 0; }
.shipment-exception-workbench-filters label > span { font-size: 9px; font-weight: 700; }
.shipment-exception-workbench-filters input,
.shipment-exception-workbench-filters select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 8px 9px;
  border: 1px solid #cfd8d3;
  border-radius: 6px;
  color: inherit;
  background: #fff;
  font: inherit;
}
.shipment-exception-recovery {
  padding: 12px;
  border: 1px solid #e7cf8d;
  border-radius: 8px;
  background: #fff8df;
}
.shipment-exception-recovery strong,
.shipment-exception-recovery span { display: block; overflow-wrap: anywhere; }
.shipment-exception-recovery span { margin-top: 4px; color: #705d2b; font-size: 10px; }
.shipment-exception-workbench-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}
.shipment-exception-workbench-state { margin: 0; padding: 18px; color: #6a756f; text-align: center; }
.shipment-exception-workbench-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px;
  border-radius: 7px;
  color: #8b321d;
  background: #fff0e9;
}
.shipment-exception-workbench-pagination { color: #6a756f; font-size: 10px; }
.shipment-exception-resolution-impact {
  display: grid;
  gap: 5px;
  padding: 11px;
  border: 1px solid #cddfd5;
  border-radius: 7px;
  background: #f2f8f4;
}
.shipment-exception-resolution-impact strong,
.shipment-exception-resolution-impact span,
.shipment-exception-resolution-impact small { display: block; overflow-wrap: anywhere; }
.shipment-exception-resolution-impact span { font-size: 10px; }
.shipment-exception-resolution-impact small,
.shipment-exception-refund-review { color: #6a756f; font-size: 9px; }

@media (max-width: 560px) {
  .shipment-exception-progress,
  .shipment-exception-finance { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shipment-exception-progress > div:last-child { grid-column: 1 / -1; }
  .shipment-exception-meta,
  .shipment-exception-refund-fields { grid-template-columns: minmax(0, 1fr); }
  .shipment-exception-detail-item { grid-template-columns: minmax(0, 1fr); }
  .shipment-exception-detail-item-outcome { text-align: left; }
  .shipment-exception-dialog-header,
  .shipment-exception-dialog-body,
  .shipment-exception-dialog-actions { padding-inline: 13px; }
  .shipment-exception-dialog-actions { align-items: stretch; flex-direction: column-reverse; }
  .shipment-exception-dialog-actions .shipment-exception-button { width: 100%; }
  .shipment-exception-inline-actions { align-items: stretch; flex-direction: column; }
  .shipment-exception-inline-actions .shipment-exception-button { width: 100%; }
  .shipment-exception-quantity-row { grid-template-columns: minmax(0, 1fr) 88px; }
  .shipment-exception-workbench-heading,
  .shipment-exception-workbench-pagination,
  .shipment-exception-recovery { align-items: stretch; flex-direction: column; }
  .shipment-exception-workbench-summary,
  .shipment-exception-workbench-list,
  .shipment-exception-workbench-filters { grid-template-columns: minmax(0, 1fr); }
  .shipment-exception-workbench-heading .shipment-exception-button,
  .shipment-exception-workbench-filters .shipment-exception-button,
  .shipment-exception-workbench-pagination .shipment-exception-button { width: 100%; }
}
