/* Alle Auftraege -- Figma "ATZ 2026 - Zukunft", Screens ord_m_uebersicht /
   ord_m_filter / ord_m_geoeffnet und ord_d_uebersicht / ord_d_filter /
   ord_d_geoeffnet.

   Markup:    web/templates/web/transport_orders.html
              web/templates/web/partials/_order_row_detail.html
   Verhalten: web/static/web/js/orders.js

   Mobile first: die Basis-Regeln beschreiben das 402px-Layout (jeder Auftrag
   eine Karte, Detail einspaltig), die Media-Query (>=768px) stellt daraus die
   Tabelle mit zweispaltigem Detail her. Ein einziger Satz Zeilen im Markup
   bedient beide -- die Umschaltung passiert allein hier.

   Klassenpraefix `ord-`, damit sich nichts mit `atz-` (base.css), `rev-`
   (Kundenmeinungen), `dir-` (Firmenverzeichnis), `lic-` (Lizenzen),
   `tur-`/`tup-` (TU-Registrierung, Firmenprofil) oder `ow-`
   (Auftragsformular) ueberschneidet. */

:root {
  --ord-shaded: #F5F5F5;
  --ord-border: #E7E7E7;
  --ord-line: #EFEFEF;
  --ord-muted: #7A7A7A;
  --ord-red-tint: #FCEAED;
  --ord-radius: 12px;
  --ord-radius-sm: 8px;
}

.ord-page {
  color: var(--atz-dark);
  font-size: 15px;
  line-height: 1.5;
}

.ord-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.ord-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------------- Kopf */

.ord-hero {
  background-color: #fff;
  padding: 28px 0 24px;
  border-bottom: 1px solid var(--ord-border);
}

.ord-hero__title {
  margin: 0 0 10px;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
}

.ord-hero__lead {
  margin: 0;
  max-width: 62ch;
  color: var(--ord-muted);
  font-size: 15px;
}

/* ------------------------------------------------------------- Knoepfe */

.ord-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: var(--ord-radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
}

.ord-btn--primary {
  background-color: var(--atz-red);
  border-color: var(--atz-red);
  color: #fff;
}

.ord-btn--primary:hover {
  background-color: #9E0720;
  border-color: #9E0720;
}

.ord-btn--ghost {
  background-color: #fff;
  border-color: var(--ord-border);
  color: var(--atz-dark);
  font-weight: 600;
}

.ord-btn--ghost:hover {
  border-color: var(--atz-gray);
}

.ord-btn--block {
  width: 100%;
}

/* Der Pfeil an Filter- und Details-Knopf. Zeigt nach unten und dreht sich
   beim Aufklappen -- die Regeln dafuer stehen bei der jeweiligen Komponente. */
.ord-caret {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

/* --------------------------------------------------------- Ergebnisteil */

.ord-results {
  background-color: var(--ord-shaded);
  padding: 20px 0 40px;
}

/* ------------------------------------------------------ Alle/Favoriten */

.ord-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.ord-tab {
  padding: 8px 16px;
  border: 1px solid var(--ord-border);
  border-radius: 999px;
  background-color: #fff;
  color: var(--atz-dark);
  font-size: 14px;
  font-weight: 600;
}

.ord-tab--active {
  background-color: var(--atz-red);
  border-color: var(--atz-red);
  color: #fff;
}

/* ---------------------------------------------------------------- Filter */

.ord-filter {
  margin: 0 0 20px;
}

.ord-filter__box {
  background-color: #fff;
  border: 1px solid var(--ord-border);
  border-radius: var(--ord-radius);
}

.ord-filter__box[open] {
  border-color: var(--atz-red);
}

.ord-filter__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}

.ord-filter__head::-webkit-details-marker {
  display: none;
}

.ord-filter__icon {
  color: var(--atz-dark);
  font-size: 15px;
}

.ord-filter__title {
  font-size: 16px;
  font-weight: 700;
}

.ord-filter__state {
  color: var(--ord-muted);
  font-size: 14px;
}

.ord-filter__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 8px 12px;
  border: 1px solid var(--ord-border);
  border-radius: var(--ord-radius-sm);
  color: var(--atz-dark);
  font-size: 14px;
  white-space: nowrap;
}

.ord-filter__toggle-close {
  display: none;
}

.ord-filter__box[open] .ord-filter__toggle-open {
  display: none;
}

.ord-filter__box[open] .ord-filter__toggle-close {
  display: inline;
}

.ord-filter__box[open] .ord-caret {
  transform: translateY(2px) rotate(-135deg);
}

.ord-filter__body {
  padding: 0 18px 18px;
}

.ord-filter__foot {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.ord-filter__hint {
  margin: 0;
  color: var(--ord-muted);
  font-size: 13px;
}

/* ------------------------------------------------------------ Formular */

.ord-group {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}

.ord-group__title {
  padding: 0;
  margin-bottom: 8px;
  color: var(--ord-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ord-group__fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.ord-group__fields--three {
  margin-bottom: 4px;
}

.ord-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}

.ord-field__label {
  color: var(--atz-dark);
  font-size: 13px;
}

.ord-field__input,
.ord-field__select {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--ord-border);
  border-radius: var(--ord-radius-sm);
  background-color: #fff;
  color: var(--atz-dark);
  font-family: inherit;
  font-size: 15px;
}

.ord-field__input:focus,
.ord-field__select:focus {
  outline: 2px solid var(--atz-red);
  outline-offset: -1px;
}

.ord-field__input:disabled,
.ord-field__select:disabled {
  background-color: var(--ord-shaded);
  color: var(--ord-muted);
  cursor: not-allowed;
}

/* Ergaenzt die gemeinsame Regel oben um den eigenen Pfeil -- ein Auswahlfeld
   ohne `appearance: none` zeichnet ihn je nach Browser anders. */
.ord-field__select {
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%233D3C3F' stroke-width='1.6' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
}

/* Streckenlaenge: Zahlenfeld und die Einheit "km" stehen im Entwurf als zwei
   getrennte Kaesten nebeneinander. */
.ord-field__unitwrap {
  display: flex;
  gap: 8px;
}

.ord-field__unit {
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--ord-border);
  border-radius: var(--ord-radius-sm);
  background-color: var(--ord-shaded);
  color: var(--ord-muted);
  font-size: 14px;
}

/* ------------------------------------------- Trefferzahl und Sortierung */

.ord-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.ord-toolbar__count {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.ord-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--ord-border);
  border-radius: var(--ord-radius-sm);
  background-color: #fff;
}

.ord-sort__label {
  color: var(--ord-muted);
  font-size: 13px;
  white-space: nowrap;
}

.ord-sort__select {
  flex: 1;
  min-width: 0;
  border: 0;
  background-color: transparent;
  color: var(--atz-dark);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
}

/* Der Knopf verschwindet erst, wenn orders.js laeuft und das Umschalten des
   Auswahlfeldes selbst abschickt. */
.ord-sort--js .ord-sort__submit {
  display: none;
}

/* ------------------------------------------------------------ Kartenteil */

.ord-note {
  margin: 0 0 8px;
  color: var(--ord-muted);
  font-size: 13px;
}

.ord-note a {
  color: var(--atz-red);
  font-weight: 600;
}

/* --------------------------------------------------------- Auftragsliste */

.ord-table {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Die Spaltenueberschriften gibt es nur in der Tabelle ab 768px. */
.ord-legend {
  display: none;
}

.ord-item {
  background-color: #fff;
  border: 1px solid var(--ord-border);
  border-radius: var(--ord-radius);
}

.ord-item[open] {
  border-color: var(--atz-red);
}

.ord-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 10px;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}

.ord-row::-webkit-details-marker {
  display: none;
}

.ord-cell {
  min-width: 0;
}

.ord-cell--art {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: start;
}

.ord-art {
  display: block;
  width: 28px;
  height: auto;
}

.ord-route {
  grid-column: 2 / span 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.ord-route__arrow {
  color: var(--atz-red);
}

.ord-cell--from,
.ord-cell--to {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ord-cell__text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ord-meta {
  grid-column: 2 / span 2;
  grid-row: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ord-muted);
  font-size: 13px;
}

/* Die Entfernung ist auf dem Handy ein Abzeichen, in der Tabelle eine
   gewoehnliche Spalte. */
.ord-cell--distance {
  padding: 2px 8px;
  border-radius: 999px;
  background-color: var(--ord-red-tint);
  color: var(--atz-red);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.ord-cell--count {
  display: none;
}

.ord-cell--date {
  white-space: nowrap;
}

.ord-cell--vehicle {
  grid-column: 1 / -1;
  grid-row: 3;
  color: var(--ord-muted);
  font-size: 13px;
}

.ord-prices {
  grid-column: 1 / span 2;
  grid-row: 4;
  display: flex;
  gap: 20px;
  margin-top: 4px;
}

.ord-cell--wish,
.ord-cell--offer {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ord-cell__label {
  color: var(--ord-muted);
  font-size: 12px;
}

.ord-price {
  font-size: 17px;
  font-weight: 700;
  white-space: nowrap;
}

.ord-price--offer {
  color: var(--atz-red);
}

.ord-cell--action {
  grid-column: 3;
  grid-row: 4;
  justify-self: end;
  align-self: end;
}

.ord-details {
  padding: 9px 14px;
  font-size: 14px;
}

.ord-item[open] .ord-details .ord-caret {
  transform: translateY(2px) rotate(-135deg);
}

.ord-empty {
  margin: 0;
  padding: 28px 16px;
  background-color: #fff;
  border: 1px solid var(--ord-border);
  border-radius: var(--ord-radius);
  color: var(--ord-muted);
  text-align: center;
}

/* ------------------------------------------------------------- Blaettern */

.ord-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
}

.ord-pagination__info {
  display: none;
  color: var(--ord-muted);
  font-size: 13px;
}

.ord-pagination__list {
  display: flex;
  gap: 8px;
}

.ord-pager {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border: 1px solid var(--ord-border);
  border-radius: var(--ord-radius-sm);
  background-color: #fff;
  color: var(--atz-dark);
  font-size: 14px;
  font-weight: 600;
}

.ord-pager--current {
  background-color: var(--atz-red);
  border-color: var(--atz-red);
  color: #fff;
}

.ord-pager--gap {
  border-color: transparent;
  background-color: transparent;
  color: var(--ord-muted);
}

/* ================================================== Aufgeklappter Auftrag */

.ord-detail {
  padding: 0 14px 16px;
  border-top: 1px solid var(--ord-line);
}

.ord-detail__bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--ord-line);
}

.ord-detail__id {
  margin: 0;
  color: var(--ord-muted);
  font-size: 13px;
}

.ord-detail__id strong {
  color: var(--atz-dark);
  word-break: break-all;
}

.ord-detail__tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ord-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--ord-border);
  border-radius: var(--ord-radius-sm);
  background-color: #fff;
  color: var(--atz-dark);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}

.ord-tool:hover {
  border-color: var(--atz-gray);
}

.ord-tool:disabled {
  color: var(--ord-muted);
  cursor: not-allowed;
}

.ord-tool__icon {
  font-size: 14px;
  line-height: 1;
}

.ord-map {
  margin: 14px 0 0;
}

.ord-map.is-hidden {
  display: none;
}

.ord-map__img {
  width: 100%;
  border-radius: var(--ord-radius-sm);
}

/* Auf dem Handy eine Spalte in der Reihenfolge des Entwurfs: Angebot zuerst,
   Kontaktdaten zuletzt. Dazu loesen sich die beiden Spalten-Kaesten auf
   (`display: contents`) und die Abschnitte ordnen sich selbst. Ab 768px
   werden die Kaesten wieder zu echten Spalten. */
.ord-detail__grid {
  display: flex;
  flex-direction: column;
}

.ord-col {
  display: contents;
}

.ord-sec {
  order: 2;
  margin: 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--ord-line);
}

.ord-sec--offer {
  order: 1;
  border-top: 0;
}

.ord-sec--contact {
  order: 3;
}

.ord-sec__title {
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ord-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ord-sec__text {
  margin: 0;
  font-size: 14px;
}

.ord-sec__foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 12px 0 0;
  color: var(--ord-muted);
  font-size: 13px;
}

.ord-chip {
  padding: 2px 8px;
  border-radius: 999px;
  background-color: var(--ord-shaded);
  color: var(--atz-dark);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

/* ----------------------------------------------------------- Angebot */

.ord-figures {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin: 0 0 14px;
}

.ord-figure {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ord-figure__label {
  color: var(--ord-muted);
  font-size: 12px;
}

.ord-figure__value {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.ord-figure__value--wish {
  color: var(--atz-red);
}

.ord-bid {
  margin: 0;
}

.ord-bid__label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

.ord-bid__row {
  display: flex;
  gap: 8px;
}

.ord-bid__field {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  padding-right: 12px;
  border: 1px solid var(--ord-border);
  border-radius: var(--ord-radius-sm);
  background-color: #fff;
}

.ord-bid__field:focus-within {
  outline: 2px solid var(--atz-red);
  outline-offset: -1px;
}

.ord-bid__input {
  flex: 1;
  min-width: 0;
  padding: 11px 12px;
  border: 0;
  background-color: transparent;
  color: var(--atz-dark);
  font-family: inherit;
  font-size: 15px;
}

.ord-bid__input:focus {
  outline: none;
}

.ord-bid__unit {
  color: var(--ord-muted);
  font-size: 14px;
}

.ord-bid__sublabel {
  display: block;
  margin: 10px 0 6px;
  color: var(--ord-muted);
  font-size: 13px;
}

.ord-bid__remark {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--ord-border);
  border-radius: var(--ord-radius-sm);
  color: var(--atz-dark);
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}

/* Zustands-Schild im Angebots-Kasten: "Abgeschlossen", "Termin vereinbart". */
.ord-flag {
  display: inline-block;
  margin: 0 0 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background-color: var(--ord-shaded);
  color: var(--atz-dark);
  font-size: 13px;
  font-weight: 600;
}

.ord-flag--ok {
  background-color: #E8F5EC;
  color: var(--atz-green-dark);
}

/* --------------------------------------------------------- Fahrzeuge */

.ord-vehicle {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
}

.ord-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  margin: 0;
}

.ord-fact {
  min-width: 0;
}

.ord-fact__label {
  color: var(--ord-muted);
  font-size: 12px;
}

.ord-fact__value {
  margin: 2px 0 0;
  font-size: 14px;
  font-weight: 600;
}

/* --------------------------------------------------- Route und Zeitraum */

.ord-stops {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
}

.ord-stop {
  position: relative;
  padding: 0 0 14px 20px;
}

.ord-stop:last-child {
  padding-bottom: 0;
}

.ord-stop::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--atz-red);
}

.ord-stop:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 16px;
  bottom: 4px;
  left: 4px;
  width: 1px;
  background-color: var(--ord-border);
}

.ord-stop__place {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.ord-stop__when {
  display: block;
  color: var(--ord-muted);
  font-size: 13px;
}

/* -------------------------------------------------- Wichtige Hinweise */

.ord-hint {
  display: flex;
  gap: 8px;
  margin: 0;
  font-size: 14px;
}

.ord-hint__icon {
  color: var(--atz-amber-dark);
}

/* ----------------------------------------------------------- Notizen */

.ord-noteitem {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px solid var(--ord-border);
  border-radius: var(--ord-radius-sm);
  background-color: var(--ord-shaded);
}

.ord-noteitem__text {
  flex: 1;
  min-width: 0;
  font-size: 14px;
}

.ord-noteitem__remove {
  padding: 0 6px;
  border: 0;
  background: none;
  color: var(--ord-muted);
  font-family: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.ord-noteitem__remove:hover {
  color: var(--atz-red);
}

.ord-noteform {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ord-noteform__input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--ord-border);
  border-radius: var(--ord-radius-sm);
  color: var(--atz-dark);
  font-family: inherit;
  font-size: 14px;
}

/* ------------------------------------------------------- Kontaktdaten */

.ord-party {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-weight: 700;
}

.ord-party__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--ord-shaded);
  font-size: 14px;
}

.ord-contact {
  font-size: 14px;
}

.ord-locked {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 12px;
  border-radius: var(--ord-radius-sm);
  background-color: var(--ord-shaded);
  color: var(--ord-muted);
  font-size: 13px;
}

.ord-locked__icon {
  line-height: 1.4;
}

.ord-other {
  margin: 14px 0 0;
  color: var(--atz-red);
  font-size: 14px;
  font-weight: 700;
}

/* ------------------------------------------------------------- Melden */

.ord-report {
  margin-top: 10px;
}

.ord-report__summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ord-muted);
  font-size: 13px;
  cursor: pointer;
  list-style: none;
}

.ord-report__summary::-webkit-details-marker {
  display: none;
}

.ord-report__icon {
  color: var(--atz-amber-dark);
}

.ord-report__question {
  margin: 12px 0 8px;
  font-size: 14px;
}

.ord-report__reasons {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.ord-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}

/* Das Freitextfeld erscheint erst bei "Anderer Grund" -- ohne JavaScript,
   siehe Kommentar in _order_row_detail.html. */
.ord-report__detail {
  display: none;
  width: 100%;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid var(--ord-border);
  border-radius: var(--ord-radius-sm);
  color: var(--atz-dark);
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}

.ord-report__reasons:has(input[value="anderer"]:checked) ~ .ord-report__detail {
  display: block;
}

/* ================================================================ Desktop */

@media (min-width: 768px) {
  .ord-container {
    padding: 0 24px;
  }

  .ord-hero {
    padding: 56px 0 40px;
  }

  .ord-hero__title {
    font-size: 40px;
  }

  .ord-results {
    padding: 32px 0 56px;
  }

  .ord-filter__head {
    padding: 20px 24px;
  }

  .ord-filter__body {
    padding: 0 24px 24px;
  }

  .ord-filter__foot {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
  }

  .ord-filter__hint {
    margin-right: auto;
  }

  .ord-group__fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .ord-group__fields--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ord-toolbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .ord-toolbar__count {
    font-size: 20px;
  }

  .ord-sort {
    flex: 0 0 auto;
  }

  /* --- Aus den Karten wird eine Tabelle: ein Kasten, Zeilen mit Trennlinie.
     Kopfzeile und Zeile teilen sich dieselben Spaltenbreiten. */
  .ord-table {
    display: block;
    background-color: #fff;
    border: 1px solid var(--ord-border);
    border-radius: var(--ord-radius);
    overflow: hidden;
  }

  .ord-legend,
  .ord-row {
    display: grid;
    grid-template-columns:
      56px minmax(0, 1.4fr) minmax(0, 1.4fr) 92px 64px
      108px 116px 96px 124px;
    align-items: center;
    gap: 0 8px;
    padding: 14px 20px;
  }

  .ord-legend {
    border-bottom: 1px solid var(--ord-border);
    color: var(--ord-muted);
    font-size: 13px;
  }

  .ord-legend__cell--distance,
  .ord-legend__cell--count,
  .ord-legend__cell--wish,
  .ord-legend__cell--offer {
    text-align: right;
  }

  .ord-item {
    border: 0;
    border-top: 1px solid var(--ord-line);
    border-radius: 0;
  }

  .ord-item:first-of-type {
    border-top: 0;
  }

  .ord-item[open] .ord-row {
    background-color: var(--ord-red-tint);
  }

  /* Die drei Gruppen aus dem Markup (Route, Kennzahlen, Preise) verschwinden
     als Kasten und geben ihre Zellen direkt an das Zeilenraster weiter --
     nur so stehen sie in einer Zeile mit den Spaltenueberschriften. */
  .ord-route,
  .ord-meta,
  .ord-prices {
    display: contents;
  }

  .ord-cell--art {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
  }

  .ord-cell--from {
    grid-column: 2;
    grid-row: 1;
  }

  .ord-cell--to {
    grid-column: 3;
    grid-row: 1;
  }

  .ord-cell--distance {
    grid-column: 4;
    grid-row: 1;
    padding: 0;
    border-radius: 0;
    background-color: transparent;
    color: var(--atz-dark);
    font-size: 15px;
    font-weight: 400;
    text-align: right;
  }

  .ord-cell--count {
    grid-column: 5;
    grid-row: 1;
    display: block;
    text-align: right;
  }

  .ord-cell--wish {
    grid-column: 6;
    grid-row: 1;
    align-items: flex-end;
  }

  .ord-cell--offer {
    grid-column: 7;
    grid-row: 1;
    align-items: flex-end;
  }

  .ord-cell--date {
    grid-column: 8;
    grid-row: 1;
    color: var(--ord-muted);
  }

  .ord-cell--action {
    grid-column: 9;
    grid-row: 1;
    align-self: center;
  }

  .ord-route__arrow,
  .ord-cell--vehicle,
  .ord-cell__label {
    display: none;
  }

  .ord-price {
    font-size: 15px;
  }

  .ord-details {
    width: 100%;
  }

  .ord-empty {
    border: 0;
    border-radius: 0;
  }

  .ord-pagination {
    justify-content: space-between;
  }

  .ord-pagination__info {
    display: block;
  }

  /* --- Detail: links Fahrzeug/Route/Hinweise/Notizen, rechts Angebot und
     Kontaktdaten. Die Seitenspalte steht im Markup vorn (Handy-Reihenfolge)
     und wird hier per `order` nach rechts geschoben. */
  .ord-detail {
    padding: 0 20px 20px;
    background-color: #fff;
  }

  .ord-detail__bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
  }

  .ord-detail__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 20rem;
    align-items: start;
    gap: 0 24px;
  }

  .ord-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding-top: 18px;
  }

  .ord-col--side {
    order: 2;
    padding-left: 24px;
    border-left: 1px solid var(--ord-line);
  }

  .ord-sec {
    padding-top: 18px;
    margin-top: 18px;
  }

  .ord-col > .ord-sec:first-child {
    padding-top: 0;
    margin-top: 0;
    border-top: 0;
  }

  .ord-facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .ord-figures {
    gap: 12px 20px;
  }

  .ord-figure__value {
    font-size: 16px;
  }
}
