/* Modulspezifisches Layout. Farben, Schriften, Radien, Schatten und die
   Primitive (.btn, .card, .input, .field, .tag) kommen aus backoffice-ui.css
   (@backoffice/ui) — hier wird nichts davon neu definiert. */

.layout {
  width: min(1220px, 94vw);
  margin: 0 auto;
  padding: var(--space-4) 0 var(--space-8);
  display: grid;
  gap: var(--space-4);
}

/* Kopfzeile ohne eigene Flaeche: in der Backoffice-Shell liefert die Shell die
   Kopfzeile, hier bleibt nur der Titel des Moduls stehen. */
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-divider);
}

.page-head h1 {
  margin: 2px 0 0;
  font-size: 27px;
  font-weight: 400;
}

.user-chip {
  min-width: 11rem;
}

h2 {
  margin: 0;
  font-size: 20px;
}

h3 {
  margin: 2px 0 0;
  font-size: 20px;
}

h4 {
  margin: 0;
  font-size: 16px;
}

p {
  margin: 0;
}

.muted,
.supplier-address,
.stamp,
.order-note,
.empty-state {
  color: var(--color-neutral-600);
  font-size: 12.5px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  align-items: start;
  margin-bottom: var(--space-3);
}

.order-form {
  display: grid;
  grid-template-columns: minmax(14rem, 0.9fr) minmax(18rem, 1.25fr) minmax(14rem, 1fr);
  gap: var(--space-3);
}

#supplier-select {
  min-height: 10rem;
}

.form-footer {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.status {
  min-height: 1.2rem;
  font-size: 13px;
}

.status.ok {
  color: var(--color-accent-700);
}

.status.error {
  color: var(--color-danger);
}

.orders {
  display: grid;
  gap: var(--space-3);
}

.order-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: var(--space-4);
}

.order-title {
  margin-top: var(--space-3);
  font-size: 14px;
  font-weight: 600;
}

.steps {
  margin-top: var(--space-3);
}

/* Schritte werden durch Haarlinien getrennt; ihren Zustand traegt der .tag,
   nicht eine gefuellte Flaeche. */
.step {
  padding: var(--space-2) 0;
  border-top: 1px solid var(--color-divider);
}

.step-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.step-controls {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.step-controls .input {
  width: 160px;
}

.step-value,
.fault-note {
  margin-top: var(--space-1);
  font-size: 12.5px;
}

.fault-note {
  color: var(--color-danger);
}

.fault-box {
  margin-top: var(--space-2);
  display: grid;
  gap: var(--space-1);
}

.empty-state {
  padding: var(--space-3) 0;
}

@media (max-width: 900px) {
  .page-head,
  .section-head,
  .order-head,
  .step-header,
  .form-footer {
    align-items: stretch;
    flex-direction: column;
  }

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

  .step-controls {
    margin-left: 0;
  }
}
