:root {
  color-scheme: light;
  --bg: #e9ecef;
  --panel: #f7f8f9;
  --line: #1f2933;
  --muted-line: #a4adb8;
  --field: #ffffff;
  --text: #18212b;
  --muted: #607080;
  --accent: #00cfd4;
  --danger: #e11d48;
  --blue: #2454d6;
  --navy: #17365d;
}

/* Hidden Order Entry pilot. All rules are scoped to its own view. */
#orderEntryView .oeWindow {
  width: 100%;
  min-width: 0;
  border: 2px solid #6a9cff;
  background: #d7d7d7;
  padding: 12px;
}

#orderEntryView h2,
#orderEntryView h3 {
  margin: 0;
  color: var(--navy);
  font-size: 14px;
}

#orderEntryView h2 { font-size: 16px; }

#orderEntryView .oeToolbar,
#orderEntryView .oeCommands,
#orderEntryView .oeOpen,
#orderEntryView .oeStatusBar,
#orderEntryView .oeLinesHeading,
#orderEntryView .oeDialogHeading,
#orderEntryView .oeDialogActions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

#orderEntryView .oeToolbar { gap: 10px 16px; }
#orderEntryView .oeCommands { margin-left: auto; }
#orderEntryView .oeOpen input { width: 110px; }
#orderEntryView button { padding: 3px 10px; }
#orderEntryView button:disabled { cursor: default; opacity: 0.48; }
#orderEntryView button:focus-visible,
#orderEntryView input:focus-visible,
#orderEntryView textarea:focus-visible,
#orderEntryView summary:focus-visible,
#orderEntryView .oeGridWrap:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

#orderEntryView [data-command="save"]:not(:disabled) {
  background: var(--navy);
  border-color: var(--navy);
  color: white;
}

#orderEntryView .oeStatusBar {
  min-height: 30px;
  margin-top: 10px;
  padding: 5px 8px;
  border-block: 1px solid var(--muted-line);
  background: #eeeeee;
  gap: 6px 16px;
  overflow-wrap: anywhere;
}

#orderEntryView [data-role="identity"] { color: var(--navy); }
#orderEntryView [data-role="gate"] { margin-left: auto; font-size: 12px; }
#orderEntryView .oeMessage { margin: 6px 0; min-height: 16px; font-size: 12px; overflow-wrap: anywhere; }
#orderEntryView .oeError,
#orderEntryView .oeBlockers { color: #9f1239; }
#orderEntryView .oeBlockers { margin: 6px 0 10px; padding-left: 22px; overflow-wrap: anywhere; }
#orderEntryView .oeBlockers li + li { margin-top: 3px; }
#orderEntryView .oeSaveIssues { margin: 6px 0 10px; }
#orderEntryView .oeSaveIssues summary { font-size: 12px; color: #9f1239; }

#orderEntryView fieldset { min-width: 0; margin: 0; border: 0; padding: 0; }
#orderEntryView .oeHeader { border-bottom: 1px solid var(--muted-line); padding-bottom: 4px; }
#orderEntryView legend { padding: 0 0 6px; font-weight: 700; color: var(--navy); }
#orderEntryView .oeReferenceGrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 14px; margin-top: 8px; }
#orderEntryView .oeField { display: grid; gap: 3px; min-width: 0; align-content: start; }
#orderEntryView .oeField > span,
#orderEntryView .oeField > label { font-size: 12px; color: #45515f; overflow-wrap: anywhere; }
#orderEntryView .oeCodeControl { display: grid; grid-template-columns: 70px 28px minmax(0, 1fr); gap: 4px; min-width: 0; align-items: start; }
#orderEntryView .oeCodeControl input { min-width: 0; width: 100%; }
#orderEntryView .oeCodeControl .oeIcon { min-height: 28px; }
#orderEntryView .oeCodeHint { min-height: 28px; display: flex; align-items: center; font-size: 13px; color: var(--blue); overflow-wrap: anywhere; }
#orderEntryView .oeCodeHint.oeError { color: #9f1239; }
#orderEntryView .oeCustomerRow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
#orderEntryView .oeCustomerIdentity { min-width: 0; }
#orderEntryView .oeField-customerCode .oeCodeControl { grid-template-columns: 110px 28px minmax(0, 1fr); }
#orderEntryView input:disabled,
#orderEntryView textarea:disabled { opacity: 1; color: var(--text); background: #f5f5f5; }
#orderEntryView input[readonly] { color: var(--blue); }
#orderEntryView textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--muted-line);
  padding: 5px 7px;
  resize: vertical;
  font: inherit;
  background: var(--field);
}

#orderEntryView .oeAddresses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 8px 0; }
#orderEntryView .oeAddresses h3 { font-size: 12px; margin-bottom: 4px; }
#orderEntryView .oeAddresses section { min-width: 0; }
#orderEntryView .oeAddresses section > div { min-height: 46px; white-space: pre-line; overflow-wrap: anywhere; line-height: 18px; }
#orderEntryView .oeAddressName { color: var(--blue); font-weight: 400; }
#orderEntryView .oeOther { border-bottom: 1px solid var(--muted-line); padding-block: 7px; container-type: inline-size; }
#orderEntryView summary { color: var(--navy); font-weight: 700; cursor: pointer; width: fit-content; }
#orderEntryView .oeOtherToolbar { display: flex; justify-content: flex-end; margin-top: -22px; margin-bottom: 8px; min-height: 28px; }
#orderEntryView .oeOtherLayout { display: grid; grid-template-columns: minmax(0, 1fr) 278px; gap: 12px; align-items: start; }
#orderEntryView .oeOtherFields { display: grid; grid-template-columns: 224px minmax(0, 1fr); gap: 8px 14px; }
#orderEntryView .oeDateFields { display: grid; align-content: start; gap: 7px; }
#orderEntryView .oeDateFields .oeField { grid-template-columns: 70px 148px; gap: 6px; align-items: center; }
#orderEntryView .oeDateFields input { width: 148px; min-width: 0; padding: 3px 6px; }
#orderEntryView .oeOrderCodes { min-width: 0; }
#orderEntryView .oeOrderReferences { display: grid; grid-template-columns: minmax(0, 1fr) minmax(90px, 150px); gap: 10px; }
#orderEntryView .oeMemo { grid-column: 1 / -1; }
#orderEntryView .oeLinesHeading { justify-content: space-between; margin: 10px 0 6px; }

#orderEntryView .oeGridWrap { max-width: 100%; overflow: auto; border: 1px solid var(--line); background: #d7d7d7; }
#orderEntryView .oeGrid { width: max-content; min-width: 0; border-collapse: collapse; table-layout: auto; font-size: 12px; background: white; }
#orderEntryView .oeGrid th,
#orderEntryView .oeGrid td { border: 1px solid var(--muted-line); padding: 3px 5px; text-align: left; white-space: nowrap; }
#orderEntryView .oeGrid thead th { height: 28px; color: var(--navy); background: #eeeeee; }
#orderEntryView .oeGrid thead th[colspan] { text-align: center; }
#orderEntryView .oeGrid tbody tr:not(.oeSizeHeading):nth-child(odd) { background: #f7f8f9; }
#orderEntryView .oeSizeHeading th,
#orderEntryView .oeSizeHeading td { background: #e0e6ed; color: var(--navy); font-weight: 700; text-align: center; }
#orderEntryView .oeSizeHeading th:first-child { text-align: right; }
#orderEntryView .oeGrid td:has(input) { padding: 2px; }
#orderEntryView .oeGrid input[type="number"] { box-sizing: border-box; height: 27px; padding: 2px 4px; text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; appearance: textfield; }
#orderEntryView .oeGrid input[data-line-field="quantity"]::placeholder { color: inherit; opacity: 1; }
#orderEntryView input[type="number"]::-webkit-inner-spin-button,
#orderEntryView input[type="number"]::-webkit-outer-spin-button { margin: 0; appearance: none; }
#orderEntryView input[type="checkbox"] { width: 15px; height: 15px; padding: 0; margin: 0; accent-color: var(--navy); }
#orderEntryView .oeGrid td:has(input[type="checkbox"]) { text-align: center; }
#orderEntryView .oeGrid [data-line-total],
#orderEntryView .oeGrid .oeNumeric { text-align: right; font-variant-numeric: tabular-nums; }
#orderEntryView .oeGrid tfoot th,
#orderEntryView .oeGrid tfoot td { background: #eeeeee; color: var(--navy); font-weight: 700; border-top: 2px solid var(--line); }
#orderEntryView input[data-unavailable="true"] { background: #d7d7d7; color: #637080; border-color: #c2c7cd; cursor: not-allowed; }
#orderEntryView[data-editable="false"] .oeGrid input[type="number"]:not([data-unavailable="true"]) { border-color: transparent; background: transparent; }
#orderEntryView .negativeNumber,
#orderEntryView input.negativeNumber,
#orderEntryView .oeGrid .negativeNumber,
#orderEntryView .oeTotals .negativeNumber { color: var(--danger); }
#orderEntryView .oeLineTools { display: flex; justify-content: center; gap: 2px; }
#orderEntryView .oeIcon { display: inline-grid; place-items: center; flex: 0 0 28px; width: 28px; min-height: 28px; padding: 0; font-size: 16px; line-height: 1; }
#orderEntryView .oeEmpty { height: 64px; color: var(--muted); text-align: center; }

#orderEntryView .oeTotals { margin: 0; padding: 7px; background: #eeeeee; border: 1px solid var(--line); }
#orderEntryView .oeTotals > div { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 6px; align-items: center; padding: 2px 0; min-width: 0; }
#orderEntryView .oeTotals dt { font-size: 12px; color: #45515f; }
#orderEntryView .oeTotals dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; min-width: 0; display: flex; justify-content: flex-end; }
#orderEntryView .oeTotals output,
#orderEntryView .oeTotals input { display: block; width: 98px; min-width: 0; min-height: 26px; padding: 3px 5px; border: 1px solid var(--muted-line); background: white; text-align: right; font: inherit; font-size: 12px; font-variant-numeric: tabular-nums; }
#orderEntryView .oeTotals dd.oeAmountPair { display: grid; grid-template-columns: minmax(0, 1fr) 10px 98px; gap: 3px; align-items: center; }
#orderEntryView .oeTotals .oeAmountPair input { width: 100%; }
#orderEntryView .oeTotals .oeAmountPair > span { font-size: 11px; }
#orderEntryView .oeTotals output { overflow-wrap: anywhere; }
#orderEntryView .oeAmountDivider { border-top: 1px solid var(--muted-line); margin-top: 3px; padding-top: 5px !important; }
#orderEntryView .oeGrandTotal { font-weight: 700; color: var(--navy); background: #e0e6ed; }
#orderEntryView .oeGrandTotal output { font-weight: 700; }
#orderEntryView .oeSrOnly { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

#orderEntryView .oeDialog { width: min(720px, calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); overflow: auto; padding: 14px; border: 2px solid var(--line); background: var(--panel); color: var(--text); }
#orderEntryView .oeDialog::backdrop { background: #0006; }
#orderEntryView .oeDialogHeading { justify-content: space-between; margin-bottom: 12px; }
#orderEntryView .oeLookupForm { display: grid; gap: 4px; }
#orderEntryView .oeLookupForm > div { display: flex; gap: 6px; }
#orderEntryView .oeLookupForm input { min-width: 0; }
#orderEntryView .oeDialog p { min-height: 16px; font-size: 12px; overflow-wrap: anywhere; }
#orderEntryView .oeLookupResults { display: grid; gap: 3px; max-height: 45vh; overflow: auto; }
#orderEntryView .oeLookupResult { display: grid; grid-template-columns: minmax(72px, 1fr) 3fr; gap: 10px; text-align: left; background: white; padding: 8px; }
#orderEntryView .oeLookupResult > * { min-width: 0; overflow-wrap: anywhere; }
#orderEntryView .oeLineFields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; }
#orderEntryView .oeCheck { display: flex; gap: 6px; align-items: center; }
#orderEntryView .oeLineSizes { padding-block: 12px; }
#orderEntryView .oeLineSizes > div { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
#orderEntryView .oeLineSizes .oeField > span { min-height: 14px; }
#orderEntryView .oeDialogActions { justify-content: end; margin-top: 12px; }
#orderEntryView .oeInfoDialog { width: min(840px, calc(100vw - 32px)); margin: auto; }
#orderEntryView .oeInfoTabs { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
#orderEntryView .oeInfoTabs button { border: 1px solid var(--muted-line); border-bottom: 0; background: #e1e5e9; color: var(--navy); min-height: 30px; padding: 4px 9px; font-size: 12px; }
#orderEntryView .oeInfoTabs button[aria-selected="true"] { background: white; border-color: var(--line); font-weight: 700; }
#orderEntryView .oeInfoDialog [role="tabpanel"] { min-height: 350px; }
#orderEntryView .oeInfoGrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; }
#orderEntryView .oeInfoGrid input { width: 100%; min-width: 0; }
#orderEntryView .oeInfoWide { grid-column: 1 / -1; }
#orderEntryView .oeInfoFlags { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 14px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--muted-line); }
#orderEntryView .oeInfoFlags .oeCheck { font-size: 12px; min-width: 0; }
#orderEntryView .oeInfoFlags input { flex: 0 0 15px; }
#orderEntryView .oeInfoMaster { margin-top: 14px; }

@container (max-width: 1000px) {
  #orderEntryView .oeOtherFields { grid-template-columns: minmax(0, 1fr); }
  #orderEntryView .oeDateFields { grid-template-columns: repeat(2, 224px); }
}
@container (max-width: 780px) {
  #orderEntryView .oeOtherLayout { grid-template-columns: minmax(0, 1fr); }
  #orderEntryView .oeAmountFields { width: 278px; max-width: 100%; }
  #orderEntryView .oeDateFields { grid-template-columns: repeat(2, 224px); }
}
@container (max-width: 480px) {
  #orderEntryView .oeDateFields,
  #orderEntryView .oeReferenceGrid,
  #orderEntryView .oeOrderReferences { grid-template-columns: minmax(0, 1fr); }
  #orderEntryView .oeDateFields .oeField { grid-template-columns: 70px 148px; }
}

@media (max-width: 1100px) {
}

@media (max-width: 600px) {
  #orderEntryView .oeWindow { padding: 8px; }
  #orderEntryView .oeToolbar { align-items: start; }
  #orderEntryView .oeToolbar h2 { width: 100%; }
  #orderEntryView .oeCommands { margin-left: 0; }
  #orderEntryView .oeCustomerRow,
  #orderEntryView .oeAddresses { grid-template-columns: minmax(0, 1fr); }
  #orderEntryView .oeStatusBar [data-role="gate"] { width: 100%; margin-left: 0; }
  #orderEntryView .oeLineSizes > div { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #orderEntryView .oeInfoGrid,
  #orderEntryView .oeInfoFlags { grid-template-columns: minmax(0, 1fr); }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
}

button,
input,
select {
  font: inherit;
}

.shell {
  min-height: 100vh;
  padding: 16px;
  width: 100%;
}

.loginPanel {
  min-height: 100vh;
  display: grid;
  place-items: start center;
  padding: 72px 16px 16px;
}

.loginBox {
  width: min(360px, 100%);
  border: 2px solid var(--line);
  background: var(--panel);
  padding: 18px;
}

.loginBox h1 {
  margin: 0 0 18px;
  font-size: 20px;
}

.loginStatus {
  margin: 0 0 14px;
  color: var(--muted);
}

.cognitoButton {
  display: block;
  min-height: 32px;
  border: 1px solid #1d4ed8;
  background: #2454d6;
  color: #ffffff;
  line-height: 32px;
  margin-bottom: 14px;
  text-align: center;
  text-decoration: none;
}

.cognitoButton:hover {
  background: #1d4ed8;
}

.loginBox p {
  min-height: 18px;
  margin: 12px 0 0;
  color: var(--danger);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0 0 12px;
  gap: 16px;
}

.topbarBrand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar h1,
.topbar p {
  margin: 0;
}

.topbar h1 {
  font-size: 20px;
  font-weight: 700;
}

.topbar p {
  color: var(--muted);
  margin-top: 2px;
}

.topMenuButton {
  display: none;
  place-items: center;
  gap: 3px;
  width: 34px;
  min-height: 31px;
  padding: 6px;
}

.topMenuButton span {
  display: block;
  width: 17px;
  height: 2px;
  background: var(--line);
}

.status {
  min-width: 112px;
  padding: 7px 10px;
  border: 1px solid var(--muted-line);
  background: var(--field);
  text-align: center;
}

.topbarControls {
  display: flex;
  align-items: end;
  gap: 10px;
}

.tenantPicker {
  display: grid;
  gap: 3px;
}

.tenantPicker span {
  color: var(--muted);
  font-size: 12px;
}

.tenantPicker select {
  min-width: 180px;
  height: 31px;
  border: 1px solid var(--muted-line);
  background: var(--field);
  color: var(--text);
  padding: 3px 7px;
}

.userStatus {
  display: grid;
  gap: 3px;
  min-width: 124px;
}

.userStatus span {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appBody {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  margin: 0;
  align-items: start;
}

.appNav {
  position: sticky;
  top: 12px;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 96px);
  border: 2px solid var(--line);
  background: #eeeeee;
  padding: 8px;
}

.navBackdrop {
  display: none;
}

.navMain {
  display: grid;
  gap: 6px;
}

.navItem {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 34px;
  padding: 4px 7px;
  text-align: left;
}

.navItem.selected {
  border-color: var(--line);
  background: #ffffff;
  box-shadow: inset 3px 0 0 var(--accent);
}

.navIcon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--muted-line);
  background: #ffffff;
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
}

.navText {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.navFooter {
  display: grid;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--muted-line);
}

.navFooter span {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viewPanel {
  min-width: 0;
  width: 100%;
}

.workspace {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  border: 2px solid #6a9cff;
  background: #d7d7d7;
  width: 100%;
}

.searchPane {
  border-right: 1px solid var(--line);
  padding: 14px;
  background: var(--panel);
}

.searchForm label {
  display: block;
  color: var(--danger);
  font-weight: 700;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.searchFilters {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--muted-line);
}

.searchFilters label {
  margin: 0;
  color: var(--text);
  font-weight: 400;
  text-transform: none;
}

.searchFilters label > span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
}

.filterGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.filterCheck {
  display: flex !important;
  align-items: center;
  gap: 6px;
}

.filterCheck input {
  width: 15px;
  height: 15px;
}

.filterCheck span {
  margin: 0 !important;
}

.searchRow {
  display: block;
}

input,
.ordersSearch select {
  width: 100%;
  height: 28px;
  border: 1px solid var(--muted-line);
  background: var(--field);
  padding: 3px 7px;
}

input[readonly] {
  color: var(--blue);
}

button {
  min-height: 28px;
  border: 1px solid #7d8791;
  background: linear-gradient(#ffffff, #e9edf2);
  color: var(--text);
  cursor: pointer;
}

button:hover {
  border-color: #425466;
}

.results {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.resultRow {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 8px;
  text-align: left;
}

.resultRow.selected {
  border-color: var(--line);
  background: #ffffff;
  box-shadow: inset 3px 0 0 var(--accent);
}

.resultRow span {
  font-weight: 700;
}

.resultRow small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resultNav {
  display: grid;
  grid-template-columns: 32px 32px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}

.resultNav span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.detailPane {
  padding: 14px;
  min-width: 0;
}

.detailGrid {
  display: grid;
  grid-template-columns: minmax(480px, 632px) 240px;
  gap: 24px;
  align-items: start;
}

.fields {
  border: 2px solid var(--line);
  background: #eeeeee;
}

.inventoryHeader {
  min-height: 162px;
}

.fields label {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
}

.fields label > span:first-child {
  text-align: right;
}

.twoCol {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.twoCol label {
  grid-template-columns: 86px minmax(0, 1fr);
}

.checkLine {
  display: flex;
  gap: 6px;
}

.checkLine input {
  width: 16px;
  height: 16px;
}

.detailPricingGrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  border-top: 2px solid var(--line);
}

.identityFields {
  padding: 4px 0;
}

.pricingFields {
  align-content: start;
  display: grid;
  padding: 4px 8px 4px 0;
  border-left: 2px solid var(--line);
}

.pricingFields label {
  grid-template-columns: 56px 76px;
  padding: 3px 0 3px 8px;
}

.pricingFields input {
  justify-self: end;
  text-align: right;
  width: 76px;
}

.pictureBox {
  margin: 0;
  display: grid;
  gap: 6px;
}

#pictureFallback {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 188px;
  border: 1px solid var(--muted-line);
  background: #ffffff;
  color: #30437c;
}

#pictureFallback strong {
  display: block;
  color: #1f2933;
  font-family: Georgia, serif;
  font-size: 30px;
  font-weight: 400;
}

#pictureFallback span {
  margin-top: 18px;
  font-size: 26px;
  text-align: center;
}

#stockImage {
  width: 240px;
  height: 188px;
  object-fit: contain;
  border: 1px solid var(--muted-line);
  background: #ffffff;
}

.imageAdminWorkspace {
  grid-template-columns: 300px minmax(0, 1fr);
}

.imageAdminStatus {
  margin-top: 10px;
}

.imageAdminDetail {
  display: grid;
  gap: 14px;
  align-content: start;
}

.imageAdminHeader {
  width: min(680px, 100%);
}

.imageAdminMain {
  display: grid;
  grid-template-columns: 280px minmax(260px, 420px);
  gap: 18px;
  align-items: start;
}

.imageAdminTabs {
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  border: 1px solid var(--line);
  background: #ffffff;
}

.imageAdminTabs button {
  min-width: 108px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #ffffff;
  font-weight: 700;
}

.imageAdminTabs button:last-child {
  border-right: 0;
}

.imageAdminTabs button.selected {
  background: #e8eef6;
  color: var(--navy);
}

.imageAdminTabPanel {
  min-width: 0;
}

.imageAdminPicture {
  width: 280px;
}

#imageAdminPreview,
#imageAdminFallback {
  width: 280px;
  height: 220px;
}

#imageAdminPreview {
  object-fit: contain;
  border: 1px solid var(--muted-line);
  background: #ffffff;
}

#imageAdminFallback {
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px solid var(--muted-line);
  background: #ffffff;
  color: #30437c;
}

#imageAdminFallback strong {
  display: block;
  color: #1f2933;
  font-family: Georgia, serif;
  font-size: 30px;
  font-weight: 400;
}

#imageAdminFallback span {
  margin-top: 18px;
  font-size: 22px;
  text-align: center;
}

.imageUploadPanel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 2px solid var(--line);
  background: #eeeeee;
}

.imageUploadPanel label {
  display: grid;
  gap: 4px;
}

.imageUploadPanel label span {
  color: var(--muted);
  font-size: 12px;
}

.imageUploadPanel input[type="file"] {
  height: auto;
  min-height: 31px;
}

.bulkUploadPanel {
  max-width: 520px;
}

.imageAdminActions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.imageAdminActions button {
  min-width: 126px;
}

#imageUploadNote {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

#bulkImageUploadProgress {
  width: 100%;
  height: 14px;
}

#bulkImageUploadNote {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.imageFilesToolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.imageFilesToolbar span {
  color: var(--muted);
  font-size: 12px;
}

.imageFilesTableWrap {
  max-height: 520px;
  overflow: auto;
  border: 2px solid var(--line);
  background: #d7d7d7;
}

.imageFilesTable {
  width: max-content;
  min-width: 760px;
  border-collapse: collapse;
  background: var(--field);
}

.imageFilesTable th,
.imageFilesTable td {
  height: 27px;
  border: 1px solid var(--line);
  padding: 3px 8px;
  white-space: nowrap;
}

.imageFilesTable th {
  background: #eeeeee;
  color: var(--navy);
  font-weight: 700;
  text-align: left;
}

.imageFilesTable th:nth-child(2),
.imageFilesTable th:nth-child(3),
.imageFilesTable th:nth-child(4),
.imageFilesTable td:nth-child(2),
.imageFilesTable td:nth-child(3),
.imageFilesTable td:nth-child(4) {
  text-align: right;
}

.imageFilesTable td:first-child {
  min-width: 260px;
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.imageFileDeleteButton {
  min-width: 68px;
}

[hidden] {
  display: none !important;
}

figcaption {
  color: var(--muted);
  text-align: center;
}

.sizePanel {
  --size-table-width: 356px;
  margin-top: 16px;
  width: var(--size-table-width);
  max-width: 100%;
}

.inventoryControls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  margin-bottom: 8px;
  width: 100%;
}

.inventoryControls label {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.inventoryControls label span {
  color: var(--muted);
  font-size: 12px;
}

.inventoryControls select {
  height: 28px;
  width: 100%;
  border: 1px solid var(--muted-line);
  background: var(--field);
}

.sizeRange {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: left;
}

.sizeRange strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  text-align: left;
  white-space: nowrap;
}

.sizeTable {
  width: 100%;
  border-collapse: collapse;
  background: var(--field);
  table-layout: fixed;
}

.sizeTable th:nth-child(1),
.sizeTable td:nth-child(1) {
  width: 72px;
}

.sizeTable th:nth-child(2),
.sizeTable td:nth-child(2) {
  width: 104px;
}

.sizeTable th:nth-child(3),
.sizeTable td:nth-child(3) {
  width: 104px;
}

.sizeTable th:nth-child(4),
.sizeTable td:nth-child(4) {
  width: 76px;
}

.sizeTable th,
.sizeTable td {
  border: 1px solid var(--line);
  height: 27px;
  padding: 3px 8px;
}

.sizeTable th {
  background: #eeeeee;
  color: var(--navy);
  font-weight: 700;
  text-align: left;
}

.sizeTable td:nth-child(1),
.sizeTable td:nth-child(3),
.sizeTable td:nth-child(4),
.sizeTable th:nth-child(1),
.sizeTable th:nth-child(3),
.sizeTable th:nth-child(4) {
  text-align: right;
}

.sizeTable td:nth-child(4),
.sizeTable th:nth-child(4) {
  text-align: center;
}

.sizeTable tfoot td {
  background: #eeeeee;
  font-weight: 700;
}

.sizeTable tfoot td:nth-child(2) {
  text-align: right;
}

.sizeTable tbody tr:not(.notOffered) td:nth-child(2) {
  color: var(--danger);
}

.notOffered {
  background: #d7d7d7;
  color: #8a8f96;
}

.ordersWindow {
  min-height: 720px;
  border: 2px solid #6a9cff;
  background: #d7d7d7;
  padding: 14px;
  width: 100%;
}

.ordersSearch {
  display: grid;
  grid-template-columns: 230px 94px 226px 112px 94px 148px;
  gap: 8px;
  align-items: end;
  max-width: 930px;
}

.invoicesSearch {
  grid-template-columns:
    230px
    94px
    226px
    112px
    86px
    64px
    132px
    132px;
  max-width: 1114px;
}

.ordersSearch label {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.ordersSearch label > span {
  line-height: 14px;
  min-height: 14px;
}

.inlineCheck {
  display: flex;
  align-items: center;
  gap: 4px;
  align-self: center;
  padding-top: 14px;
}

.customerTypeGroup {
  display: grid;
  grid-template-columns: 58px 100px 68px;
  column-gap: 0;
  row-gap: 3px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  align-self: end;
}

.typeGroupLabel {
  display: block;
  grid-column: 1 / -1;
  padding: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 14px;
  min-height: 14px;
}

.customerTypeGroup label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 28px;
  margin: 0;
  padding: 3px 4px;
  border-top: 1px solid var(--muted-line);
  border-bottom: 1px solid var(--muted-line);
  background: var(--field);
  cursor: pointer;
}

.customerTypeGroup label:first-of-type {
  border-left: 1px solid var(--muted-line);
}

.customerTypeGroup label:last-of-type {
  border-right: 1px solid var(--muted-line);
}

.customerTypeGroup input {
  width: 12px;
  height: 12px;
}

.customerTypeGroup label span {
  color: var(--text);
  font-size: 12px;
}

#orderCustomerInput,
#invoiceCustomerInput {
  text-transform: uppercase;
}

.ordersSearch span,
.ordersStatusLine {
  color: var(--muted);
  font-size: 12px;
}

.ordersStatusLine {
  margin: 10px 0 8px;
  min-height: 18px;
}

.ordersTableWrap {
  overflow: auto;
  border: 2px solid var(--line);
  background: #d7d7d7;
  width: 100%;
}

.ordersTable,
.orderLinesTable {
  border-collapse: collapse;
  table-layout: auto;
}

.ordersTable {
  width: max-content;
  min-width: 0;
}

.invoicesTable {
  min-width: 0;
}

.orderLinesTable {
  width: max-content;
  min-width: 0;
  table-layout: auto;
}

.ordersTable th,
.ordersTable td,
.orderLinesTable th,
.orderLinesTable td {
  border: 1px solid var(--line);
  height: 27px;
  padding: 3px 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.orderLinesTable th,
.orderLinesTable td {
  max-width: none;
  overflow: visible;
  padding: 2px 4px;
  text-overflow: clip;
}

.ordersTable > thead th {
  background: #eeeeee;
  color: var(--navy);
  font-weight: 700;
  text-align: left;
}

.orderLinesTable th {
  background: #eeeeee;
  color: var(--danger);
  font-weight: 400;
  text-align: left;
}

.ordersTable th:nth-child(1),
.ordersTable td:nth-child(1) {
  width: 36px;
  text-align: center;
}

.ordersTable th:nth-child(2),
.ordersTable td:nth-child(2) {
  width: 86px;
}

.ordersTable th:nth-child(3),
.ordersTable td:nth-child(3),
.ordersTable th:nth-child(12),
.ordersTable td:nth-child(12) {
  width: 56px;
}

.ordersTable th:nth-child(4),
.ordersTable td:nth-child(4) {
  width: 84px;
}

.ordersTable th:nth-child(5),
.ordersTable td:nth-child(5) {
  width: 170px;
}

.ordersTable th:nth-child(6),
.ordersTable td:nth-child(6) {
  width: 120px;
}

.ordersTable th:nth-child(7),
.ordersTable td:nth-child(7),
.ordersTable th:nth-child(8),
.ordersTable td:nth-child(8) {
  width: 96px;
}

.ordersTable th:nth-child(9),
.ordersTable td:nth-child(9),
.ordersTable th:nth-child(10),
.ordersTable td:nth-child(10),
.ordersTable th:nth-child(11),
.ordersTable td:nth-child(11) {
  width: 82px;
  text-align: right;
}

.ordersTable.customerColumnsHidden > thead > tr > .customerColumn,
.ordersTable.customerColumnsHidden > tbody > .orderSummaryRow > .customerColumn,
.ordersTable.customerColumnsHidden > tfoot > tr > .customerColumn {
  display: none;
}

.invoicesTable th:nth-child(2),
.invoicesTable td:nth-child(2) {
  width: 88px;
}

.invoicesTable th:nth-child(5),
.invoicesTable td:nth-child(5),
.invoicesTable th:nth-child(6),
.invoicesTable td:nth-child(6),
.invoicesTable th:nth-child(7),
.invoicesTable td:nth-child(7) {
  width: 52px;
  text-align: center;
}

.invoicesTable th:nth-child(3),
.invoicesTable td:nth-child(3) {
  width: 84px;
}

.invoicesTable th:nth-child(4),
.invoicesTable td:nth-child(4) {
  width: 170px;
  text-align: left;
}

.invoicesTable th:nth-child(13),
.invoicesTable td:nth-child(13),
.invoicesTable th:nth-child(16),
.invoicesTable td:nth-child(16),
.invoicesTable th:nth-child(17),
.invoicesTable td:nth-child(17),
.invoicesTable th:nth-child(18),
.invoicesTable td:nth-child(18) {
  width: 62px;
}

.invoicesTable th:nth-child(8),
.invoicesTable td:nth-child(8),
.invoicesTable th:nth-child(12),
.invoicesTable td:nth-child(12) {
  width: 96px;
}

.invoicesTable th:nth-child(9),
.invoicesTable td:nth-child(9) {
  width: 82px;
}

.invoicesTable th:nth-child(10),
.invoicesTable td:nth-child(10),
.invoicesTable th:nth-child(11),
.invoicesTable td:nth-child(11),
.invoicesTable th:nth-child(14),
.invoicesTable td:nth-child(14) {
  width: 86px;
  text-align: right;
}

.invoicesTable th:nth-child(15),
.invoicesTable td:nth-child(15) {
  width: 110px;
}

.ordersTable tfoot td {
  background: #eeeeee;
  font-weight: 700;
}

.ordersTable tfoot td:nth-child(4),
.ordersTable tfoot td:nth-child(5),
.ordersTable tfoot td:nth-child(6),
.ordersTable tfoot td:nth-child(8) {
  text-align: right;
}

.invoicesTable tfoot td:nth-child(6),
.invoicesTable tfoot td:nth-child(7) {
  text-align: right;
}

.ordersTable th,
.ordersTable td {
  width: auto !important;
  max-width: none;
  overflow: visible;
  padding: 2px 4px;
  text-overflow: clip;
}

.ordersTable th:nth-child(12),
.ordersTable td:nth-child(12) {
  text-align: center;
}

.ordersTable th:nth-child(7),
.ordersTable td:nth-child(7),
.ordersTable th:nth-child(8),
.ordersTable td:nth-child(8),
.invoicesTable th:nth-child(8),
.invoicesTable td:nth-child(8),
.invoicesTable th:nth-child(12),
.invoicesTable td:nth-child(12),
.invoicesTable th:nth-child(13),
.invoicesTable td:nth-child(13) {
  text-align: right;
}

.invoicesTable th:nth-child(7),
.invoicesTable td:nth-child(7) {
  text-align: left;
}

.orderSummaryRow {
  cursor: pointer;
}

.orderSummaryRow.oddOrder td {
  background: #ffffff;
}

.orderSummaryRow.evenOrder td {
  background: #f5f5f5;
}

.orderSummaryRow:hover td {
  background: #f6fbff;
}

.negativeNumber {
  color: var(--danger);
}

.expandButton {
  width: 22px;
  min-height: 22px;
  line-height: 18px;
  padding: 0;
}

.orderDetailRow td {
  padding: 8px;
  background: #f7f8f9;
  white-space: normal;
}

.orderDetailBox {
  min-height: 34px;
  color: var(--muted);
  overflow-x: auto;
}

.holdIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #d70000;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 0 0 1px #9b0000;
}

.orderLinesTable th:nth-child(1),
.orderLinesTable td:nth-child(1) {
  width: 120px;
  text-align: left;
}

.orderLinesTable th:nth-child(2),
.orderLinesTable td:nth-child(2) {
  text-align: left;
}

.orderLinesTable th:nth-child(3),
.orderLinesTable td:nth-child(3),
.orderLinesTable th:nth-child(4),
.orderLinesTable td:nth-child(4) {
  width: 60px;
}

.orderLinesTable th:nth-child(5),
.orderLinesTable td:nth-child(5),
.orderLinesTable th:nth-child(6),
.orderLinesTable td:nth-child(6),
.orderLinesTable th:nth-child(7),
.orderLinesTable td:nth-child(7),
.orderLinesTable th:nth-child(8),
.orderLinesTable td:nth-child(8),
.orderLinesTable th:nth-child(9),
.orderLinesTable td:nth-child(9) {
  width: 74px;
  text-align: right;
}

.orderLinesTable th:nth-child(10),
.orderLinesTable td:nth-child(10) {
  width: 82px;
}

.orderLinesTable th,
.orderLinesTable td {
  width: auto;
}

.invoiceLinesTable th:nth-child(1),
.invoiceLinesTable td:nth-child(1) {
  width: 104px;
}

.invoiceLinesTable th:nth-child(2),
.invoiceLinesTable td:nth-child(2) {
  width: 260px;
}

.invoiceLinesTable th:nth-child(3),
.invoiceLinesTable td:nth-child(3) {
  width: 58px;
}

.invoiceLinesTable th:nth-child(4),
.invoiceLinesTable td:nth-child(4),
.invoiceLinesTable th:nth-child(5),
.invoiceLinesTable td:nth-child(5),
.invoiceLinesTable th:nth-child(7),
.invoiceLinesTable td:nth-child(7) {
  width: 66px;
  text-align: right;
}

.invoiceLinesTable th:nth-child(6),
.invoiceLinesTable td:nth-child(6) {
  width: 74px;
  text-align: right;
}

.invoiceLinesTable th:nth-child(8),
.invoiceLinesTable td:nth-child(8) {
  width: 78px;
  text-align: right;
}

.invoiceLinesTable th:nth-child(9),
.invoiceLinesTable td:nth-child(9) {
  width: 44px;
  text-align: center;
}

.invoiceLinesTable th,
.invoiceLinesTable td {
  width: auto !important;
}

.orderLinesTable th,
.orderLinesTable td {
  width: auto !important;
}

@media (max-width: 820px) {
  .shell {
    padding: 10px;
  }

  .topbar {
    align-items: start;
  }

  .topMenuButton {
    display: grid;
  }

  .topbarControls {
    align-items: stretch;
    flex-wrap: wrap;
    justify-content: end;
  }

  .tenantPicker select {
    min-width: 170px;
  }

  .appBody {
    grid-template-columns: 1fr;
  }

  .appNav {
    position: fixed;
    z-index: 20;
    top: 0;
    left: 0;
    width: min(288px, 82vw);
    min-height: 100vh;
    transform: translateX(-105%);
    transition: transform 160ms ease;
    box-shadow: 0 10px 24px rgb(0 0 0 / 24%);
  }

  .navOpen .appNav {
    transform: translateX(0);
  }

  .navBackdrop {
    position: fixed;
    inset: 0;
    z-index: 19;
    display: block;
    background: rgb(0 0 0 / 45%);
  }

  .workspace,
  .detailGrid {
    grid-template-columns: 1fr;
  }

  .searchPane {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .fields label,
  .twoCol label {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .fields label > span:first-child {
    text-align: left;
  }

  .twoCol {
    grid-template-columns: 1fr;
  }

  .detailPricingGrid,
  .filterGrid {
    grid-template-columns: 1fr;
  }

  .pricingFields {
    border-left: 0;
    border-top: 2px solid var(--line);
    padding: 4px 8px;
  }

  #stockImage,
  .pictureBox {
    width: 100%;
  }

  .ordersSearch {
    grid-template-columns: 1fr 1fr;
  }

  .ordersSearch button {
    grid-column: 1 / -1;
  }
}
