/* Operational layouts follow the owner's four assets/new references. */
.reference-workspace {
  --operations-accent: var(--blue);
  min-width: 0;
}
.reference-workspace .page-heading {
  margin-bottom: 18px;
}
.operations-tabs {
  display: flex;
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  border-bottom: 1px solid var(--line);
  margin: 0 0 18px;
  min-width: 0;
}
.operations-tabs a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 18px;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 650;
  border-bottom: 3px solid transparent;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.operations-tabs a .icon {
  width: 21px;
  height: 21px;
}
.operations-tabs a.active {
  border-bottom-color: var(--operations-accent);
  color: var(--operations-accent);
  background: var(--surface);
  border-radius: 8px 8px 0 0;
}
.operations-tabs a:hover {
  background: var(--raised);
}
.reference-workspace > .stats {
  margin-bottom: 18px;
}
.reference-workspace > .stats .stat {
  border-radius: 10px;
  box-shadow: none;
}
.operations-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
}
.operations-layout.with-inspector {
  grid-template-columns: minmax(0, 1fr) 320px;
}
.operations-records {
  min-width: 0;
  overflow: hidden;
  box-shadow: none;
}
.operations-filterbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}
.operations-filterbar .search-input {
  flex: 1 1 230px;
  min-width: 160px;
  width: auto;
  background: var(--raised);
}
.operations-filterbar select {
  min-width: 120px;
  max-width: 190px;
  width: auto;
  padding: 10px 28px 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background-color: var(--surface);
  font: inherit;
}
.operations-filterbar .button {
  min-height: 38px;
}
.operations-panel-heading {
  padding: 16px 18px 0;
}
.operations-panel-heading h2 {
  font-size: 16px;
  margin: 0;
}
.operations-panel-heading p {
  margin: 5px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.operations-symbol {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue);
}
.operations-symbol .icon {
  width: 32px;
  height: 32px;
}
.operations-symbol.orange {
  color: #d34109;
  background: #ffebe2;
}
.operations-symbol.red {
  color: #c6271f;
  background: #ffebe8;
}
.operations-symbol.amber {
  color: #986100;
  background: #fff3d8;
}
.operations-symbol.green {
  color: #247918;
  background: #e9f6e1;
}
.operations-symbol.violet {
  color: #7946c8;
  background: #f0eaff;
}
.operations-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.operations-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 650;
  padding: 4px 7px;
  line-height: 1.3;
  border-radius: 5px;
  color: var(--muted);
  background: var(--raised);
  white-space: nowrap;
}
.operations-tag.green {
  color: var(--green);
  background: var(--green-soft);
}
.operations-tag.blue {
  color: var(--blue);
  background: var(--blue-soft);
}
.operations-tag.orange {
  color: #a94306;
  background: #fff0dc;
}
.operations-tag.red {
  color: var(--red);
  background: var(--red-soft);
}
.operations-tag.violet {
  color: #6e43be;
  background: #f0eaff;
}
.operations-tag.amber {
  color: #805100;
  background: #fff3d8;
}
.menu-category-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
  padding: 12px;
}
.menu-category-column {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--raised) 42%, var(--surface));
  min-width: 0;
}
.menu-category-column > header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.menu-category-column > header > div {
  min-width: 0;
  flex: 1;
}
.menu-category-column h2 {
  font-size: 16px;
  line-height: 1.25;
  overflow-wrap: anywhere;
  margin: 0;
}
.menu-category-column header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.menu-category-column .operations-symbol {
  width: 42px;
  height: 42px;
}
.menu-category-column .operations-symbol .icon {
  width: 28px;
  height: 28px;
}
.menu-category-column header .icon-button {
  width: 24px;
  min-width: 24px;
  padding: 2px;
  border: 0;
  background: transparent;
}
.category-add {
  width: 100%;
  justify-content: center;
  margin-bottom: 10px;
  background: var(--surface);
}
.menu-column-items {
  display: grid;
  gap: 10px;
}
.menu-item-tile {
  position: relative;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--surface);
  min-width: 0;
}
.menu-item-tile.selected {
  border-color: var(--operations-accent);
}
.menu-item-select {
  width: 100%;
  border: 0;
  background: transparent;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 22px 10px 10px;
  text-align: left;
  color: var(--ink);
  border-radius: 10px;
  cursor: pointer;
  min-width: 0;
  font: inherit;
}
.menu-item-select > img,
.menu-image-placeholder {
  width: 62px;
  height: 74px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 7px;
  background: var(--raised);
}
.menu-image-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
}
.menu-image-placeholder .icon {
  width: 30px;
  height: 30px;
}
.menu-item-copy {
  display: block;
  flex: 1;
  min-width: 0;
}
.menu-item-copy > strong,
.menu-item-copy > small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.menu-item-copy > strong {
  font-size: 11px;
  line-height: 1.4;
}
.menu-item-copy > small {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
.menu-item-copy > b {
  display: block;
  font-size: 12px;
  margin-top: 5px;
}
.menu-item-tile .operations-tag {
  font-size: 9px;
  padding: 3px 5px;
}
.menu-item-more {
  position: absolute;
  top: 8px;
  right: 0;
  width: 20px;
  min-width: 20px;
  padding: 0;
  border: 0;
  background: transparent;
}
.menu-item-more .icon {
  width: 16px;
}
.operations-inspector.inspector {
  position: sticky;
  top: 16px;
  width: auto;
  max-height: calc(100dvh - 140px);
  overflow-y: auto;
  min-width: 0;
  padding: 16px;
}
.operations-inspector .operations-editor-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
}
.operations-editor-heading h2 {
  font-size: 17px;
  line-height: 1.35;
  margin: 0;
  flex: 1;
  overflow-wrap: anywhere;
}
.operations-editor-heading .operations-symbol {
  width: 38px;
  height: 38px;
}
.operations-editor-heading .operations-symbol .icon {
  width: 25px;
  height: 25px;
}
.operations-editor-heading .icon-button {
  width: 28px;
  min-width: 28px;
  padding: 4px;
}
.operations-inspector .form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
.operations-inspector .field {
  margin: 0;
  min-width: 0;
}
.operations-inspector input:not([type='checkbox']):not([type='file']),
.operations-inspector select,
.operations-inspector textarea {
  min-width: 0;
  width: 100%;
  font-size: 12px;
}
.operations-inspector .switch-field {
  border: 0;
  padding: 8px 0;
  box-shadow: none;
  min-height: 0;
  background: transparent;
}
.operations-inspector .switch-field > span {
  font-size: 12px;
}
.operations-inspector .image-upload-field {
  padding: 0;
  border: 0;
}
.operations-inspector .image-upload-preview {
  height: 160px;
}
.operations-inspector .image-upload-preview img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.operations-inspector [type='submit'] {
  margin-top: 16px;
}
.operations-inspector .row-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.operations-inspector .choice-grid {
  grid-template-columns: 1fr;
  max-height: 210px;
  overflow: auto;
}
.operations-editor-tabs {
  display: flex;
  gap: 8px;
  margin: 0 -4px 18px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.operations-editor-tabs button {
  flex: 0 0 auto;
  font: inherit;
  font-size: 11px;
  padding: 10px 3px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.operations-editor-tabs [aria-selected='true'] {
  border-bottom-color: var(--blue);
  color: var(--blue);
}
.station-display-settings {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 16px;
}
.station-display-settings h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin: 0 0 14px;
}
.station-display-settings > .button {
  margin-top: 10px;
}
.station-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
}
.station-card {
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 13px;
  min-width: 0;
}
.station-card.selected {
  border-color: var(--blue);
}
.station-card-top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.station-card-top .operations-tag {
  margin-left: auto;
}
.station-card-top .icon-button {
  width: 28px;
  min-width: 28px;
  padding: 4px;
}
.station-card-name {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 0 14px;
  color: var(--ink);
  background: transparent;
  border: 0;
  cursor: pointer;
}
.station-card-name h2 {
  font-size: 17px;
  margin: 0 0 6px;
  overflow-wrap: anywhere;
}
.station-card-name > span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}
.station-card-name .icon {
  width: 15px;
  height: 15px;
}
.station-card-fact {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 13px 0;
  font-size: 10px;
}
.station-card-fact > strong {
  margin-left: auto;
  font-weight: 500;
  text-align: right;
  color: var(--muted);
}
.station-card-fact > .icon {
  width: 18px;
  flex: 0 0 auto;
}
.station-routed {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 12px 0;
  gap: 8px;
  border: 0;
  border-block: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.station-routed > .icon:last-child {
  width: 13px;
  margin-left: auto;
}
.station-timers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 15px;
}
.station-timers > div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.station-timers > div + div {
  border-left: 1px solid var(--line);
  padding-left: 10px;
}
.station-timers > div:first-child > .icon {
  color: var(--orange);
}
.station-timers > div:last-child > .icon {
  color: #9b6500;
}
.station-timers strong {
  display: block;
  font-size: 12px;
}
.station-timers small {
  display: block;
  font-size: 9px;
  margin-top: 3px;
  color: var(--muted);
}
.station-activity {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.station-activity small {
  width: 100%;
  color: var(--muted);
}
.routed-product {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.operations-table-scroll table {
  min-width: 790px;
}
.operations-table-scroll th {
  background: var(--raised);
  color: var(--muted);
  padding: 13px 14px;
  font-size: 11px;
}
.operations-table-scroll td {
  padding: 10px 14px;
  font-size: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.operations-table-scroll tr:last-child td {
  border-bottom: 0;
}
.operations-table-scroll td.numeric {
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.operations-table-scroll .stock-zero {
  color: var(--red);
}
.stock-ledger input[type='checkbox'],
.routing-choice {
  appearance: auto;
  accent-color: var(--blue);
  width: 16px;
  height: 16px;
  cursor: pointer;
  vertical-align: middle;
}
.stock-health {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  font-size: 10px;
}
.health-track {
  width: 90px;
  flex: 0 0 auto;
  height: 7px;
  border-radius: 5px;
  overflow: hidden;
  background: var(--line);
}
.health-track > span {
  display: block;
  height: 100%;
  border-radius: 5px;
  background: var(--green);
}
.stock-health.green {
  color: var(--green);
}
.stock-health.amber {
  color: #966000;
}
.stock-health.amber .health-track > span {
  background: #e69500;
}
.stock-health.red {
  color: var(--red);
}
.stock-health.red .health-track > span {
  background: var(--red);
}
.stock-selection {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.routing-matrix {
  min-width: 720px;
}
.routing-matrix td:not(:first-child):not(:nth-child(2)),
.routing-matrix th:not(:first-child):not(:nth-child(2)) {
  text-align: center;
}
.routing-station-head {
  display: grid;
  justify-items: center;
  gap: 6px;
  max-width: 100px;
  margin: auto;
  white-space: normal;
}
.routing-station-head > .icon {
  width: 24px;
  height: 24px;
  color: var(--ink);
}
.matrix-product {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 170px;
}
.matrix-product img {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 7px;
}
.matrix-product > .icon {
  width: 30px;
  height: 30px;
  color: var(--muted);
}
.matrix-product strong {
  max-width: 220px;
  font-size: 11px;
  font-weight: 500;
  white-space: normal;
}
.routing-sidebar {
  min-width: 0;
  display: grid;
  gap: 14px;
}
.station-health {
  padding: 14px;
}
.station-health > header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}
.station-health h2 {
  font-size: 16px;
  margin: 0;
}
.station-health a {
  font-size: 11px;
  color: var(--blue);
}
.station-health article {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-top: 10px;
}
.station-health h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  margin: 0 0 10px;
}
.station-health h3 .operations-tag {
  margin-left: auto;
}
.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
  flex: 0 0 auto;
}
.status-dot.green {
  background: var(--green);
}
.station-health dl {
  margin: 0;
}
.station-health dl > div {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  font-size: 11px;
}
.station-health dt {
  color: var(--muted);
}
.station-health dd {
  font-weight: 700;
}
.station-health-track {
  height: 6px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--line);
}
.station-health-track > span {
  display: block;
  height: 100%;
  background: var(--blue);
}
.routing-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 0 16px 14px;
}
.routing-note p {
  flex: 1 1 200px;
  font-size: 11px;
  color: var(--muted);
}
.operations-empty {
  padding: 36px;
  text-align: center;
  color: var(--muted);
  grid-column: 1/-1;
}
.operations-empty h3 {
  color: var(--ink);
}
html[data-theme='dark'] .operations-symbol.orange,
html[data-theme='dark'] .operations-tag.orange {
  background: #402b20;
  color: #ffb18a;
}
html[data-theme='dark'] .operations-symbol.red {
  background: var(--red-soft);
  color: var(--red);
}
html[data-theme='dark'] .operations-symbol.amber,
html[data-theme='dark'] .operations-tag.amber {
  background: #3c3015;
  color: #f4ca75;
}
html[data-theme='dark'] .operations-symbol.green {
  background: var(--green-soft);
  color: var(--green);
}
html[data-theme='dark'] .operations-symbol.violet,
html[data-theme='dark'] .operations-tag.violet {
  background: #302448;
  color: #d4b7ff;
}
html[data-theme='dark'] .stock-health.amber,
html[data-theme='dark'] .station-timers > div:last-child > .icon {
  color: #f4ca75;
}
@media (min-width: 1700px) {
  .operations-layout.with-inspector {
    grid-template-columns: minmax(0, 1fr) 360px;
  }
  .menu-item-select > img,
  .menu-image-placeholder {
    width: 76px;
    height: 86px;
  }
  .menu-item-copy > strong {
    font-size: 12px;
  }
}
@media (max-width: 1250px) {
  .operations-layout.with-inspector {
    grid-template-columns: minmax(0, 1fr) 295px;
  }
  .station-card-grid,
  .menu-category-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .station-card {
    padding: 12px;
  }
}
@media (max-width: 1000px) {
  .operations-layout.with-inspector {
    grid-template-columns: minmax(0, 1fr);
  }
  .operations-inspector.inspector {
    position: static;
    max-height: none;
    display: block;
  }
  .station-card-grid,
  .menu-category-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .routing-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .station-card-grid,
  .menu-category-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .operations-filterbar .search-input {
    flex-basis: 100%;
  }
  .operations-tabs a {
    padding: 12px;
    font-size: 12px;
  }
  .operations-inspector.inspector {
    position: static;
    inset: auto;
    width: auto;
    box-shadow: none;
  }
  .routing-sidebar {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .station-card-grid,
  .menu-category-columns {
    grid-template-columns: minmax(0, 1fr);
  }
  .menu-item-select > img,
  .menu-image-placeholder {
    width: 76px;
    height: 82px;
  }
  .menu-item-copy > strong {
    font-size: 13px;
  }
  .operations-filterbar select {
    flex: 1;
    min-width: 110px;
    max-width: none;
  }
  .operations-records .record-grid {
    padding: 12px;
  }
  .reference-workspace .heading-actions .button {
    padding-inline: 10px;
  }
}
@media print {
  .operations-tabs,
  .operations-filterbar,
  .stock-selection,
  .routing-note button {
    display: none;
  }
  .operations-layout.with-inspector {
    display: block;
  }
  .operations-inspector {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

.station-board-panel {
  background: transparent;
  border: 0;
  overflow: visible;
}
.station-board-panel > .operations-filterbar {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  margin-bottom: 14px;
}
.station-board-panel .station-card-grid {
  padding: 0;
}
.operations-inspector .switch-control input:checked + .switch-track {
  background: var(--green);
  border-color: var(--green);
}
.operation-cancel {
  margin-top: 8px;
}

#main:has(> .reference-workspace) {
  background: color-mix(in srgb, var(--raised) 40%, var(--surface));
}
.operations-inspector .switch-field:has(input:checked),
.operations-inspector .switch-field:has(input:not(:checked)) {
  background: transparent;
  border: 0;
  border-radius: 0;
  min-height: 42px;
  padding: 5px 0;
}
.operations-inspector .switch-control {
  gap: 8px;
}
.operation-advanced {
  grid-column: 1/-1;
  border-top: 1px solid var(--line);
  padding: 10px 0 0;
}
.operation-advanced > summary {
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  margin-bottom: 10px;
}
.operation-advanced[open] > .field,
.operation-advanced[open] > fieldset {
  margin-top: 12px;
}
.display-timer-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.operation-variant-editor {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.operation-variant-editor h3 {
  font-size: 14px;
  margin: 0 0 12px;
}
.operation-variant-editor form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
  margin: 8px 0;
}
.operation-variant-editor .field {
  flex: 1;
}
.operation-variant-editor .form-error {
  flex-basis: 100%;
  margin: 0;
}
.operation-variant-editor [type='submit'] {
  margin-top: 0;
}

.operations-inspector .image-upload-actions {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
}
.operations-inspector .image-upload-actions .button {
  flex: 1 1 100%;
  min-width: 0;
}
.operations-inspector .image-url {
  flex: 1 1 100%;
  min-width: 0;
  width: 100%;
}
.operation-image-link {
  flex-basis: 100%;
  min-width: 0;
  margin-top: 6px;
}
.operation-image-link summary {
  cursor: pointer;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}

.reference-workspace input.routing-choice,
.reference-workspace .stock-ledger input[type='checkbox'] {
  accent-color: var(--blue);
}

/* Orders keep the list and selected order visible together, like Menu Studio. */
.orders-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: 16px;
  align-items: start;
  min-width: 0;
}
.reference-orders .operations-records {
  min-width: 0;
}
.reference-orders .operations-records tbody tr {
  cursor: pointer;
}
.reference-orders .operations-records tbody tr:hover {
  background: var(--raised);
}
.reference-orders .operations-records tr.selected {
  background: var(--blue-soft);
}
.order-number-link {
  font-weight: 700;
  white-space: nowrap;
  color: var(--blue);
}
.order-inspector.inspector {
  max-height: calc(100dvh - 110px);
  scrollbar-gutter: stable;
}
.order-panel-heading > div {
  flex: 1;
  min-width: 0;
}
.order-panel-heading > div > span {
  color: var(--muted);
  font-size: 11px;
}
.order-panel-status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.order-panel-metadata,
.order-panel-summary {
  margin: 0;
  font-size: 12px;
}
.order-panel-metadata > div,
.order-panel-summary > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding: 5px 0;
}
.order-panel-metadata dt,
.order-panel-summary dt {
  color: var(--muted);
  flex-shrink: 0;
}
.order-panel-metadata dd,
.order-panel-summary dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
  min-width: 0;
}
.order-panel-summary dd {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}
.order-panel-items {
  border-block: 1px solid var(--line);
  padding-block: 16px 4px;
  margin-block: 16px;
}
.order-panel-items h3,
.order-panel-actions h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin: 0 0 12px;
}
.order-panel-items h3 > span {
  background: var(--raised);
  color: var(--muted);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 10px;
}
.order-panel-item {
  padding: 0 0 12px;
  margin-bottom: 12px;
  border-bottom: 1px dashed var(--line);
}
.order-panel-item:last-child {
  border: 0;
  margin: 0;
}
.order-item-main {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 12px;
}
.order-item-main > div {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.order-item-main strong {
  display: block;
  line-height: 1.5;
}
.order-item-main small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
.order-item-quantity {
  color: var(--muted);
  font-weight: 650;
}
.order-item-main > b {
  max-width: 42%;
  text-align: right;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.order-item-addon {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0 0 25px;
  font-size: 11px;
}
.order-item-addon > span {
  overflow-wrap: anywhere;
  min-width: 0;
}
.order-item-addon small {
  color: var(--muted);
}
.order-item-addon b {
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.order-item-notes {
  display: flex;
  gap: 5px;
  color: var(--muted);
  margin: 6px 0 0 25px;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.order-item-notes .icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}
.order-panel-summary .order-panel-total {
  border-block: 1px solid var(--line);
  padding: 12px 0;
  margin: 8px 0;
  font-size: 18px;
  font-weight: 750;
}
.order-panel-total dt {
  color: var(--ink);
}
.order-panel-notes {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.order-panel-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding-top: 16px;
}
.order-panel-actions h3,
.order-panel-actions > p {
  grid-column: 1/-1;
}
.order-panel-actions h3 {
  margin-bottom: 4px;
}
.order-panel-actions .button {
  justify-content: center;
  font-size: 11px;
  white-space: normal;
  text-align: center;
  padding: 10px 8px;
  min-width: 0;
}
.order-panel-more {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 14px;
}
.order-panel-more > summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}
.order-panel-more .info-grid {
  grid-template-columns: minmax(0, 1fr);
}
@media (max-width: 1200px) {
  .orders-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}
@media (max-width: 1100px) {
  .orders-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .order-inspector.inspector {
    position: static;
    inset: auto;
    width: auto;
    max-height: none;
  }
}
@media (max-width: 480px) {
  .order-panel-metadata > div {
    flex-wrap: wrap;
    gap: 3px 12px;
  }
  .order-panel-metadata dd {
    margin-left: auto;
  }
}

/* Online orders: keep contact information contained and reserve real column space. */
.online-orders-table {
  table-layout: fixed;
  min-width: 760px;
  width: 100%;
}
.online-orders-table col {
  width: auto;
}
.online-orders-table col[data-field='orderNumber'] {
  width: 8%;
}
.online-orders-table col[data-field='contact'] {
  width: 24%;
}
.online-orders-table col[data-field='receivedAt'] {
  width: 15%;
}
.online-orders-table col[data-field='details'] {
  width: 72px;
}
.page-surface .online-orders-table :is(th, td) {
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
  padding: 16px;
}
.online-orders-table td[data-field='contact'] {
  border-right: 1px solid var(--line);
}
.online-orders-table .column-sort {
  text-align: left;
  white-space: normal;
  align-items: start;
}
.online-orders-table .badge {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.45;
}
.order-contact {
  display: grid;
  gap: 7px;
  margin: 0;
  min-width: 0;
}
.order-contact > div {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}
.order-contact dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}
.order-contact dd {
  margin: 0;
  min-width: 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}
.order-contact > div:first-child dd {
  font-weight: 600;
}
.order-channel {
  display: flex;
  align-items: start;
  gap: 8px;
  min-width: 0;
}
.order-channel .icon {
  width: 17px;
  height: 17px;
  flex: none;
  margin-top: 2px;
}
.order-channel > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.order-table-time {
  display: grid;
  gap: 5px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.order-table-time small {
  color: var(--muted);
  font-size: 11px;
}
@media print {
  .online-orders-table {
    min-width: 0;
    table-layout: auto;
  }
}
/* Give the online ledger the whole workspace; module filters remain in a single tab row. */
.reference-online-orders .page-frame-rail {
  display: block;
}
.reference-online-orders .page-navigation-rail .page-navigation-links {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}
.reference-online-orders .page-navigation-rail .tab {
  flex: none;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .reference-online-orders .page-navigation-rail .page-navigation-links {
    display: none;
  }
}
.reference-online-orders .page-navigation-overflow {
  display: none;
}
@media (max-width: 900px) {
  .reference-online-orders .page-navigation-overflow {
    display: block;
  }
}

/* Order details open above a full-width ledger; no reserved inspector column. */
.reference-orders .orders-layout {
  grid-template-columns: minmax(0, 1fr);
}
.reference-orders .operations-records {
  overflow: visible;
}
.order-column-picker {
  position: relative;
  margin-left: auto;
}
.order-column-picker > summary {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
}
.order-column-picker > fieldset {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 10;
  width: min(280px, 80vw);
  max-height: 65dvh;
  overflow: auto;
  padding: 16px;
  margin: 8px 0 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 12px 28px rgb(0 0 0 / 12%);
}
.order-column-picker label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 14px;
}
.order-column-picker input {
  width: 18px;
  height: 18px;
}
.reference-orders .online-orders-table :is(th, td) {
  padding: 12px;
}

.reference-orders .operations-records table {
  width: 100%;
  min-width: 760px;
  table-layout: fixed;
}
.reference-orders .operations-records :is(th, td) {
  padding: 12px;
  overflow-wrap: anywhere;
}
.reference-orders .operations-records .badge {
  max-width: 100%;
  white-space: normal;
}
