.ops-dashboard {
  display: grid;
  gap: 20px;
}

.ops-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

.ops-dashboard__hero {
  display: grid;
  min-height: 236px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr);
  align-items: stretch;
  gap: clamp(28px, 5vw, 72px);
  overflow: hidden;
  border: 1px solid var(--ink);
  border-left: 7px solid var(--brand-mint);
  border-radius: 22px;
  background: var(--ink);
  box-shadow: 0 16px 42px rgba(16, 36, 26, 0.16);
  color: var(--surface);
  padding: clamp(26px, 4vw, 44px);
}

.ops-dashboard__intro {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
}

.ops-dashboard__eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  color: var(--brand-mint);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ops-dashboard__eyebrow .ops-icon {
  width: 17px;
  height: 17px;
}

.ops-dashboard__hero h2 {
  max-width: 720px;
  margin: 0;
  color: var(--surface);
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 760;
  letter-spacing: -0.055em;
  line-height: 1.02;
}

.ops-dashboard__summary {
  max-width: 680px;
  margin: 15px 0 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
  line-height: 1.6;
}

.ops-dashboard__date {
  display: flex;
  width: fit-content;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 14px;
  color: var(--surface);
  font-size: 12px;
  font-weight: 750;
}

.ops-dashboard__date .ops-icon {
  width: 16px;
  height: 16px;
  color: var(--brand-mint);
}

.ops-dashboard__date small {
  color: rgba(255, 255, 255, 0.56);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ops-queue {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  align-self: center;
  gap: 15px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 17px;
  background: var(--surface);
  color: var(--ink);
  padding: 20px;
}

.ops-queue__icon,
.ops-metric__icon,
.ops-order__icon,
.ops-timeline__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--brand-strong);
}

.ops-queue__icon {
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  /* A disc in the brand's terracotta, as the storefront draws its category marks. */
  border-radius: 50%;
  background: var(--brand-accent);
  color: #ffffff;
}

.ops-queue__copy {
  display: grid;
  min-width: 0;
}

.ops-queue__copy small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ops-queue__copy strong {
  margin: 2px 0 -2px;
  font-size: clamp(31px, 4vw, 45px);
  letter-spacing: -0.06em;
  line-height: 1;
}

.ops-queue__copy > span {
  color: var(--brand);
  font-size: 11px;
  font-weight: 750;
}

.ops-queue__action,
.ops-panel__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
}

.ops-queue__action {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--brand-strong);
  color: var(--surface);
  transition: background 150ms ease, transform 150ms ease;
}

.ops-queue__action:hover {
  background: var(--brand);
  transform: translateX(2px);
}

.ops-metrics {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(290px, 1.35fr) minmax(0, 0.85fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 8px 26px rgba(49, 93, 59, 0.07);
}

.ops-dashboard .ops-metric.stat-card {
  display: grid;
  min-width: 0;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  overflow: visible;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 23px;
}

.ops-dashboard .ops-metric.stat-card:last-child {
  border-right: 0;
}

.ops-dashboard .ops-metric.stat-card::after {
  display: none;
  content: none;
}

.ops-metric__icon {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  /* A disc in the brand's terracotta, as the storefront draws its category marks. */
  border-radius: 50%;
  background: var(--brand-accent);
  color: #ffffff;
}

.ops-metric--revenue .ops-metric__icon {
  border-color: var(--brand);
  background: var(--brand);
  color: #ffffff;
}

.ops-metric__copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.ops-dashboard .ops-metric.stat-card small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.ops-dashboard .ops-metric.stat-card > .ops-metric__copy > strong {
  display: block;
  min-width: 0;
  margin: 2px 0 0;
  color: var(--ink);
  font-size: clamp(24px, 2.3vw, 33px);
  font-weight: 790;
  letter-spacing: -0.045em;
  line-height: 1.12;
}

.ops-dashboard .ops-metric.stat-card span {
  margin: 0;
}

.ops-dashboard .ops-metric.stat-card .ops-metric__copy > span:last-child {
  color: var(--brand);
  font-size: 11px;
  font-weight: 750;
}

.ops-dashboard .ops-metric__money {
  display: inline;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.ops-dashboard .ops-metric__money-list.stat-money-list {
  display: grid;
  min-width: 0;
  gap: 2px;
  color: var(--ink);
  font-size: 18px;
}

.ops-dashboard .ops-metric__money-list.stat-money-list > span {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 7px;
  color: var(--ink);
  font-size: inherit;
}

.ops-dashboard .ops-metric__money-list.stat-money-list strong {
  display: inline;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-dashboard .ops-metric__currency.stat-money-currency {
  min-width: 3ch;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.06em;
}

.ops-dashboard__workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.38fr);
  align-items: start;
  gap: 20px;
}

.ops-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 9px 30px rgba(49, 93, 59, 0.07);
}

.ops-panel__header {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  padding: 18px 21px;
}

.ops-panel__header > div {
  min-width: 0;
}

.ops-panel__kicker {
  margin: 0 0 4px;
  color: var(--brand);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.ops-panel__header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 19px;
  letter-spacing: -0.025em;
}

.ops-panel__action {
  min-height: 40px;
  flex: 0 0 auto;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--brand-strong);
  padding: 0 13px;
  font-size: 11px;
  font-weight: 800;
  transition: border-color 150ms ease, background 150ms ease;
}

.ops-panel__action .ops-icon {
  width: 16px;
  height: 16px;
}

.ops-panel__action:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.ops-panel__body {
  padding: 21px;
}

.ops-order-list {
  width: 100%;
}

.ops-order-list__labels,
.ops-order {
  display: grid;
  grid-template-columns: minmax(150px, 1.3fr) minmax(90px, 0.78fr) minmax(96px, 0.78fr) minmax(112px, 0.85fr) minmax(118px, 0.95fr);
  gap: 10px;
  align-items: center;
}

.ops-order-list__labels {
  min-height: 38px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  padding: 0 19px;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.ops-order-list__body {
  padding: 0 19px;
}

.ops-order {
  min-height: 82px;
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
  transition: background 140ms ease;
}

.ops-order:last-child {
  border-bottom: 0;
}

.ops-order:hover {
  background: var(--surface-raised);
}

.ops-order__identity {
  display: grid;
  min-width: 0;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
}

.ops-order__identity > span:last-child,
.ops-order__field {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.ops-order__icon {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--brand-soft);
}

.ops-order__icon .ops-icon {
  width: 17px;
  height: 17px;
}

.ops-order__identity strong,
.ops-order__field strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 790;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-order__identity small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-order__field > small {
  display: none;
}

.ops-order__field > span:not(.status-pill) {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.ops-order__field .ops-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: var(--muted);
}

.ops-order__total > strong {
  color: var(--brand-strong);
  font-size: 12px;
}

.ops-order__status .status-pill {
  width: fit-content;
}

.ops-order__time time {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.35;
}

.ops-timeline {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ops-timeline__item {
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  padding: 0 0 20px;
}

.ops-timeline__item:last-child {
  padding-bottom: 0;
}

.ops-timeline__item:not(:last-child)::after {
  position: absolute;
  top: 40px;
  bottom: 0;
  left: 19px;
  width: 1px;
  background: var(--line);
  content: "";
}

.ops-timeline__icon {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-soft);
}

.ops-timeline__icon .ops-icon {
  width: 17px;
  height: 17px;
}

.ops-timeline__copy {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 3px;
  padding-top: 2px;
}

.ops-timeline__copy strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
}

.ops-timeline__copy small {
  overflow: hidden;
  color: var(--brand);
  font-size: 10px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-timeline__copy time {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.ops-activity-empty {
  display: grid;
  min-height: 210px;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--muted);
  text-align: center;
}

.ops-activity-empty .ops-icon {
  width: 28px;
  height: 28px;
  color: var(--brand);
}

.ops-activity-empty p {
  max-width: 250px;
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

.ops-dashboard .empty-state {
  min-height: 300px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

@media (max-width: 1220px) {
  .ops-dashboard__workspace {
    grid-template-columns: 1fr;
  }

  .ops-panel--activity .ops-timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
  }

  .ops-panel--activity .ops-timeline__item::after {
    display: none;
  }
}

@media (max-width: 1040px) {
  .ops-dashboard__hero {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.55fr);
    gap: 28px;
  }

  .ops-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ops-dashboard .ops-metric.stat-card {
    border-bottom: 1px solid var(--line);
  }

  .ops-dashboard .ops-metric.stat-card:nth-child(2) {
    border-right: 0;
  }

  .ops-dashboard .ops-metric.stat-card:last-child {
    grid-column: 1 / -1;
    border-bottom: 0;
  }

  .ops-order-list__labels,
  .ops-order {
    grid-template-columns: minmax(170px, 1.25fr) minmax(105px, 0.8fr) minmax(110px, 0.75fr) minmax(125px, 0.8fr);
  }

  .ops-order-list__labels > span:last-child,
  .ops-order__time {
    display: none;
  }
}

@media (max-width: 760px) {
  .ops-dashboard__hero {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 25px;
    border-left-width: 5px;
    border-radius: 18px;
    padding: 25px;
  }

  .ops-dashboard__hero h2 {
    font-size: clamp(29px, 9vw, 40px);
  }

  .ops-queue {
    width: 100%;
  }

  .ops-order-list__labels {
    display: none;
  }

  .ops-order-list__body {
    display: grid;
    gap: 12px;
    background: var(--surface-soft);
    padding: 13px;
  }

  .ops-order {
    min-height: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    padding: 15px;
  }

  .ops-order__identity {
    grid-column: 1 / -1;
    border-bottom: 1px solid var(--line);
    padding-bottom: 13px;
  }

  .ops-order__field > small {
    display: block;
    color: var(--muted);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .ops-order__time {
    display: grid;
    grid-column: 1 / -1;
  }

  .ops-panel--activity .ops-timeline {
    grid-template-columns: 1fr;
  }

  .ops-panel--activity .ops-timeline__item:not(:last-child)::after {
    display: block;
  }
}

@media (max-width: 620px) {
  .ops-dashboard {
    gap: 14px;
  }

  .ops-dashboard__date {
    align-items: flex-start;
  }

  .ops-dashboard__date small {
    width: 100%;
    padding-left: 24px;
  }

  .ops-metrics {
    grid-template-columns: 1fr;
    border-radius: 15px;
  }

  .ops-dashboard .ops-metric.stat-card,
  .ops-dashboard .ops-metric.stat-card:nth-child(2),
  .ops-dashboard .ops-metric.stat-card:last-child {
    grid-column: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 19px;
  }

  .ops-dashboard .ops-metric.stat-card:last-child {
    border-bottom: 0;
  }

  .ops-panel {
    border-radius: 15px;
  }

  .ops-panel__header {
    min-height: 74px;
    padding: 16px;
  }

  .ops-panel__action span {
    display: none;
  }

  .ops-panel__action {
    width: 42px;
    padding: 0;
  }

  .ops-panel__body {
    padding: 17px;
  }
}

@media (max-width: 390px) {
  .ops-dashboard__hero {
    padding: 21px 18px;
  }

  .ops-queue {
    grid-template-columns: 42px minmax(0, 1fr) 44px;
    gap: 11px;
    padding: 15px;
  }

  .ops-queue__icon {
    width: 42px;
    height: 42px;
  }

  /* Narrower is fine for the decoration beside the text; it is not fine for the button. A
     thumb needs 44 whatever the screen is, so this is the one thing the phone layout does
     not shrink. */
  .ops-queue__action {
    width: 44px;
    height: 44px;
  }

  .ops-order {
    grid-template-columns: 1fr;
  }

  .ops-order__identity,
  .ops-order__time {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ops-queue__action,
  .ops-order {
    transition: none;
  }
}

@media (prefers-contrast: more), (forced-colors: active) {
  .ops-dashboard__hero,
  .ops-queue,
  .ops-metrics,
  .ops-panel,
  .ops-order,
  .ops-queue__action,
  .ops-panel__action {
    border: 2px solid currentColor;
  }
}

/* Loaded after app.css, so the panel-wide 44px floor for phones has to be restated where it
   can win: the dashboard's own action buttons were 38 and 40. */
@media (max-width: 620px) {
  .ops-panel__action {
    min-width: 44px;
    min-height: 44px;
  }

  .ops-queue__action {
    width: 44px;
    height: 44px;
  }
}
