.sectionhead {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.sectionhead h2 { margin:0; }
.form > *,
.line-items { min-width:0; }
.compact-filters {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.compact-filters select,
.compact-filters input {
  width:auto;
  min-width:150px;
}
.order-items-wrap table { min-width:1780px; }
.order-items-wrap input,
.order-items-wrap select { min-width:105px; }
.order-items-wrap td:first-child input,
.order-items-wrap td:nth-child(2) input { min-width:160px; }
.order-modalbox { width:min(1280px,100%); }
.summary-strip {
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:10px;
  margin-bottom:16px;
}
.summary-cell {
  border:1px solid var(--line);
  border-radius:6px;
  padding:12px;
  background:#f8fafc;
}
.summary-cell .label {
  color:var(--muted);
  font-size:12px;
  margin-bottom:5px;
}
.summary-cell .value {
  font-weight:750;
  font-size:17px;
}
.summary-cell.profit {
  border-color:#9fd5bd;
  background:#f0faf5;
}
.order-meta {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px 18px;
}
.order-meta div {
  border-bottom:1px solid var(--line);
  padding:7px 0;
  min-width:0;
}
.order-meta strong {
  color:var(--muted);
  font-size:12px;
  display:block;
}
.status-pill {
  display:inline-block;
  padding:3px 7px;
  border-radius:4px;
  background:#eef2f6;
  font-size:12px;
  white-space:nowrap;
}
.status-pill.cancelled { color:var(--warn); background:#fff1f0; }
.status-pill.completed { color:var(--ok); background:#ecfdf3; }
.subpanel {
  border-top:1px solid var(--line);
  padding-top:14px;
  margin-top:14px;
}
.subpanel h3 {
  margin:0 0 10px;
  font-size:15px;
}
.purchase-items table { min-width:1150px; }
.order-form-actions {
  display:flex;
  gap:8px;
  align-items:center;
}
.muted-note { color:var(--muted); font-size:12px; }
@media (max-width:900px) {
  .sectionhead { display:block; }
  .compact-filters { justify-content:flex-start; margin-top:10px; }
  .compact-filters select,
  .compact-filters input { width:100%; }
  .summary-strip,
  .order-meta { grid-template-columns:1fr 1fr; }
}
@media (max-width:520px) {
  .summary-strip,
  .order-meta { grid-template-columns:1fr; }
}
