/* Growthmerce Orders workspace — operational layout, not a Qumra clone. */

.gm-ord-ops {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gm-ord-ops h1 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

@media (min-width: 640px) {
  .gm-ord-ops h1 {
    font-size: 1.5rem;
  }
}

.gm-ord-ops .tabular-nums,
.gm-ord-ops [class*="tabular-nums"] {
  font-variant-numeric: tabular-nums;
}

.gm-ord-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: hsl(var(--border) / 0.7);
}

@media (min-width: 640px) {
  .gm-ord-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .gm-ord-kpis {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.gm-ord-kpis > button {
  min-height: 104px;
  background: hsl(var(--card));
}

.gm-ord-delta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.gm-ord-delta.is-na,
.gm-ord-kpi-na {
  color: hsl(var(--muted-foreground));
}

.gm-ord-delta.is-good {
  color: #15803d;
}

.gm-ord-delta.is-bad {
  color: #dc2626;
}

.gm-ord-delta.is-neutral {
  color: hsl(var(--muted-foreground));
}

.gm-ord-hide-stats {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
  color: hsl(var(--muted-foreground));
}

.gm-ord-create {
  display: inline-flex;
}

.gm-ord-create button,
.gm-ord-create a {
  min-height: 44px;
  font-weight: 700;
}

@media (max-width: 767px) {
  .gm-ord-create {
    order: -1;
  }

  .gm-ord-ops [data-gm="last7"],
  .gm-ord-ops [data-gm="last30"] {
    display: none;
  }
}

.gm-ord-crash {
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gm-ord-crash-msg {
  color: hsl(var(--destructive));
  font-size: 13px;
}

.gm-ord-crash-reload {
  align-self: flex-start;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-weight: 700;
}

@media (max-width: 767px) {
  .gm-ord-ops .orders-desktop-scroll {
    overflow-x: auto;
  }
}
