/* ==========================================================================
   Administrations-Frontend – gleiche Designsprache wie das Reporting.
   ========================================================================== */

:root {
  --brand: #57a900;
  --brand-dark: #4a9100;
  --brand-light: #f0f8e6;

  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-alt: #fafbfc;
  --border: #e3e8ee;
  --border-strong: #cdd5df;

  --text: #1f2933;
  --text-muted: #6b7785;

  --good: #2f9e44;
  --good-bg: #e7f7ec;
  --bad: #c92a2a;
  --bad-bg: #fdeaea;

  /* Navigation wie im Warehouse (Bootstrap 4 navbar-dark bg-dark / navbar-light bg-light) */
  --nav-bg: #343a40;
  --nav-link: rgba(255, 255, 255, .5);
  --nav-link-hover: rgba(255, 255, 255, .75);
  --nav-link-active: #fff;
  --sub-nav-bg: #f3f3f3;
  --sub-nav-link: rgba(0, 0, 0, .5);
  --sub-nav-link-hover: rgba(0, 0, 0, .7);
  --sub-nav-link-active: rgba(0, 0, 0, .9);

  --radius: 8px;
  --radius-sm: 5px;
  --shadow-sm: 0 1px 2px rgba(20, 30, 45, .06), 0 1px 3px rgba(20, 30, 45, .05);
  --shadow-md: 0 2px 6px rgba(20, 30, 45, .07), 0 6px 16px rgba(20, 30, 45, .06);
  --nav-height: 50px;
  --sub-nav-height: 46px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  /* Die Reporting-CSS haelt hier noch Platz fuer ihre alte Leiste frei - nicht mehr noetig. */
  padding: 0;
  background: var(--bg);
  color: var(--text);
  /* Schriftgroessen wie im Warehouse: dessen Bootstrap setzt am body nichts,
     es gelten also 16px und die Standard-Serifenlose. */
  font-family: sans-serif;
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 600;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 21px;
}

a {
  color: var(--brand-dark);
  text-decoration: none;
}

a:hover {
  color: var(--brand);
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.brand-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px rgba(87, 169, 0, .25);
  display: inline-block;
}

/* Navigation: siehe navigation.css (aus dem Warehouse uebernommen).
   Hier stehen nur noch Ergaenzungen, die dort kein Gegenstueck haben. */

/*
 * Das Warehouse rechnet fest mit 50,4px hohen Leisten - daher stammen dort
 * "#sub-nav-bar { top: 50.4px }" und "padding-top: 7rem" beim Inhalt.
 * Diese Hoehe ergibt sich aus dessen Grundschrift; hier ist die Grundschrift
 * eine andere, deshalb wird die Hoehe ausdruecklich gesetzt. Damit stimmen
 * die uebernommenen Werte wieder.
 */
#top-nav-bar,
#sub-nav-bar {
  height: 50.4px;
  padding-top: 0;
  padding-bottom: 0;
  /* In px statt rem: auf den Reporting-Seiten setzt Bootstrap 3 html{font-size:10px}. */
  font-family: sans-serif;
  font-size: 16px;
  line-height: 1.15;
}

#top-nav-bar .navbar-brand,
#sub-nav-bar .navbar-brand {
  font-size: 20px;
}

/* Deutlich waermer als das Bootstrap-Dunkelgrau (#343a40): dunkles Orange-Braun,
   dazu passend die Hervorhebung der aktiven Seite. */
#top-nav-bar.bg-dark {
  background-color: #4a3320 !important;
}

#top-nav-bar .nav-item .nav-link.active {
  background: #8a5a22;
}

/*
 * Die Leisten haben hier keine senkrechte Innenabstand (feste Hoehe), sonst
 * fuellte die Hervorhebung die ganze Leiste. So sitzt sie frei darin - wie in
 * der Zeiterfassung.
 */
#top-nav-bar .navbar-nav .nav-item {
  display: flex;
  align-items: center;
}

/*
 * Die Untermodul-Liste rollt waagrecht (Regel aus dem Warehouse). Sie bekommt
 * hier eine eigene Hoehe, damit die schmale Rollleiste innerhalb der Leiste
 * bleibt und nicht ueber deren Unterkante hinausragt. Der Abstand rechts
 * sorgt dafuer, dass der letzte Eintrag nicht unter dem Zahnrad endet.
 */
/*
 * Aus Bootstrap wurden nur die Navigations-Regeln uebernommen, nicht dessen
 * Reboot - deshalb behalten die Listen den Standard-Aussenabstand des Browsers
 * (1em oben) und die Eintraege sassen 16px zu tief in beiden Leisten.
 */
#top-nav-bar .navbar-nav,
#sub-nav-bar .navbar-nav {
  margin-top: 0;
  margin-bottom: 0;
}

#sub-nav-bar .navbar-collapse {
  height: 100%;
  align-items: center;
}

/*
 * Die Liste rollt waagrecht (Regel aus dem Warehouse). Die schmale Rollleiste
 * nimmt sich dabei Hoehe aus der Liste - dadurch sassen die Eintraege hoeher
 * als der Modulname daneben. Sie wird deshalb ausgeblendet, wie es die obere
 * Leiste ohnehin schon tut; gerollt wird mit Rad oder Wischen.
 */
#sub-nav-bar .navbar-nav.mr-auto {
  height: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#sub-nav-bar .navbar-nav.mr-auto::-webkit-scrollbar {
  display: none;
}

/*
 * Auf den Reporting-Seiten liegt Bootstrap 3 mit im Dokument; dessen
 * ".navbar-nav > li > a" ist genauer als ".nav-link" von Bootstrap 4 und
 * blaeht die Eintraege auf 15px Innenabstand auf. Deshalb hier festgesetzt -
 * in px, weil Bootstrap 3 zusaetzlich html{font-size:10px} setzt.
 */
#top-nav-bar .navbar-nav > .nav-item > .nav-link,
#sub-nav-bar .navbar-nav > .nav-item > .nav-link {
  padding-top: 8px;
  padding-bottom: 8px;
}

.navbar .badge {
  padding: 1px 7px;
  border-radius: 99px;
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  vertical-align: middle;
}

/* ------------------------------------------------------------------ Seite */

.page {
  font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
  max-width: 1180px;
  margin: 0 auto;
  /* Platz fuer die beiden festen Leisten - wie #mainBody im Warehouse. */
  padding: 112px 24px 64px;
}

body.no-sub-navigation .page {
  padding-top: 62px;
}

/*
 * Fuer Seiten mit Tabellen: mehr Platz als die Lesebreite von .page, aber nicht die ganze
 * Fensterbreite. Damit passen breite Tabellen wie in item/itemPrices.php hin, ohne dass der
 * Blick auf einem grossen Bildschirm quer ueber die Seite wandern muss.
 */
.page.page-table {
  max-width: 1500px;
  padding-left: 28px;
  padding-right: 28px;
}

/* Fuer Dauer-Anzeigen: nahezu die volle Fensterbreite nutzen. */
.page.page-wide {
  max-width: none;
  padding-left: 32px;
  padding-right: 32px;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.page-subtitle {
  margin: 4px 0 0;
  color: var(--text-muted);
}

.page-actions {
  display: flex;
  gap: 8px;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/*
 * Eine Abschnitts-Ueberschrift hat oben keinen Abstand - folgt sie auf Inhalt, steht sie sonst
 * direkt daran. Betrifft die Uebersichten, die mehrere Bloecke untereinander zeigen
 * (Grosshandels-Feeds, Auswertung, eigene Aufgaben).
 */
.table-scroll + .section-head,
.card + .section-head,
.alert + .section-head,
.card-row + .section-head {
  margin-top: 30px;
}

.section-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.card {
  margin-bottom: 22px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/*
 * Zwei Karten nebeneinander - etwa Filter und Datei-Upload im ELBA-Tool. Unter 320px je Karte
 * bricht die Zeile von selbst um, auf schmalen Bildschirmen stehen sie also wieder untereinander.
 */
.card-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 0 22px;
}

/* Damit die Knopfleisten beider Karten auf einer Hoehe stehen, auch wenn der Inhalt unterschiedlich hoch ist. */
.card-row > .card {
  display: flex;
  flex-direction: column;
}

.card-row > .card .form-actions {
  margin-top: auto;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
}

.empty-state h1,
.empty-state h2 {
  margin-bottom: 8px;
  color: var(--text);
}

/* ----------------------------------------------------------------- Kacheln */

/*
 * Aufbau und Aussehen wie die Modul-Startseiten im Warehouse
 * (.modules-container und .button.button-adapter aus dessen base/_base.scss).
 */
.modules-container {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 1200px) {
  .modules-container {
    grid-template-columns: 1fr;
    gap: .5rem;
  }
}

/* Zwischen zwei Gruppen etwas Luft, damit die Ueberschrift dazugehoert. */
.modules-container + .section-head {
  margin-top: 28px;
}

.modules-container .button-adapter {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 4rem;
  margin: 0;
  padding: 0 1rem;
  border: 1px solid #000;
  background-color: #f3f3f3;
  color: #000;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
}

.modules-container .button-adapter:hover,
.modules-container .button-adapter:focus {
  background-color: #797979;
  color: #fff;
  text-decoration: none;
}

/* ------------------------------------------------------------- Monitoring */

.monitoring-status {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  color: var(--text-muted);
  font-size: 13px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

/*
 * Flex-Spalte, damit die Kacheln einer Zeile gleich hoch sein koennen: das Raster streckt die
 * Karte, und was innen wachsen darf (die rollende Liste) fuellt den Rest.
 */
.metric-card {
  display: flex;
  flex-direction: column;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* Faellt auf, sobald etwas liegen geblieben ist. */
.metric-card.has-backlog {
  border-left-color: #d98324;
}

.metric-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.metric-title {
  font-size: 16px;
  font-weight: 700;
}

.metric-subtitle,
.metric-hint {
  color: var(--text-muted);
  font-size: 11px;
}

.metric-value {
  font-size: 26px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.metric-value.second {
  margin-top: 16px;
}

.metric-unit {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.metric-delta {
  display: inline-block;
  margin-top: 4px;
  padding: 1px 8px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.metric-delta.up {
  background: var(--good-bg);
  color: var(--good);
}

.metric-delta.down {
  background: var(--bad-bg);
  color: var(--bad);
}

.metric-delta.flat {
  background: var(--surface-alt);
  color: var(--text-muted);
}

.metric-reference {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
}

.metric-rows {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}

.metric-rows dt {
  color: var(--text-muted);
}

.metric-rows dd {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.metric-backlog {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}

.metric-backlog-title {
  display: block;
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.metric-backlog-list {
  margin: 0;
  padding-left: 18px;
}

.metric-backlog-list li {
  margin-bottom: 2px;
}

/* Gesamt-Kachel: breiter und ausfuehrlicher als die Kanal-Kacheln. */

/* Der Shop-Schluessel neben der Abschnitts-Ueberschrift - leiser als diese. */
.section-head-hint {
  margin-left: 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 400;
}

/*
 * Die Gesamtsicht: Uebersicht, Versand-Stand und die Liste der noch nicht uebertragenen
 * Bestellungen stehen zu dritt in der ersten Zeile, die ueberschrittenen Liefertermine ruecken
 * darunter. Gleich breite Spalten, damit die Zeile ruhig wirkt.
 *
 * Kein align-items: start - die Kacheln einer Zeile sollen gleich hoch sein. Das Strecken
 * uebernimmt der Standardwert stretch, die Kacheln selbst sind Flex-Spalten (siehe .metric-card).
 */
.metric-grid.overall {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1400px) {
  .metric-grid.overall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .metric-grid.overall {
    grid-template-columns: minmax(0, 1fr);
  }
}

/*
 * Eine Liste in einer Kachel, die rollen darf, statt die Karte in die Laenge zu ziehen.
 *
 * flex: 1 laesst sie den Platz fuellen, den die gleich hohe Kachel uebrig hat; min-height: 0 ist
 * dabei noetig, sonst waechst ein Flex-Kind ueber seinen Inhalt hinaus und rollt nicht. Die
 * Hoechsthoehe deckelt die Kachel, wenn sie allein in ihrer Zeile steht.
 */
.metric-scroll-list {
  flex: 1 1 auto;
  min-height: 0;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  max-height: 320px;
  overflow-y: auto;
  border-top: 1px solid var(--border);
}

.metric-scroll-list li {
  border-bottom: 1px solid var(--border);
}

.metric-scroll-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 4px;
  color: inherit;
  text-decoration: none;
}

.metric-scroll-link:hover {
  background: var(--surface-alt);
}

.metric-scroll-main,
.metric-scroll-side {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.metric-scroll-main {
  overflow: hidden;
}

.metric-scroll-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-scroll-side {
  align-items: flex-end;
  text-align: right;
  flex: 0 0 auto;
}

/*
 * In der breiten Gesamtsicht standen Bezeichnung und Wert an den beiden Enden der Karte - dazwischen
 * lag die halbe Fensterbreite. Zwei Paare je Zeile setzen den Wert direkt neben seine Bezeichnung
 * und halbieren nebenbei die Hoehe. Ist die Karte dafuer zu schmal, bleibt es einspaltig.
 *
 * Gefragt wird die Karte selbst, nicht das Fenster: seit sie sich die Zeile mit zwei weiteren
 * Kacheln teilt, sagt die Fensterbreite nichts mehr ueber den Platz in der Karte aus. Bei
 * 1440px Fensterbreite lief mit der alten Fensterabfrage der Warenwert aus seiner Spalte.
 */
.metric-card-overall {
  container-type: inline-size;
}

@container (min-width: 520px) {
  .metric-card-overall .metric-rows {
    grid-template-columns: max-content minmax(0, 1fr) max-content minmax(0, 1fr);
    column-gap: 10px;
  }

  .metric-card-overall .metric-rows dt::after {
    content: ':';
  }

  .metric-card-overall .metric-rows dd {
    /* Der Wert schliesst an die Bezeichnung an, statt an den Rand zu wandern. */
    text-align: left;
    padding-right: 18px;
    font-weight: 600;
  }
}

.metric-card-overall .metric-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 16px;
}

@media (max-width: 600px) {
  .metric-card-overall .metric-split {
    grid-template-columns: 1fr;
  }
}

/* Der Versand-Stand - die Frage, die man auf dieser Seite zuerst hat. */
.shipping-state {
  margin-bottom: 4px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
}

.shipping-state.clear {
  background: var(--good-bg);
  color: #1e7a33;
}

.shipping-state.waiting {
  background: #fdf1e2;
  color: #8a5320;
}

.shipping-headline {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.shipping-count {
  font-size: 30px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.shipping-text {
  font-size: 14px;
  font-weight: 600;
}

.shipping-state .metric-rows {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, .1);
}

.shipping-state .metric-rows dt {
  color: inherit;
  opacity: .8;
}

/* --------------------------------------------------------------- Tabellen */

.table-scroll {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

/*
 * Ohne Querlauf: alles steht auf einmal da.
 *
 * Die Tabelle selbst passt immer - ueber den Rand laufen nur die Bedienelemente der Aktionsspalte,
 * die `white-space: nowrap` auf einer Zeile haelt. Hier duerfen sie umbrechen, dann bleibt nichts
 * verborgen.
 */
.table-scroll.table-wrap {
  overflow-x: visible;
}

/*
 * `width: 1%` teilt der Aktionsspalte weniger zu, als ihre Bedienelemente brauchen - sie laufen
 * dann aus der Zelle. Ohne diese Angabe bekommt sie ihre natuerliche Breite, die uebrigen Spalten
 * teilen sich den Rest. Umbrechen darf sie trotzdem, falls das Fenster sehr schmal ist.
 */
.table-scroll.table-wrap table.data-table td.column-action,
.table-scroll.table-wrap table.data-table th:last-child {
  width: auto;
  white-space: normal;
}

/* Die Bedienelemente selbst bleiben ganz - umbrochen wird nur zwischen ihnen. */
.table-scroll.table-wrap table.data-table td.column-action > * {
  margin-bottom: 2px;
  white-space: nowrap;
}

table.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

table.data-table th {
  position: sticky;
  top: 0;
  padding: 10px 14px;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .4px;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}

table.data-table td {
  padding: 9px 14px;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}

table.data-table tbody tr:hover td {
  background: rgba(31, 41, 51, .035);
}

table.data-table td.column-action {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

/* Schaltflaechen aus Formularen sollen neben den Links der Spalte stehen, nicht darunter. */
table.data-table td.column-action form {
  display: inline-block;
  margin: 0;
}

table.data-table td.column-action > * + * {
  margin-left: 6px;
}

.pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
}

.pill-good {
  background: var(--good-bg);
  color: var(--good);
}

.pill-muted {
  background: var(--surface-alt);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.pill-bad {
  background: var(--bad-bg);
  color: var(--bad);
}

/* SQL und andere Eingaben, bei denen die Einrueckung zaehlt. */
.field-input.field-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre;
  overflow-x: auto;
}

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

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px 20px;
}

.field {
  display: flex;
  flex-direction: column;
}

/*
 * Felder, die direkt untereinander stehen, brauchen den Abstand selbst - im .form-grid kommt er
 * aus dem gap, ausserhalb gab es bisher gar keinen. Das betraf jedes Formular, dessen Felder
 * direkt in der Karte liegen.
 */
.field + .field,
.field + .form-grid,
.form-grid + .field {
  margin-top: 16px;
}

/* Im Raster sorgt der gap fuer den Abstand - sonst stuende er doppelt. */
.form-grid > .field + .field {
  margin-top: 0;
}

.field-wide {
  grid-column: 1 / -1;
}

/* Beginnt mit diesem Feld eine neue Zeile. */
.field-new-line {
  grid-column: 1;
}

/* Etwas Luft zwischen Ueberschrift und Formular. */
.export-form {
  margin-top: 18px;
}

.field-label {
  margin-bottom: 5px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .6px;
  text-transform: uppercase;
}

.field-input,
.field-select,
.field-textarea {
  width: 100%;
  padding: 9px 11px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}

.field-textarea {
  min-height: 92px;
  resize: vertical;
}

.field-input:focus,
.field-select:focus,
.field-textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(87, 169, 0, .15);
}

.field-hint {
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 12px;
}

.field-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.field-check input {
  margin: 0;
  accent-color: var(--brand);
}

.field-check label {
  margin: 0;
  font-weight: 400;
  cursor: pointer;
}

/*
 * Auswahlleiste ueber einer Liste.
 *
 * Nicht .form-actions nehmen: das ist die Fussleiste eines Formulars und bringt eine Trennlinie
 * darueber mit - ueber einer Auswahl sieht das aus wie ein abgeschnittener Rest.
 */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px 22px;
}

/* Die allgemeine Regel `.field + .field` gilt hier nicht - nebeneinander braucht es sie nicht. */
.filter-bar .field {
  margin-top: 0;
  min-width: 170px;
}

.filter-bar .filter-checks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  /* Auf Hoehe des Eingabefelds - align-items richtet die Unterkanten aus. */
  height: 38px;
}

.filter-bar .filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  margin-left: auto;
}

/* Der Hinweis stand vorher unter dem Datumsfeld und schob es aus der Zeile. */
.filter-hint {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 12px;
}

.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

/*
 * Der Block ist fuer das Ende eines Formulars gedacht und hat deshalb nur oben Abstand. Steht er
 * ausnahmsweise ueber einem Inhalt - etwa "Automatisches OK" ueber den offenen Zahlungseingaengen -,
 * klebte die Tabelle sonst an den Knoepfen.
 */
.form-actions + .table-scroll,
.form-actions + .card-hint,
.form-actions + .data-table {
  margin-top: 18px;
}

/*
 * Schliesst ein Formular mit seiner Knopfleiste ab, folgt darunter oft noch eines - zum Anfordern,
 * zum Loeschen. Ohne Abstand klebt dessen Karte an den Knoepfen; hier bekommt sie denselben, den
 * die Karten untereinander haben.
 *
 * Nur die Leiste unmittelbar im Formular: die in einer Karte schliesst mit deren Innenabstand ab.
 */
form > .form-actions:last-child {
  margin-bottom: 22px;
}

/* --------------------------------------------------------------- Buttons */

.button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .15s ease;
}

.button-primary {
  background: var(--brand);
  border-color: var(--brand-dark);
  color: #fff;
}

.button-primary:hover {
  background: var(--brand-dark);
  color: #fff;
}

.button-secondary {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}

.button-secondary:hover {
  background: var(--surface-alt);
  color: var(--text);
}

.button-danger {
  background: var(--surface);
  border-color: var(--bad);
  color: var(--bad);
}

.button-danger:hover {
  background: var(--bad-bg);
  color: var(--bad);
}

.button-small {
  padding: 5px 12px;
  font-size: 13px;
}

/* -------------------------------------------------------------- Meldungen */

.alert {
  margin-bottom: 20px;
  padding: 12px 16px;
  border: 1px solid;
  border-left-width: 4px;
  border-radius: var(--radius-sm);
}

.alert-success {
  background: var(--good-bg);
  border-color: var(--good);
  color: #1e7a33;
}

.alert-error {
  background: var(--bad-bg);
  border-color: var(--bad);
  color: #8c1c1c;
}

/* ------------------------------------------------------------------ Login */

.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.login-panel {
  width: 100%;
  max-width: 380px;
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  font-size: 17px;
  font-weight: 600;
}

.login-form {
  display: flex;
  flex-direction: column;
}

.login-form .field-label {
  margin-top: 14px;
}

.login-form .field-label:first-child {
  margin-top: 0;
}

.login-submit {
  justify-content: center;
  margin-top: 24px;
}

.login-error {
  margin-bottom: 18px;
  padding: 11px 14px;
  background: var(--bad-bg);
  border: 1px solid var(--bad);
  border-left-width: 4px;
  border-radius: var(--radius-sm);
  color: #8c1c1c;
  font-size: 13px;
}

.login-notice {
  margin-bottom: 18px;
  padding: 11px 14px;
  background: var(--good-bg);
  border: 1px solid var(--good);
  border-left-width: 4px;
  border-radius: var(--radius-sm);
  color: #1e7a33;
  font-size: 13px;
}

.login-intro {
  margin: 0 0 4px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.login-links {
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
}

.login-form + .login-links {
  margin-top: 20px;
}

.login-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.login-links a:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

.login-form .field-hint {
  margin-top: 6px;
}

/* --------------------------------------------------------------- Symbole */

/*
 * Das Warehouse nutzt Font-Awesome. Hier reichen zwei Zeichen, die als Maske
 * eingebunden werden - so nehmen sie die Farbe des Links an, ohne dass eine
 * komplette Zeichensatz-Bibliothek geladen werden muss.
 */
.nav-icon {
  display: inline-block;
  width: 17px;
  height: 17px;
  vertical-align: -3px;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.nav-icon-expand {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 3H5a2 2 0 0 0-2 2v3M16 3h3a2 2 0 0 1 2 2v3M8 21H5a2 2 0 0 1-2-2v-3M16 21h3a2 2 0 0 0 2-2v-3'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 3H5a2 2 0 0 0-2 2v3M16 3h3a2 2 0 0 1 2 2v3M8 21H5a2 2 0 0 1-2-2v-3M16 21h3a2 2 0 0 0 2-2v-3'/%3E%3C/svg%3E");
}

.nav-icon-sliders {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M3 6h18M3 12h18M3 18h18'/%3E%3Ccircle cx='9' cy='6' r='2.6' fill='%23fff'/%3E%3Ccircle cx='15' cy='12' r='2.6' fill='%23fff'/%3E%3Ccircle cx='8' cy='18' r='2.6' fill='%23fff'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M3 6h18M3 12h18M3 18h18'/%3E%3Ccircle cx='9' cy='6' r='2.6' fill='%23fff'/%3E%3Ccircle cx='15' cy='12' r='2.6' fill='%23fff'/%3E%3Ccircle cx='8' cy='18' r='2.6' fill='%23fff'/%3E%3C/svg%3E");
}

/* Der Vollbild-Knopf ist ein button - Bootstrap gestaltet nur Links. */
#top-nav-bar button.nav-link,
#sub-nav-bar button.nav-link {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  color: rgba(255, 255, 255, .5);
}

#top-nav-bar button.nav-link:hover {
  color: rgba(255, 255, 255, .75);
}

/* Meldung ueber einem Formular - gleiche Rolle wie im Reporting. */
.report-alert {
  display: none;
  margin-bottom: 18px;
  padding: 12px 16px;
  border: 1px solid var(--bad);
  border-left-width: 4px;
  border-radius: var(--radius-sm);
  background: var(--bad-bg);
  color: #8c1c1c;
}

.report-alert.is-visible {
  display: block;
}

.report-alert-title {
  font-weight: 600;
}

.report-alert-detail {
  margin-top: 4px;
  font-size: 12px;
  word-break: break-word;
}

/* ------------------------------------------------------------ Amazon PII */

.card-hint {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 13px;
}

.pii-state {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.pii-changed {
  color: var(--text-muted);
  font-size: 12px;
}

.steps {
  margin: 0 0 18px;
  padding-left: 20px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.7;
}

.steps code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-alt);
  font-size: 12px;
}

/* ---------------------------------------------------------- Meine Exporte */

/* Zaehler am Knopf - wie .navigation-icon-count im Warehouse. */
#top-nav-bar .navigation-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/*
 * navigation.css bringt aus dem Warehouse
 * ".navbar .navigation-icon .navigation-icon-count { display: flex }" mit -
 * das schlaegt eine einklassige Regel. Deshalb hier dieselbe Tiefe, sonst
 * steht der leere Kreis immer da.
 */
.navbar .navigation-icon .navigation-icon-count {
  position: absolute;
  top: 2px;
  right: -2px;
  display: none;
  min-width: 16px;
  width: auto;
  height: 16px;
  margin-left: 0;
  padding: 0 4px;
  border-radius: 99px;
  background: none;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

/* Erst mit Exporten bekommt der Zaehler Farbe und Platz. */
.navbar .navigation-icon .navigation-icon-count.active {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #c9762b;
}

.navbar .navigation-icon .navigation-icon-count[hidden] {
  display: none;
}

/* Abhakliste - der Zaehler daneben nennt die unerledigten Aufgaben. */
.nav-icon-todo {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h2l1.4 1.6L10 5M13 6.5h7M4 13h2l1.4 1.6L10 12M13 13.5h7M4 20h2l1.4 1.6L10 19M13 20.5h7'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h2l1.4 1.6L10 5M13 6.5h7M4 13h2l1.4 1.6L10 12M13 13.5h7M4 20h2l1.4 1.6L10 19M13 20.5h7'/%3E%3C/svg%3E");
}

.nav-icon-download {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12M7 11l5 5 5-5M4 20h16'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12M7 11l5 5 5-5M4 20h16'/%3E%3C/svg%3E");
}

/*
 * Overlays liegen ueber der Seite, bis sie weggeklickt werden. Die Regeln hingen frueher am
 * #downloads-overlay; seit es ein zweites gibt (die Bildansicht der Artikel-Detailseite) stehen sie
 * an der Klasse, die das Markup ohnehin schon trug.
 */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: calc(var(--nav-height) + 24px) 16px 16px;
  background: rgba(31, 41, 51, .45);
}

.overlay.is-open {
  display: flex;
}

.overlay .overlay-content {
  width: 100%;
  max-width: min(1200px, 96vw);
  max-height: 78vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

/*
 * Die Bildansicht steht mittig und nimmt hoechstens die Haelfte des Fensters ein - in beide
 * Richtungen. Das Bild soll gross genug sein, um etwas zu erkennen, aber die Seite dahinter nicht
 * verdecken.
 *
 * Die Polsterung der Grundregel wird zurueckgenommen, sonst schoebe der Abstand fuer die feste
 * Kopfleiste die Karte aus der Mitte.
 */
#image-overlay {
  align-items: center;
  padding: 16px;
}

#image-overlay .overlay-content {
  width: auto;
  max-width: 50vw;
  max-height: 50vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.image-overlay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.image-overlay-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-overlay-body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: auto;
}

/* Was nach der Kopfleiste und der Polsterung uebrig bleibt - siehe .image-overlay-head. */
.image-overlay-body img {
  max-width: 100%;
  max-height: calc(50vh - 90px);
  object-fit: contain;
}

.downloads-panel {
  padding: 18px 20px;
}

.downloads-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.downloads-title {
  font-size: 17px;
  font-weight: 600;
}

.downloads-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.downloads-empty {
  margin: 0;
  color: var(--text-muted);
}

.downloads-table-scroll {
  overflow-x: auto;
}

.downloads-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.downloads-table th {
  padding: 8px 10px;
  background: var(--surface-alt);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.downloads-table td {
  padding: 9px 10px;
  border-top: 1px solid var(--border);
  vertical-align: middle;
  white-space: nowrap;
}

.downloads-table .downloads-file {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Der Name darf umbrechen - so bleibt rechts Platz fuer die Knoepfe. */
.downloads-table .downloads-name {
  max-width: 230px;
  white-space: normal;
}

.downloads-table td,
.downloads-table th {
  padding-right: 8px;
}

.downloads-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

/* Fortschrittsbalken wie .progress-line im Warehouse. */
.progress-line {
  position: relative;
  min-width: 110px;
  height: 16px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
}

.progress-line .active-progress {
  height: 100%;
  background: #c9762b;
  transition: width .3s ease;
}

.progress-line .progress-title {
  position: absolute;
  inset: 0;
  font-size: 10px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
}

.pill-open {
  background: var(--surface-alt);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.pill-done {
  background: var(--good-bg);
  color: var(--good);
}

.pill-failed {
  background: var(--bad-bg);
  color: var(--bad);
}

/* ------------------------------------------------------------------ Loader */

#loading {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  background: rgba(244, 246, 249, .78);
}

#loading[style*="flex"],
#loading[style*="block"] {
  display: flex !important;
}

#loading .loading-spinner {
  width: 42px;
  height: 42px;
  border: 3px solid rgba(87, 169, 0, .22);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: admin-spin .8s linear infinite;
}

#loading .loading-text {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

@keyframes admin-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  #loading .loading-spinner {
    animation-duration: 2.4s;
  }
}

/* --------------------------------------------------- Eingebettete Seiten */

/* Der Rahmen fuellt den Rest des Fensters, Kopf- und Untermodul-Navigation
   bleiben dabei stehen. Das eingebettete Skript selbst bleibt unveraendert. */
.embed-body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  /* Die festen Leisten liegen darueber - so viel Platz brauchen sie. */
  padding-top: calc(var(--nav-height) + var(--sub-nav-height));
}

.embed-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  padding: 7px 24px;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
}

.embed-title {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.embed-link {
  color: var(--text-muted);
  font-size: 12px;
}

.embed-link:hover {
  color: var(--brand-dark);
}

/*
 * Eingebettete Seite ohne eigene Navigation - die steht im Rahmen darueber, der Platz fuer die
 * festen Leisten wird hier also nicht gebraucht.
 */
body.embed-page .page {
  padding-top: 22px;
  padding-bottom: 28px;
}

/* Eingabefeld mit einem Knopf daneben, z. B. Datum + "heute". */
.field-with-button {
  display: flex;
  align-items: center;
  gap: 8px;
}

.field-with-button .field-input {
  flex: 1 1 auto;
  min-width: 0;
}

.field-with-button .button {
  flex: 0 0 auto;
}

/*
 * Eingabe und Schaltflaeche bleiben links beieinander, statt dass das Feld die ganze Breite
 * einnimmt und die Schaltflaeche an den rechten Rand rutscht.
 */
.field-with-button-left {
  justify-content: flex-start;
}

.field-with-button-left .field-input {
  flex: 0 1 320px;
}

/* Ein Wert, der nur angezeigt wird - sieht aus wie ein Feld, ist aber keines. */
.field-static {
  padding: 9px 0;
  font-weight: 600;
  word-break: break-word;
}

/*
 * Die Kanal-Preise stehen zugeklappt auf der Artikel-Seite - sie sind ausfuehrlich und nicht bei
 * jedem Aufruf gefragt. <details> bringt das Auf- und Zuklappen mit, dafuer braucht es kein Skript.
 */
.price-details > .price-summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  cursor: pointer;
  list-style: none;
}

.price-details > .price-summary::-webkit-details-marker {
  display: none;
}

.price-details > .price-summary::before {
  content: '▸';
  color: var(--text-muted);
}

.price-details[open] > .price-summary::before {
  content: '▾';
}

.price-details[open] > .price-summary {
  margin-bottom: 6px;
}

.price-group + .price-group {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.price-group-title {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
}

/* Bilder-Tabelle im Artikel-Detail. */
.column-check {
  width: 1%;
  text-align: center;
}

.image-thumb {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.image-table .image-name {
  font-weight: 600;
  word-break: break-word;
}

.image-table .field-input {
  min-width: 0;
}

.image-position {
  width: 84px;
}

/*
 * Ein Eingabefeld, das direkt unter einer Liste in derselben Karte steht - ohne Abstand klebte es
 * am unteren Rand der Tabelle.
 */
.form-after-list {
  margin-top: 18px;
}

/* Viele gleichrangige Schaltflaechen - sie duerfen umbrechen. */
.form-actions-wrap {
  flex-wrap: wrap;
}

.package-storno {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 190px;
}

.package-storno .field-textarea {
  min-height: 0;
}

/* Artikel-Karte der Kanal-Preise: Bild links, Angaben daneben. */
.item-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.item-card-image {
  flex: 0 0 auto;
  width: 96px;
  height: 96px;
  object-fit: contain;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.item-card-image-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  color: var(--text-muted);
  font-size: 11px;
  text-align: center;
}

.item-card-text {
  min-width: 0;
}

.item-card .card-title {
  margin-top: 0;
}

/* Filter-Auswahl ueber einer Liste - die Haken stehen nebeneinander statt untereinander. */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.filter-chips .field-check {
  margin: 0;
}

/* Suchfeld in der Leiste ueber der eingebetteten Seite. */
.embed-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

.embed-search .field-input {
  width: 100%;
  max-width: 420px;
  padding: 4px 9px;
  font-size: 13px;
}

.embed-frame {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  border: 0;
  background: var(--surface);
}

@media (max-width: 860px) {
  .embed-body {
    height: auto;
    overflow: visible;
  }

  .embed-frame {
    height: 70vh;
  }

  .embed-bar {
    padding: 7px 16px;
  }
}

/* ----------------------------------------------------------- Modul-Matrix */

.module-block {
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.module-block-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

.module-block-body {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px 18px;
  padding: 14px 16px;
}

.module-block-body:empty {
  display: none;
}

/* ------------------------------------------------------------- Responsive */

@media (max-width: 991px) {
  /* Aufgeklappt brauchen die Leisten mehr Platz als die feste Hoehe. */
  #top-nav-bar,
  #sub-nav-bar {
    height: auto;
    min-height: 50.4px;
    padding-top: .5rem;
    padding-bottom: .5rem;
  }

  #top-nav-bar {
    position: static;
  }

  #sub-nav-bar {
    position: static;
    top: auto;
  }

  .page,
  body.no-sub-navigation .page {
    padding-top: 26px;
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* ==========================================================================
   Zahlungseingaenge: erkannte Bestellnummer und Rueckmeldung
   ========================================================================== */

/* Die im Verwendungszweck erkannte Bestellnummer - siehe OrderReferenceHighlighter. */
mark.order-ref {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--brand-light);
  color: var(--brand-dark);
  font-weight: 600;
  white-space: nowrap;
  cursor: help;
}

/*
 * Rueckmeldung unten rechts. Sie liegt ueber der Seite, nimmt aber keine Klicks an - man soll
 * weiterarbeiten koennen, waehrend sie noch steht.
 */
.meldungskarte {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 10002;
  max-width: min(420px, calc(100vw - 40px));
  padding: 12px 16px;
  background: var(--surface);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.meldungskarte.is-open {
  opacity: 1;
  transform: translateY(0);
}

.meldungskarte.is-error {
  border-left-color: var(--bad);
}

@media (prefers-reduced-motion: reduce) {
  .meldungskarte {
    transition: none;
  }
}
