.om-workspace {
  max-width: 76rem;
  min-width: 0;
}
.om-switch, .om-actions, .om-pager, .om-status-line, .om-row-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .65rem;
}
.om-switch { margin: 1rem 0; }
.om-switch [aria-pressed="true"] { background: var(--ink); color: var(--paper); }
#portal .om-filters {
  display: grid;
  grid-template-columns: minmax(12rem, 2fr) minmax(9rem, 1fr) minmax(9rem, 1fr) auto;
  align-items: end;
  gap: .8rem;
  max-width: none;
  margin: 1.3rem 0;
}
.om-workspace label { display: block; font-size: .9rem; font-weight: 600; }
.om-workspace input, .om-workspace select, .om-workspace textarea { font-weight: normal; }
.om-workspace textarea { resize: vertical; }
.om-order-list, .om-events { list-style: none; margin: 0; padding: 0; }
.om-order-row {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) minmax(15rem, auto) auto;
  gap: 1rem;
  align-items: center;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
}
.om-order-list > :last-child { border-bottom: 1px solid var(--line); }
.om-order-row > div:first-child > * { display: block; overflow-wrap: anywhere; }
.om-row-summary { justify-content: flex-end; gap: .7rem 1rem; font-variant-numeric: tabular-nums; }
.om-order-link { font-weight: 700; text-decoration: underline; text-underline-offset: .15em; }
.om-badge {
  display: inline-block;
  border: 1px solid #afbbc9;
  border-radius: 99px;
  padding: .14rem .65rem;
  color: var(--ink);
  background: var(--slate-soft);
  font-size: .88rem;
  font-weight: 650;
}
.om-badge.om-pending { background: #f7ebd6; border-color: #cfb989; }
.om-badge.om-cancelled { background: #f6e8e3; border-color: #d7b2a5; }
.om-status-line { margin: 1rem 0; }
.om-actions, .om-pager { margin: 1rem 0 1.5rem; }
.om-section { border-top: 1px solid var(--line); margin: 1.8rem 0; padding-top: 1.3rem; }
.om-section h2 { font-size: clamp(1.5rem, 2.4vw, 2.1rem); letter-spacing: -.045em; margin-bottom: 1rem; }
.om-addresses { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; }
.om-addresses h3, .om-section h3 { font-size: 1rem; margin-bottom: .3rem; letter-spacing: 0; }
.om-addresses p, .om-text, .om-events p { white-space: pre-line; overflow-wrap: anywhere; }
.om-table-scroll { overflow-x: auto; }
.om-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.om-table th, .om-table td { padding: .65rem .5rem; text-align: right; border-bottom: 1px solid var(--line); }
.om-table th { color: var(--muted); font-size: .86rem; white-space: nowrap; }
.om-table th:first-child, .om-table td:first-child { text-align: left; padding-left: 0; }
.om-table td:not(:first-child) { white-space: nowrap; }
.om-product { display: flex; align-items: center; gap: .8rem; }
.om-product img { object-fit: contain; flex: 0 0 auto; }
.om-product small { display: block; color: var(--muted); overflow-wrap: anywhere; }
.om-totals { max-width: 22rem; margin: 1rem 0 1rem auto; font-variant-numeric: tabular-nums; }
.om-totals > div { display: flex; justify-content: space-between; gap: 1rem; }
.om-totals dd { margin: 0; }
.om-grand { border-top: 1px solid var(--line); padding-top: .45rem; margin-top: .45rem; font-weight: 700; }
.om-edit-row { display: grid; grid-template-columns: minmax(10rem,2fr) minmax(5rem,.65fr) minmax(7rem,.8fr) auto; gap: .9rem; align-items: end; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.om-edit-row > div:first-child { overflow-wrap: anywhere; align-self: center; }
.om-picker { display: flex; align-items: end; gap: .8rem; margin: 1rem 0; }
.om-picker label { flex: 1; min-width: 0; }
.om-workspace .fields { gap: .8rem 1rem; margin: .9rem 0; }
.om-edit-total { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.om-events > li { margin-bottom: .7rem; padding: 0 0 .7rem 1rem; border-left: 2px solid var(--line); }
.om-events .note { display: block; }
@media (max-width: 760px) {
  #portal .om-filters { grid-template-columns: 1fr 1fr; }
  .om-order-row { grid-template-columns: 1fr auto; }
  .om-row-summary { grid-row: 2; grid-column: 1 / -1; justify-content: start; }
  .om-order-row > .outline { grid-column: 2; grid-row: 1; }
}
@media (max-width: 540px) {
  #portal .om-filters { grid-template-columns: 1fr 1fr; }
  .om-filters > label:first-child, .om-filters > button { grid-column: 1 / -1; }
  .om-addresses { grid-template-columns: 1fr; }
  .om-edit-row { grid-template-columns: 1fr 1fr; }
  .om-edit-row > div:first-child { grid-column: 1 / -1; }
  .om-edit-row > button { justify-self: start; }
  .om-picker { display: grid; grid-template-columns: 1fr; }
  .om-product img { width: 34px; height: 44px; }
  .om-product { gap: .35rem; }
  .om-table td, .om-table th { padding: .55rem .25rem; font-size: .88rem; }
}
