.inventory-shadow-panel {
  --inventory-paper: #f7f9fc;
  --inventory-grid: #d8dee9;
  --inventory-stock: #fff3a6;
  --inventory-authority: #2f6fed;
  --inventory-danger: #c9362b;
  --inventory-ok: #16845b;
  --inventory-shadow-line: #c8d7e3;
  --inventory-shadow-ink: #12304a;
  --inventory-shadow-muted: #63778a;
  --inventory-shadow-blue: #eaf3f8;
  --inventory-shadow-green: #e8f5ed;
  --inventory-shadow-amber: #fff4d8;
  --inventory-shadow-red: #fff0ef;
  padding: 0;
  overflow: hidden;
  color: var(--inventory-shadow-ink);
}

.side-drawer.inventory-priority-drawer,
.inventory-priority-modal {
  --inventory-paper: #f7f9fc;
  --inventory-grid: #d8dee9;
  --inventory-stock: #fff3a6;
  --inventory-authority: #2f6fed;
  --inventory-danger: #c9362b;
  --inventory-ok: #16845b;
}

.inventory-authority-panel {
  margin: 14px;
  overflow: hidden;
  border: 1px solid #9fbbaa;
  border-radius: 9px;
  background: #fff;
}

.inventory-authority-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid #c4d7cb;
  background: #f2f8f4;
}

.inventory-authority-heading h4,
.inventory-authority-heading p { margin: 0; }
.inventory-authority-heading h4 { margin-top: 3px; font-size: 17px; }
.inventory-authority-heading p {
  margin-top: 4px;
  color: var(--inventory-shadow-muted);
  font-size: 12px;
  line-height: 1.45;
}

.inventory-authority-toolbar {
  display: grid;
  grid-template-columns: minmax(190px, 230px) minmax(280px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 11px 14px;
  border-bottom: 1px solid var(--inventory-shadow-line);
  background: #fbfcfc;
}

.inventory-authority-toolbar label { display: grid; gap: 5px; }
.inventory-authority-toolbar label > span {
  color: #506c5d;
  font-size: 11px;
  font-weight: 800;
}

.inventory-authority-toolbar input,
.inventory-authority-toolbar select {
  width: 100%;
  min-height: 36px;
  padding: 6px 9px;
  border: 1px solid #afc1b7;
  border-radius: 6px;
  background: #fff;
  color: var(--inventory-shadow-ink);
}

.inventory-authority-provenance {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-height: 36px;
  color: var(--inventory-shadow-muted);
  font-size: 11px;
  white-space: nowrap;
}

.inventory-authority-provenance span { display: inline-flex; align-items: center; gap: 5px; }
.inventory-authority-provenance i { width: 3px; height: 17px; border-radius: 2px; }
.inventory-authority-provenance i.physical { background: #3e8a61; }
.inventory-authority-provenance i.catalog { border-left: 3px dashed #98a6ad; }

.inventory-authority-table-wrap {
  position: relative;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  background: #fff;
  scrollbar-color: #8fa8b9 #eef3f6;
}

.inventory-authority-table-wrap:focus-visible {
  outline: 2px solid #3d768f;
  outline-offset: -2px;
}

.inventory-authority-table {
  width: 100%;
  min-width: 2520px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 12px;
}

.inventory-authority-table th,
.inventory-authority-table td {
  width: 112px;
  height: 44px;
  padding: 6px 8px;
  border-right: 1px solid var(--inventory-shadow-line);
  border-bottom: 1px solid var(--inventory-shadow-line);
  text-align: right;
  vertical-align: middle;
  white-space: nowrap;
}

.inventory-authority-table th:nth-child(1),
.inventory-authority-table td:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 180px;
  background: #fff;
  text-align: left;
}
.inventory-authority-table th:nth-child(2),
.inventory-authority-table td:nth-child(2) {
  position: sticky;
  left: 180px;
  z-index: 1;
  width: 126px;
  background: #fff;
  text-align: left;
}
.inventory-authority-table th:nth-child(3),
.inventory-authority-table td:nth-child(3) {
  position: sticky;
  left: 306px;
  z-index: 1;
  width: 240px;
  background: #fff;
  text-align: left;
}
.inventory-authority-table th:nth-child(4),
.inventory-authority-table td:nth-child(4) { width: 154px; text-align: left; }
.inventory-authority-table th:nth-child(8),
.inventory-authority-table td:nth-child(8) { width: 126px; }
.inventory-authority-table th:nth-child(14),
.inventory-authority-table td:nth-child(14) { width: 146px; }
.inventory-authority-table th:nth-child(17),
.inventory-authority-table td:nth-child(17) { width: 178px; text-align: left; }
.inventory-authority-table th:nth-child(18),
.inventory-authority-table td:nth-child(18) { width: 170px; text-align: left; }
.inventory-authority-table th:nth-child(19),
.inventory-authority-table td:nth-child(19) { width: 126px; text-align: left; }

.inventory-authority-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 46px;
  background: #e4eee8;
  color: #214c36;
  font-weight: 800;
  text-align: center;
}

.inventory-authority-table thead th:first-child { z-index: 3; background: #dceae1; }
.inventory-authority-table thead th:nth-child(2),
.inventory-authority-table thead th:nth-child(3) { z-index: 3; background: #e4eee8; }

.inventory-authority-table tbody tr:hover td { background: #f3f8f5; }
.inventory-authority-table td small {
  display: block;
  margin-top: 2px;
  color: var(--inventory-shadow-muted);
  font-size: 10px;
}

.inventory-authority-row--physical td:first-child {
  box-shadow: inset 3px 0 #3e8a61;
}

.inventory-authority-row--catalog td {
  background: #f8fafb;
  color: #566873;
}

.inventory-authority-row--catalog td:first-child { background: #f3f6f7; }
.inventory-authority-row--catalog td:nth-child(2),
.inventory-authority-row--catalog td:nth-child(3) { background: #f3f6f7; }

.inventory-authority-row--catalog td:first-child {
  box-shadow: inset 3px 0 #a4b0b6;
}

.inventory-authority-sku code {
  color: #124d6b;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  font-weight: 750;
}

.inventory-authority-description {
  overflow: hidden;
  text-overflow: ellipsis;
}

.inventory-authority-cell--editable { background: #fbfefc; }
.inventory-authority-cell--source { background: #f4f8fb; }
.inventory-authority-cell--calculated {
  background: #f5f2fb;
  color: #4d4268;
  font-weight: 800;
}

.inventory-authority-edit-shell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  min-width: 0;
}

.inventory-authority-edit-trigger,
.inventory-authority-history-trigger,
.inventory-authority-cell--source button {
  min-width: 0;
  padding: 3px 5px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: inherit;
  white-space: nowrap;
}

.inventory-authority-edit-trigger {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: text;
}
.inventory-authority-edit-trigger > span,
.inventory-authority-cell--source button > span,
.inventory-authority-cell--calculated > small {
  margin-left: 4px;
  color: #668073;
  font-size: 10px;
  font-weight: 850;
}

.inventory-authority-history-trigger {
  flex: 0 0 auto;
  color: #668073;
  cursor: pointer;
  opacity: 0;
}

.inventory-authority-cell--editable:hover .inventory-authority-edit-trigger,
.inventory-authority-edit-trigger:focus-visible { border-color: #8fb49e; background: #f0f8f3; }
.inventory-authority-cell--editable:hover .inventory-authority-history-trigger,
.inventory-authority-history-trigger:focus-visible { opacity: 1; }
.inventory-authority-cell--source button { color: #245d78; cursor: pointer; }
.inventory-authority-cell--source button:hover { background: #e5f1f7; text-decoration: underline; }

.inventory-authority-editor {
  width: 100%;
  min-width: 72px;
  height: 30px;
  padding: 3px 6px;
  border: 2px solid #337f57;
  border-radius: 4px;
  background: #fff;
  color: #173c2a;
  font: inherit;
  text-align: inherit;
}

.inventory-authority-editor[aria-invalid="true"] {
  border-color: #b83d35;
  background: #fff5f4;
}

.inventory-authority-edit-trigger:focus-visible,
.inventory-authority-history-trigger:focus-visible,
.inventory-authority-cell--source button:focus-visible,
.inventory-authority-editor:focus-visible {
  outline: 2px solid #2f728e;
  outline-offset: 1px;
}

.inventory-authority-cell.saving {
  background: #e9f5ee;
  box-shadow: inset 0 0 0 1px #77a68a;
}
.inventory-authority-cell.saving .inventory-authority-edit-trigger::after {
  content: " …";
  color: #397052;
}
.inventory-authority-cell.stale,
.inventory-authority-edit-trigger.stale { background: #fff4d8; color: #7b5b0c; }
.inventory-authority-cell--held {
  background: #fff0ef;
  box-shadow: inset 0 0 0 1px #dda19c;
  color: #94352f;
}

.inventory-authority-edit-trigger:disabled,
.inventory-authority-history-trigger:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.inventory-authority-history-wrap { overflow-x: auto; }
.inventory-authority-history {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 12px;
}
.inventory-authority-history th,
.inventory-authority-history td {
  padding: 9px 10px;
  border: 1px solid #d3e0d8;
  text-align: left;
  vertical-align: top;
}
.inventory-authority-history th { background: #edf5f0; color: #315b44; }
.inventory-authority-history code { overflow-wrap: anywhere; font-size: 10px; }
.inventory-authority-history-loading,
.inventory-authority-history-empty,
.inventory-authority-history-error { padding: 14px; color: #60756a; }
.inventory-authority-history-error { color: #9d2b25; }

.inventory-authority-available { font-weight: 900; }
.inventory-authority-available.shortage {
  background: var(--inventory-shadow-red);
  color: var(--inventory-danger);
}

.inventory-authority-table td:nth-child(5) { background: var(--inventory-stock); }
.inventory-authority-occupancy { background: #f2f6ff; }
.inventory-authority-occupancy button {
  width: 100%;
  padding: 4px 5px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #244f9f;
  font: inherit;
  font-weight: 850;
  text-align: right;
  cursor: pointer;
  scroll-margin-inline-start: 570px;
}
.inventory-authority-occupancy button:hover { border-color: #9db9ee; background: #eaf1ff; }
.inventory-authority-occupancy button:disabled { color: #7a8799; cursor: not-allowed; opacity: .55; }
.inventory-authority-occupancy button:focus-visible,
.inventory-priority-actions button:focus-visible,
.inventory-priority-form :focus-visible,
.inventory-priority-modal :focus-visible {
  outline: 2px solid var(--inventory-authority);
  outline-offset: 2px;
}

.side-drawer.inventory-priority-drawer {
  width: min(620px, 100vw);
  background: var(--inventory-paper);
  border-left-color: var(--inventory-grid);
}
.side-drawer.inventory-priority-drawer .drawer-body { padding: 14px 16px 28px; }
.inventory-priority-loading,
.inventory-priority-empty,
.inventory-priority-status {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--inventory-grid);
  background: #fff;
  color: #526174;
  font-size: 12px;
}
.inventory-priority-status.ok { border-color: #9bd1bd; color: var(--inventory-ok); }
.inventory-priority-status.stale { border-color: #e2bf62; background: #fff8dd; color: #775c11; }
.inventory-priority-status.held { border-color: #e1a49e; background: #fff4f2; color: var(--inventory-danger); }
.inventory-priority-evidence {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: #46566a;
  font-size: 11px;
}
.inventory-priority-evidence code,
.inventory-priority-code,
.inventory-priority-audit code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  overflow-wrap: anywhere;
}
.inventory-priority-rail {
  position: relative;
  display: grid;
  gap: 0;
  margin: 0 0 16px 8px;
  padding-left: 22px;
  border-left: 2px solid #9bb7eb;
}
.inventory-priority-rail-item {
  position: relative;
  padding: 0 0 18px 8px;
}
.inventory-priority-rail-item:last-child { padding-bottom: 0; }
.inventory-priority-rail-dot {
  position: absolute;
  top: 4px;
  left: -29px;
  width: 12px;
  height: 12px;
  border: 3px solid var(--inventory-paper);
  border-radius: 50%;
  background: var(--inventory-authority);
  box-shadow: 0 0 0 1px #86a6e0;
}
.inventory-priority-rail-item.warning .inventory-priority-rail-dot { background: #c28b13; }
.inventory-priority-rail-item header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}
.inventory-priority-rail-item header strong { color: #183a70; font-size: 13px; }
.inventory-priority-rail-item header code { color: #6f7e90; font-size: 10px; }
.inventory-priority-rail-item dl,
.inventory-priority-preview-breakdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: var(--inventory-grid);
  border: 1px solid var(--inventory-grid);
}
.inventory-priority-rail-item dl > div,
.inventory-priority-preview-breakdown > div { min-width: 0; padding: 7px 8px; background: #fff; }
.inventory-priority-rail-item dt,
.inventory-priority-preview-breakdown dt { color: #718095; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.inventory-priority-rail-item dd,
.inventory-priority-preview-breakdown dd { margin: 2px 0 0; color: #26364a; font-size: 11px; overflow-wrap: anywhere; }
.inventory-priority-age-warning { margin: 0 0 7px; color: #88640c; font-size: 10px; font-weight: 800; }
.inventory-priority-audit-wrap { overflow-x: auto; }
.inventory-priority-audit { min-width: 920px; border-collapse: collapse; background: #fff; font-size: 10px; }
.inventory-priority-audit th,
.inventory-priority-audit td { padding: 7px 8px; border: 1px solid var(--inventory-grid); text-align: left; vertical-align: top; }
.inventory-priority-audit th { background: #edf2fa; color: #425673; }
.inventory-priority-audit td code { display: block; max-width: 180px; }
.inventory-priority-actions { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0; }
.inventory-priority-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--inventory-grid);
  background: #fff;
}
.inventory-priority-form label { display: grid; gap: 4px; color: #53647a; font-size: 10px; font-weight: 800; }
.inventory-priority-form input,
.inventory-priority-form select { min-width: 0; min-height: 34px; padding: 5px 7px; border: 1px solid #aeb9c9; background: #fff; color: #1f3148; }
.inventory-priority-form .wide,
.inventory-priority-form fieldset.wide { grid-column: 1 / -1; }
.inventory-priority-form fieldset { min-width: 0; margin: 0; padding: 8px; border: 1px solid var(--inventory-grid); }
.inventory-priority-claim-select { grid-template-columns: auto 1fr 90px !important; align-items: center; margin-top: 6px; }
.inventory-priority-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(15, 27, 44, .46);
}
.inventory-priority-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 51;
  width: min(620px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  transform: translate(-50%, -50%);
  border: 1px solid var(--inventory-grid);
  background: var(--inventory-paper);
  box-shadow: 0 20px 56px rgba(15, 27, 44, .28);
}
.inventory-priority-modal > header,
.inventory-priority-modal > footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--inventory-grid); background: #fff; }
.inventory-priority-modal > header h2 { margin: 0; color: #1f385c; font-size: 16px; }
.inventory-priority-modal > footer { justify-content: flex-end; border-top: 1px solid var(--inventory-grid); border-bottom: 0; }
#inventoryPriorityConfirmBody { padding: 14px; }
.inventory-priority-preview { width: 100%; margin-bottom: 12px; border-collapse: collapse; background: #fff; font-size: 12px; }
.inventory-priority-preview th,
.inventory-priority-preview td { padding: 8px; border: 1px solid var(--inventory-grid); text-align: right; }
.inventory-priority-preview th:first-child { text-align: left; }

.inventory-authority-order-detail { display: inline-block; text-align: left; }
.inventory-authority-order-detail summary {
  color: #183f56;
  font-weight: 850;
  text-align: right;
  cursor: pointer;
}
.inventory-authority-order-detail summary:focus-visible {
  outline: 2px solid #3d768f;
  outline-offset: 2px;
}
.inventory-authority-order-detail span {
  display: block;
  margin-top: 2px;
  color: var(--inventory-shadow-muted);
  font-size: 10px;
}

.inventory-shadow-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--inventory-shadow-line);
  background: #fff;
}

.inventory-shadow-heading h3 {
  margin: 4px 0 5px;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.inventory-shadow-heading p {
  max-width: 820px;
  margin: 0;
  color: var(--inventory-shadow-muted);
  line-height: 1.55;
}

.inventory-shadow-kicker {
  color: #2b7188;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.inventory-shadow-heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.inventory-shadow-source {
  display: inline-flex;
  max-width: 360px;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #bcd5c5;
  border-radius: 999px;
  background: var(--inventory-shadow-green);
  color: #276844;
  font-size: 12px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-shadow-source.stale {
  border-color: #e3c678;
  background: var(--inventory-shadow-amber);
  color: #815b08;
}

.inventory-shadow-notice {
  margin: 16px 24px 0;
  padding: 11px 14px;
  border: 1px solid #b9d8c7;
  border-radius: 8px;
  background: #f0f8f3;
  color: #285e41;
  font-size: 13px;
  font-weight: 650;
}

.inventory-shadow-notice.stale {
  border-color: #e5c66e;
  background: var(--inventory-shadow-amber);
  color: #76560d;
}

.inventory-shadow-notice.held {
  border-color: #e5a5a0;
  background: var(--inventory-shadow-red);
  color: #9d2b25;
}

.inventory-shadow-toolbar {
  display: grid;
  grid-template-columns: minmax(250px, 0.7fr) minmax(300px, 1fr) auto minmax(320px, 1fr);
  gap: 12px;
  align-items: end;
  padding: 16px 24px;
  border-bottom: 1px solid var(--inventory-shadow-line);
  background: #f8fbfd;
}

.inventory-shadow-toolbar label {
  display: grid;
  gap: 6px;
}

.inventory-shadow-toolbar label > span {
  color: #49657b;
  font-size: 12px;
  font-weight: 750;
}

.inventory-shadow-toolbar input,
.inventory-shadow-toolbar select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #b8cbd9;
  border-radius: 7px;
  background: #fff;
  color: var(--inventory-shadow-ink);
}

.inventory-shadow-legend {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  min-height: 42px;
  color: var(--inventory-shadow-muted);
  font-size: 12px;
}

.inventory-shadow-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.inventory-shadow-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2f8055;
}

.inventory-shadow-legend i.is-stale { background: #d99a13; }
.inventory-shadow-legend i.is-held { background: #bf3b35; }

.inventory-shadow-table-wrap {
  position: relative;
  width: 100%;
  overflow: auto;
  background: #fff;
  scrollbar-color: #8fa8b9 #eef3f6;
}

.inventory-shadow-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 13px;
}

.inventory-shadow-table th,
.inventory-shadow-table td {
  min-width: 112px;
  height: 52px;
  padding: 8px 10px;
  border-right: 1px solid var(--inventory-shadow-line);
  border-bottom: 1px solid var(--inventory-shadow-line);
  text-align: right;
  vertical-align: middle;
}

.inventory-shadow-table th:nth-child(1),
.inventory-shadow-table td:nth-child(1) { min-width: 142px; text-align: left; }
.inventory-shadow-table th:nth-child(2),
.inventory-shadow-table td:nth-child(2) { min-width: 280px; text-align: left; }
.inventory-shadow-table th:nth-child(3),
.inventory-shadow-table td:nth-child(3) { min-width: 148px; text-align: left; }

.inventory-shadow-table thead th {
  position: sticky;
  top: 44px;
  z-index: 2;
  height: 58px;
  background: #e8f0f5;
  color: #1c425e;
  font-weight: 800;
  text-align: center;
  white-space: normal;
}

.inventory-shadow-table thead .inventory-shadow-groups th {
  top: 0;
  height: 44px;
  background: #d8e5ed;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.inventory-shadow-table tbody tr:hover td { background: #f4f9fc; }
.inventory-shadow-table tbody tr.held td { background: #fff8f7; }

.inventory-shadow-description {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-shadow-ean code {
  color: #0e486b;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  font-weight: 750;
}

.inventory-shadow-table td:nth-child(3) strong,
.inventory-shadow-table td:nth-child(3) small {
  display: block;
}

.inventory-shadow-table td:nth-child(3) small {
  margin-top: 3px;
  color: var(--inventory-shadow-muted);
  font-size: 10px;
}

.inventory-shadow-number {
  min-width: 62px;
  min-height: 32px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #173c57;
  font: inherit;
  font-weight: 800;
  text-align: right;
  cursor: pointer;
}

.inventory-shadow-number:hover,
.inventory-shadow-number:focus-visible {
  border-color: #7ca8bf;
  background: var(--inventory-shadow-blue);
  outline: none;
}

.inventory-shadow-number.shortage {
  min-width: 150px;
  border-color: #e7a19d;
  background: var(--inventory-shadow-red);
  color: #b32923;
}

.inventory-shadow-number.held,
.inventory-shadow-number:disabled {
  color: #8d5960;
  cursor: not-allowed;
  opacity: 0.78;
}

.inventory-shadow-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.inventory-shadow-badge.current { background: var(--inventory-shadow-green); color: #2b6c48; }
.inventory-shadow-badge.stale { background: var(--inventory-shadow-amber); color: #835f09; }
.inventory-shadow-badge.held { background: var(--inventory-shadow-red); color: #a62e29; }

.inventory-shadow-empty {
  height: 180px !important;
  color: var(--inventory-shadow-muted);
  text-align: center !important;
}

.inventory-shadow-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 24px;
  border-top: 1px solid var(--inventory-shadow-line);
  background: #f8fbfd;
  color: var(--inventory-shadow-muted);
  font-size: 12px;
}

.side-drawer.inventory-shadow-drawer {
  width: min(720px, 96vw);
}

.inventory-shadow-drawer-loading,
.inventory-shadow-drawer-empty,
.inventory-shadow-drawer-error {
  display: grid;
  gap: 6px;
  min-height: 100px;
  place-content: center;
  padding: 22px;
  border: 1px solid #c6d6e1;
  border-radius: 9px;
  background: #f7fafc;
  color: #536d80;
  text-align: center;
}

.inventory-shadow-drawer-error.held {
  border-color: #e4a8a3;
  background: var(--inventory-shadow-red);
  color: #9c2d27;
}

.inventory-shadow-drawer-warning {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #e1c16b;
  border-radius: 8px;
  background: var(--inventory-shadow-amber);
  color: #74540b;
  font-size: 12px;
  font-weight: 700;
}

.inventory-shadow-drawer-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.inventory-shadow-drawer-summary > div {
  display: grid;
  gap: 4px;
  min-height: 66px;
  padding: 10px 12px;
  border: 1px solid #cfdee7;
  border-radius: 8px;
  background: #f5f9fb;
}

.inventory-shadow-drawer-summary span,
.inventory-shadow-drawer-group small {
  color: #657b8c;
  font-size: 11px;
}

.inventory-shadow-drawer-summary strong {
  color: #143951;
  overflow-wrap: anywhere;
}

.inventory-shadow-drawer-group {
  margin-bottom: 14px;
  border: 1px solid #c9d9e3;
  border-radius: 9px;
  overflow: hidden;
  background: #fff;
}

.inventory-shadow-drawer-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 13px;
  border-bottom: 1px solid #c9d9e3;
  background: #edf4f8;
}

.inventory-shadow-drawer-group > header div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.inventory-shadow-drawer-group > header span,
.inventory-shadow-drawer-group > header small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-shadow-drawer-group > header strong {
  min-width: 48px;
  padding: 5px 8px;
  border-radius: 6px;
  background: #dcebf3;
  color: #164760;
  text-align: right;
}

.inventory-shadow-drawer-table-wrap {
  overflow-x: auto;
}

.inventory-shadow-drawer-table {
  width: 100%;
  min-width: 690px;
  border-collapse: collapse;
  font-size: 11px;
}

.inventory-shadow-drawer-table th,
.inventory-shadow-drawer-table td {
  padding: 9px 10px;
  border-right: 1px solid #d7e2e9;
  border-bottom: 1px solid #d7e2e9;
  text-align: left;
  vertical-align: top;
}

.inventory-shadow-drawer-table th {
  background: #f6f9fb;
  color: #526e82;
  font-weight: 800;
  white-space: nowrap;
}

.inventory-shadow-drawer-table th:nth-child(5),
.inventory-shadow-drawer-table td:nth-child(5) {
  text-align: right;
}

.inventory-shadow-drawer-evidence {
  margin-top: 8px;
  color: #708493;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
  overflow-wrap: anywhere;
}

.inventory-order-ci-list { display: grid; gap: 3px; }
.inventory-order-ci { color: #783e0c; font-size: 10px; font-weight: 750; }
.inventory-order-none { color: #587566; font-size: 11px; }
.inventory-order-action-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.inventory-order-action-card {
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid #cddbe5;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 18px rgb(29 67 91 / 7%);
}

.inventory-order-action-card > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.inventory-order-action-card > header > div { display: grid; gap: 2px; }
.inventory-order-action-card > header span,
.inventory-order-action-quantities span {
  color: #6b8191;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.inventory-order-action-card > header strong { color: #153f5c; font-size: 15px; }
.inventory-order-action-card > header small { color: #6b8191; font-size: 11px; }

.inventory-order-action-quantities {
  display: grid;
  grid-template-columns: repeat(5, minmax(88px, 1fr));
  gap: 8px;
}

.inventory-order-action-quantities > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px 10px;
  border-radius: 8px;
  background: #f4f8fb;
}

.inventory-order-action-quantities strong { color: #163f5c; font-size: 16px; }
.inventory-order-action-ci { display: grid; gap: 4px; }

.inventory-order-action-toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.inventory-order-action-toolbar button { min-height: 40px; padding: 7px 10px; }
.inventory-order-action-toolbar .danger-button {
  border: 1px solid #dfa5a0;
  background: #fff4f3;
  color: #a52d28;
}
.inventory-order-action-toolbar .warning-button {
  border: 1px solid #dfc16d;
  background: #fff9e8;
  color: #76560d;
}
.inventory-order-action-toolbar button:disabled { cursor: not-allowed; opacity: .48; }

.inventory-order-action-hold {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid #e2c46f;
  border-radius: 9px;
  background: var(--inventory-shadow-amber);
  color: #76560d;
  font-size: 11px;
  line-height: 1.45;
}

.inventory-order-action-history {
  margin-top: 16px;
  border: 1px solid #cddbe5;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.inventory-order-action-history summary {
  padding: 12px 14px;
  background: #edf4f8;
  color: #244e69;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.inventory-order-action-editor { display: grid; gap: 14px; }
.inventory-order-action-field {
  display: grid;
  gap: 6px;
  color: #36566d;
  font-size: 11px;
  font-weight: 750;
}
.inventory-order-action-field input { min-height: 44px; width: 100%; }
.inventory-order-action-field small { color: #6c8090; font-weight: 500; }
.inventory-order-action-preview {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid #9fc8b0;
  border-radius: 9px;
  background: var(--inventory-shadow-green);
  color: #285e41;
  font-size: 12px;
}
.inventory-order-action-preview-lines { display: grid; gap: 5px; margin-top: 4px; }
.inventory-order-action-preview-lines > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 5px;
  border-top: 1px solid rgb(40 94 65 / 16%);
}

@media (max-width: 1180px) {
  .inventory-authority-heading { align-items: stretch; flex-direction: column; }
  .inventory-authority-toolbar { grid-template-columns: 1fr 1fr; }
  .inventory-authority-provenance { grid-column: 1 / -1; justify-content: flex-start; }
  .inventory-shadow-heading { align-items: stretch; flex-direction: column; }
  .inventory-shadow-heading-actions { justify-content: space-between; }
  .inventory-shadow-toolbar { grid-template-columns: 1fr 1fr auto; }
  .inventory-shadow-legend { grid-column: 1 / -1; justify-content: flex-start; }
}

@media (max-width: 720px) {
  .inventory-authority-panel { margin: 8px; }
  .inventory-authority-toolbar { grid-template-columns: 1fr; }
  .inventory-authority-provenance { grid-column: auto; overflow-x: auto; }
  .inventory-authority-heading button { min-height: 44px; }
  .inventory-authority-table th:nth-child(2),
  .inventory-authority-table td:nth-child(2),
  .inventory-authority-table th:nth-child(3),
  .inventory-authority-table td:nth-child(3) { position: static; }
  .inventory-authority-occupancy button { scroll-margin-inline-start: 190px; }
  .side-drawer.inventory-priority-drawer { width: 100vw; max-width: 100vw !important; }
  .inventory-priority-form { grid-template-columns: 1fr; }
  .inventory-priority-form .wide,
  .inventory-priority-form fieldset.wide { grid-column: auto; }
  .inventory-order-action-toolbar button { min-height: 44px; }
  .inventory-order-action-quantities { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inventory-order-action-toolbar { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .side-drawer.inventory-shadow-drawer,
  .inventory-authority-edit-trigger,
  .inventory-authority-history-trigger,
  .inventory-authority-editor {
    transition: none;
  }
  .side-drawer.inventory-priority-drawer,
  .inventory-priority-modal { transition: none; }
}
