.skip-link {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  left: 12px;
  padding: 10px 14px;
  position: fixed;
  top: -80px;
  z-index: 100;
}
.skip-link:focus { top: 12px; }

.app-layout { min-height: 100vh; }
.navigation-rail {
  background: var(--md-sys-color-surface-container);
  bottom: 0;
  display: flex;
  height: 72px;
  justify-content: space-around;
  left: 0;
  padding: 8px;
  position: fixed;
  right: 0;
  z-index: 20;
}
.nav-item {
  align-items: center;
  border-radius: var(--md-sys-shape-corner-large);
  color: var(--md-sys-color-on-surface-variant);
  display: flex;
  flex: 1;
  flex-direction: column;
  /* Sechs Ziele muessen sich die Breite teilen; label-large sprengt auf
     schmalen Geraeten die Zelle. */
  font: var(--md-sys-typescale-label-small);
  justify-content: center;
  max-width: 96px;
  min-width: 0;
  padding-inline: 4px;
  text-decoration: none;
}
.nav-item > span:last-child {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-item[aria-current="page"],
.nav-more.is-current { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }
.nav-more { background: transparent; border: 0; cursor: pointer; }
/* Ueberzaehlige Ziele: auf schmalen Geraeten ein Menue ueber der Leiste,
   ab 600px loest der Container sich per display:contents auf und die
   Eintraege sind wieder regulaere Elemente der Seitenleiste. */
.nav-overflow {
  background: var(--md-sys-color-surface-container-high);
  border-radius: var(--md-sys-shape-corner-large);
  bottom: calc(100% + 8px);
  box-shadow: var(--md-sys-elevation-2);
  display: none;
  gap: 4px;
  min-width: 180px;
  padding: 8px;
  position: absolute;
  right: 8px;
}
.nav-overflow.is-open { display: grid; }
.nav-overflow .nav-item {
  flex-direction: row;
  font: var(--md-sys-typescale-label-large);
  gap: 12px;
  justify-content: flex-start;
  max-width: none;
  min-height: 48px;
  padding-inline: 12px;
}
.app-content { min-width: 0; padding-bottom: 80px; }
.top-app-bar {
  align-items: center;
  background: color-mix(in srgb, var(--md-sys-color-surface) 92%, transparent);
  display: flex;
  justify-content: space-between;
  min-height: 84px;
  padding: 12px 20px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.top-app-bar h1 {
  font: var(--md-sys-typescale-title-medium);
  margin: 0;
  white-space: nowrap;
}
.top-app-bar .eyebrow { white-space: nowrap; }
.top-app-actions { align-items: center; display: flex; gap: 8px; }
/* Auf schmalen Geraeten weichen Anzeigename und Wort "Auftraege": beide
   sind ueber aria-label weiterhin zugaenglich, das Avatar-Kuerzel bzw. das
   Icon bleiben sichtbar. */
.user-name, .job-center-label { display: none; }
.job-center-trigger { padding-inline: 12px; }
.eyebrow { color: var(--md-sys-color-primary); font: var(--md-sys-typescale-label-large); text-transform: uppercase; }
#app-main { margin: 0 auto; max-width: 1480px; padding: 24px 16px; }
.page-header { align-items: end; display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; margin-bottom: 24px; }
.page-header h2 { font: var(--md-sys-typescale-headline-medium); margin: 0; }
.page-header-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 12px; }
.view-toggle {
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-large);
  display: flex;
  overflow: hidden;
}
.view-toggle-option {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--md-sys-color-on-surface-variant);
  cursor: pointer;
  display: flex;
  padding: 8px 14px;
}
.view-toggle-option:hover { background: var(--md-sys-color-surface-container); }
.view-toggle-option[aria-pressed="true"] {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}

.environment-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
/* Der Modus steht in der Kopfzeile der Karte mit. prod ist der Ausnahmefall
   und deshalb hervorgehoben; dev bleibt neutral, damit die Karte nicht
   durchgehend bunt ist. */
.app-env-badge {
  border-radius: var(--md-sys-shape-corner-extra-small);
  font: var(--md-sys-typescale-label-small);
  letter-spacing: 0.06em;
  padding: 2px 6px;
}
.app-env-badge[data-app-env="dev"] {
  background: var(--md-sys-color-surface-container-highest);
  color: var(--md-sys-color-on-surface-variant);
}
.app-env-badge[data-app-env="prod"] {
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}
/* Listenansicht: eine Zeile je Umgebung. Rein visuell - das Karten-Markup
   ist in beiden Ansichten identisch.
   Bewusst Flex mit Umbruch statt fester Spalten: die Aktionsleiste ist je
   nach Berechtigung unterschiedlich breit und wuerde in einer starren
   Spalte den Kopfbereich zusammenquetschen. */
.environment-grid[data-view="list"] { gap: 12px; grid-template-columns: 1fr; }
.environment-grid[data-view="list"] .environment-card {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}
.environment-grid[data-view="list"] .environment-card > header {
  flex: 1 1 260px;
}
.environment-grid[data-view="list"] .environment-card > p {
  flex: 0 0 auto;
  margin: 0;
}
.environment-grid[data-view="list"] .environment-job-status {
  flex: 1 1 220px;
  margin: 0;
}
.environment-grid[data-view="list"] .card-actions {
  margin-left: auto;
  margin-top: 0;
}
.content-grid { display: grid; gap: 16px; }
.creation-panel { margin-bottom: 20px; position: relative; }
/* Der Weg zur Bestandsseite steht neben der Ueberschrift, nicht zwischen
   den Feldern: er fuehrt aus dem Formular heraus, nicht durch es hindurch. */
.blueprint-open { position: absolute; right: 16px; top: 12px; }
.blueprint-summary { color: var(--md-sys-color-on-surface-variant); margin: 0; }
.blueprint-hint {
  color: var(--md-sys-color-on-surface-variant);
  font: var(--md-sys-typescale-body-medium);
  margin: 8px 0 0;
}
/* Feste Spaltenzahl statt auto-fit: mit minmax(190px, 1fr) entstanden auf
   breiten Schirmen sieben Spalten, von denen die drei Felder drei belegten.
   Der Rest blieb leer - daher die grosse Flaeche rechts neben PHP. */
.creation-form {
  /* Oben ausgerichtet, nicht unten: das Kurznamen-Feld haelt unter der
     Eingabe eine Zeile fuer den Hinweis frei und ist dadurch hoeher als die
     beiden Auswahlfelder. Am unteren Rand ausgerichtet rutschten die
     anderen beiden um genau diese Zeile nach unten. */
  align-items: start;
  display: grid;
  gap: 14px 16px;
  grid-template-columns: minmax(0, 1fr);
}
/* Eigene Zeile statt Rasterspalte: "Umgebung anlegen" passt in keiner
   Breite in eine 190px-Spalte und brach sonst mitten im Wort um. */
.creation-form .create-environment-submit {
  grid-column: 1 / -1;
  justify-self: stretch;
}
.settings-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
/* Karten sind gleich hoch; ohne das haengen die Aktionen je nach Textmenge
   auf unterschiedlicher Hoehe und die Spalten wirken unruhig. Abstaende
   kommen hier vom Flex-Gap, deshalb die Eigenabstaende zuruecksetzen.
   Bewusst nur auf dieser Seite: andere Karten (Plugins, Anlege-Formular)
   verlassen sich auf die Standardabstaende ihrer Ueberschrift. */
.settings-grid .surface-card { display: flex; flex-direction: column; gap: 14px; }
.settings-grid .surface-card > h3,
.settings-grid .surface-card > p { margin: 0; }
.settings-grid .surface-card > .card-actions,
.settings-grid .surface-card > form { margin-top: auto; }
.settings-grid .surface-card > .card-actions { margin-bottom: 0; }
.settings-grid .surface-card > form { display: grid; gap: 14px; }
.plugin-upload-form {
  align-items: end;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(240px, 1.2fr) minmax(240px, 1fr) auto;
  margin-bottom: 20px;
}
.plugin-upload-form h3, .plugin-upload-form p { margin: 0; }
.plugin-upload-form p { color: var(--md-sys-color-on-surface-variant); margin-top: 6px; }
.plugin-replace-option { align-items: center; display: flex; gap: 10px; grid-column: 2; }
.plugin-grid {
  display: grid;
  gap: 16px;
  /* Eine Versionszeile traegt Version, Groesse, Datum und zwei
     Schaltflaechen nebeneinander. Unter 520px reicht die Breite dafuer nicht
     und die Meta-Zeile bricht zwischen Datum und Uhrzeit um. */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr));
  /* Ohne dies dehnt jede Karte sich auf die Hoehe der groessten ihrer Zeile.
     Ein Plugin mit einer Version bekam so den Leerraum eines Plugins mit
     mehreren. */
  align-items: start;
}
.plugin-card > header {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: auto 1fr;
}
.plugin-card h3, .plugin-card code { margin: 0; }
.plugin-card code { color: var(--md-sys-color-on-surface-variant); }
.plugin-versions { margin-top: 20px; }
.plugin-versions summary { cursor: pointer; font-weight: 700; }
.plugin-version-list { display: grid; gap: 8px; margin-top: 12px; }
.plugin-version-row {
  align-items: center;
  background: var(--md-sys-color-surface-container-low);
  border-radius: var(--md-sys-shape-corner-medium);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px;
}
/* Der Textblock blieb sonst auf Inhaltsbreite stehen, statt den Platz zu
   nutzen, den die Schaltflaechen uebrig lassen. */
.plugin-version-row > div:first-child { flex: 1; min-width: 0; }
/* .card-actions bringt einen Abstand von oben mit, der fuer eine eigene
   Aktionszeile am Kartenfuss gedacht ist. In der Versionszeile stehen die
   Schaltflaechen neben dem Text und wurden dadurch nach unten versetzt. */
.plugin-version-row .card-actions { flex-wrap: nowrap; margin-top: 0; }
.plugin-version-row small {
  color: var(--md-sys-color-on-surface-variant);
  display: block;
  margin-top: 3px;
}
.plugin-choices {
  border: 0;
  border-top: 1px solid var(--md-sys-color-outline-variant);
  grid-column: 1 / -1;
  margin: 4px 0 0;
  min-width: 0;
  padding: 0;
}
.plugin-choices summary {
  align-items: center;
  color: var(--md-sys-color-on-surface-variant);
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  font: var(--md-sys-typescale-label-large);
  gap: 4px 16px;
  justify-content: space-between;
  min-height: 48px;
  padding: 8px 4px;
}
/* Der Zaehler rutscht auf schmalen Geraeten in die naechste Zeile, statt
   die Beschriftung zeichenweise umzubrechen. */
.plugin-selection-meta { white-space: nowrap; }
.plugin-choices summary::marker {
  color: var(--md-sys-color-primary);
}
/* Chevron als Rahmen gezeichnet, damit dafuer keine Icon-Font noetig ist. */
.plugin-choices summary::after {
  border-bottom: 2px solid currentColor;
  border-right: 2px solid currentColor;
  content: "";
  height: 8px;
  margin-bottom: 4px;
  transform: rotate(45deg);
  transition: transform 160ms ease;
  width: 8px;
}
.plugin-choices[open] summary::after {
  margin-bottom: 0;
  transform: rotate(225deg);
}
.plugin-selection-meta {
  color: var(--md-sys-color-primary);
  font-weight: 600;
  margin-left: auto;
  text-align: right;
}
.plugin-choices-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding: 4px 2px 8px;
}
/* Bewusst kein .field-Container: die generische Regel .field input erzwingt
   min-height 56px und width 100% und macht aus der Checkbox einen Block. */
/* Steht unter dem Kurznamen und meldet einen bereits vergebenen Slug, bevor
   das Formular abgeschickt wird. */
.slug-hint {
  color: var(--md-sys-color-error);
  display: block;
  margin-top: 2px;
  min-height: 1.2em;
}
/* Eigene Zeile unter den Feldern, linksbuendig. Als Rasterspalte stand der
   Knopf zwischen Shopware und PHP und riss die Zeile auseinander. */
.catalog-refresh {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: -4px;
  min-height: 32px;
  padding-inline: 0;
}
/* Einzeilige Beschriftung: mittig ausgerichtet. Der Versatz oben war fuer
   die frueher zweizeilige Fassung noetig, damit das Kaestchen auf Hoehe der
   ersten Zeile sass. */
.app-env-choice {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-column: 1 / -1;
  grid-template-columns: 18px minmax(0, 1fr);
}
.app-env-choice input {
  height: 18px;
  margin: 0;
  width: 18px;
}
.plugin-choice {
  align-items: center;
  background: var(--md-sys-color-surface-container-low);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-medium);
  display: grid;
  flex: 0 1 420px;
  gap: 10px;
  grid-template-columns: 18px minmax(0, 1fr) 104px;
  min-width: 0;
  padding: 8px 10px;
}
.plugin-choice-name {
  overflow-wrap: anywhere;
}
.plugin-choice-checkbox {
  appearance: auto;
  height: 18px;
  margin: 0;
  min-height: 0;
  padding: 0;
  width: 18px;
}
.plugin-choice select {
  background: var(--md-sys-color-surface-container-highest);
  border: 0;
  border-bottom: 2px solid var(--md-sys-color-on-surface-variant);
  color: var(--md-sys-color-on-surface);
  height: 40px;
  min-width: 0;
  padding: 0 8px;
  width: 104px;
}
.plugin-icon {
  align-items: center;
  background: var(--md-sys-color-primary-container);
  border-radius: var(--md-sys-shape-corner-medium);
  color: var(--md-sys-color-on-primary-container);
  display: flex;
  font-size: 1.65rem;
  height: 48px;
  justify-content: center;
  width: 48px;
}
.plugin-meta { display: grid; gap: 8px; margin: 20px 0 0; }
.plugin-meta div {
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  display: flex;
  justify-content: space-between;
}
.plugin-meta dt { color: var(--md-sys-color-on-surface-variant); }
.plugin-meta dd { margin: 0; }
.plugin-environment-list { display: grid; gap: 10px; margin-top: 20px; }
.plugin-environment-row {
  align-items: center;
  background: var(--md-sys-color-surface-container-low);
  border-radius: var(--md-sys-shape-corner-large);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 16px;
}
.plugin-environment-row h3, .plugin-environment-row p { margin: 0; }
.plugin-environment-row p { color: var(--md-sys-color-on-surface-variant); margin-top: 4px; }
.job-sheet-scrim {
  background: rgb(0 0 0 / 35%);
  inset: 0;
  position: fixed;
  z-index: 44;
}
.job-sheet {
  background: var(--md-sys-color-surface-container);
  box-shadow: var(--md-sys-elevation-2);
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-width: 460px;
  padding: 24px;
  position: fixed;
  right: 0;
  top: 0;
  width: min(94vw, 460px);
  z-index: 45;
}
.job-sheet > header {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
}
.job-sheet h2 { margin: 0; }
.job-list { display: grid; gap: 12px; margin-top: 20px; overflow-y: auto; }
.job-entry {
  background: var(--md-sys-color-surface-container-high);
  border-radius: var(--md-sys-shape-corner-large);
  display: grid;
  gap: 10px;
  padding: 16px;
}
.job-entry > header { align-items: flex-start; display: flex; gap: 12px; justify-content: space-between; }
.job-entry > header div { display: grid; gap: 2px; }
.job-entry p, .job-entry time, .job-entry small { margin: 0; }
.job-entry pre { margin: 0; max-height: 160px; overflow: auto; white-space: pre-wrap; }
.blocked-addresses { margin-bottom: 16px; }
.blocked-addresses h3 { margin: 0 0 10px; }
.blocked-addresses ul { list-style: none; margin: 0; padding: 0; }
.blocked-addresses li {
  align-items: center;
  border-top: 1px solid var(--md-sys-color-outline-variant);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 0;
}
.blocked-addresses li:first-child { border-top: 0; }
.blocked-addresses small {
  color: var(--md-sys-color-on-surface-variant);
  margin-inline-start: auto;
}
.job-error { color: var(--md-sys-color-error); }
/* Teilerfolg: der Auftrag ist geglueckt, einzelne Plugins fehlen. Bewusst
   die Warnfarbe statt der Fehlerfarbe - die Umgebung ist benutzbar. */
.job-partial {
  background: var(--md-sys-color-warning-container);
  border-radius: var(--md-sys-shape-corner-small);
  color: var(--md-sys-color-on-warning-container);
  margin-top: 8px;
  padding: 8px 10px;
}
.job-partial ul { margin: 6px 0 0; padding-left: 18px; }
.job-partial li { margin-top: 4px; }
.job-partial small { display: block; opacity: 0.85; }
.job-progress {
  background: var(--md-sys-color-primary-container);
  border-radius: 2px;
  height: 5px;
  overflow: hidden;
}
.job-progress span { background: var(--md-sys-color-primary); display: block; height: 100%; }
.job-count { font: var(--md-sys-typescale-label-small); }
.environment-job-status {
  align-items: center;
  background: var(--md-sys-color-secondary-container);
  border: 0;
  border-radius: var(--md-sys-shape-corner-medium);
  color: var(--md-sys-color-on-secondary-container);
  cursor: pointer;
  display: flex;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  text-align: left;
  width: 100%;
}
.environment-job-status > span:last-child { display: grid; gap: 2px; }

.app-footer {
  color: var(--md-sys-color-on-surface-variant);
  display: flex;
  flex-wrap: wrap;
  font: var(--md-sys-typescale-body-medium);
  gap: 2px 16px;
  justify-content: center;
  margin: 0 auto;
  max-width: 1480px;
  padding: 4px 16px 20px;
  text-align: center;
}
.app-footer .app-version,
.app-footer .app-release { white-space: nowrap; }
.app-footer a.app-version { color: inherit; text-decoration: underline dotted; }
.app-footer a.app-version:hover { color: var(--md-sys-color-primary); }

/* Changelog: eine Spalte aus Karten, neueste oben. Die Zaehlpunkte der
   Liste sind hier ohne Wert - die Nummer steht in der Ueberschrift. */
.changelog { display: grid; gap: 16px; list-style: none; margin: 0; padding: 0; }
.changelog-entry { display: grid; gap: 12px; }
.changelog-head { align-items: center; display: flex; flex-wrap: wrap; gap: 12px; }
.changelog-head h3 { font: var(--md-sys-typescale-title-large); margin: 0; }
.changelog-head time {
  color: var(--md-sys-color-on-surface-variant);
  font: var(--md-sys-typescale-body-medium);
  margin-inline-start: auto;
}
.changelog-summary { color: var(--md-sys-color-on-surface-variant); margin: 0; }
.changelog-section { display: grid; gap: 6px; }
.changelog-section h4 {
  color: var(--md-sys-color-primary);
  font: var(--md-sys-typescale-label-large);
  margin: 0;
  text-transform: uppercase;
}
.changelog-section ul { margin: 0; padding-inline-start: 20px; }
.changelog-section li { margin-block: 2px; }

.auth-page {
  background:
    radial-gradient(circle at 10% 10%, color-mix(in srgb, var(--md-sys-color-primary-container) 70%, transparent), transparent 38%),
    var(--md-sys-color-surface);
  /* Spaltenfluss, damit der Footer unter der zentrierten Karte sitzt statt
     unter den Viewport-Rand zu rutschen. */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.auth-layout {
  display: grid;
  flex: 1;
  gap: 32px;
  margin: 0 auto;
  max-width: 1080px;
  padding: 32px 20px;
  place-content: center;
  width: 100%;
}
.auth-brand { max-width: 440px; }
.auth-brand h1 { font: 600 2.8rem/1.05 system-ui, sans-serif; margin: 8px 0 16px; }
.auth-mark { color: var(--md-sys-color-primary); height: 3.5rem; width: 3.5rem; }
.auth-card {
  background: var(--md-sys-color-surface-container-lowest);
  border-radius: var(--md-sys-shape-corner-extra-large);
  box-shadow: var(--md-sys-elevation-2);
  padding: 28px;
  width: min(100%, 460px);
}
.auth-card h2 { font: var(--md-sys-typescale-headline-medium); margin: 4px 0 24px; }
.auth-card form { display: grid; gap: 18px; }
.auth-card .md-filled-button { justify-self: start; }

@media (min-width: 600px) {
  .app-layout { display: grid; grid-template-columns: 88px minmax(0, 1fr); }
  /* Die Leiste steht jetzt links, unten ist wieder Platz. */
  .report-fab { bottom: 24px; right: 24px; }
  .navigation-rail {
    align-items: center;
    bottom: auto;
    flex-direction: column;
    gap: 8px;
    height: 100vh;
    justify-content: flex-start;
    padding: 96px 8px 16px;
    right: auto;
    top: 0;
    width: 88px;
  }
  .nav-item { flex: 0 0 64px; width: 72px; }
  .nav-more { display: none; }
  .nav-overflow, .nav-overflow.is-open {
    display: contents;
  }
  .nav-overflow .nav-item {
    flex-direction: column;
    font: var(--md-sys-typescale-label-small);
    gap: 0;
    justify-content: center;
    max-width: 96px;
    padding-inline: 4px;
  }
  .top-app-bar h1 { font: var(--md-sys-typescale-title-large); }
  .top-app-actions { gap: 10px; }
  .platform-tab > span { display: inline; }
  .user-name, .job-center-label { display: inline; }
  .job-center-trigger { padding-inline: 24px; }
  .creation-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .creation-form .create-environment-submit { justify-self: start; }
  .app-content { grid-column: 2; padding-bottom: 0; }
  #app-main { padding: 32px; }
  .auth-layout { grid-template-columns: minmax(280px, 1fr) minmax(360px, 460px); padding: 48px; }
}

@media (min-width: 900px) {
  /* Drei Felder, drei Spalten - sie teilen sich die volle Breite der Karte
     statt in einem Teil davon zu kleben. */
  .creation-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* Unter der Versionsauswahl statt am linken Rand: so ist erkennbar,
     worauf sich "Versionen aktualisieren" bezieht. */
  .catalog-refresh { grid-column: 2; justify-self: start; }
}

@media (max-width: 840px) {
  .plugin-upload-form { grid-template-columns: 1fr; }
  .plugin-replace-option { grid-column: 1; }
}

@media (min-width: 1200px) {
  .app-layout { grid-template-columns: 280px minmax(0, 1fr); }
  .navigation-rail { align-items: stretch; padding: 112px 16px 24px; width: 280px; }
  /* label-small sind 11px - gewaehlt fuer die Bottom-Bar am Handy, wo sich
     sechs Ziele die Breite teilen. Hier ist die Leiste 280px breit, der
     Grund entfaellt und die Beschriftungen waren nur schwer zu lesen. */
  .nav-item { flex: 0 0 56px; flex-direction: row; font: var(--md-sys-typescale-label-large); gap: 16px; justify-content: flex-start; max-width: none; padding: 0 20px; width: auto; }
  /* Die Icons haengen ueber 1.25em an der Schriftgroesse. Bei 14px Text
     waeren sie 17px und wirkten neben der Beschriftung verloren. */
  .nav-item .icon { height: 24px; width: 24px; }
  /* ".nav-overflow .nav-item" aus dem 600px-Block ist spezifischer als
     ".nav-item" und wuerde die Spalten-Variante sonst auch in der breiten
     Leiste erzwingen. */
  .nav-overflow .nav-item { flex-direction: row; font: var(--md-sys-typescale-label-large); gap: 16px; justify-content: flex-start; max-width: none; padding-inline: 20px; }
  #app-main { padding: 40px 48px; }
}

/* Die Auswahl nach der Anmeldung. Bewusst grosse Ziele: es sind wenige, und
   sie sind der Einstieg in alles Weitere. */
.platform-picker {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
}
.platform-card {
  align-items: center;
  background: var(--md-sys-color-surface-container-low);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-large);
  color: inherit;
  cursor: pointer;
  display: grid;
  gap: 16px;
  grid-template-columns: 24px minmax(0, 1fr) 20px;
  padding: 20px;
  text-align: left;
  width: 100%;
}
.platform-card:hover { background: var(--md-sys-color-surface-container); }
.platform-card strong {
  display: block;
  font: var(--md-sys-typescale-title-medium);
}
.platform-card small { color: var(--md-sys-color-on-surface-variant); }
/* Alle Systeme nebeneinander in der Kopfzeile. Ein Segment ist ein Link,
   kein Knopf: Adresse sichtbar, mittlere Maustaste oeffnet einen Tab. */
.platform-tabs {
  background: var(--md-sys-color-surface-container-high);
  border-radius: var(--md-sys-shape-corner-large);
  display: flex;
  gap: 2px;
  padding: 3px;
}
.platform-tab {
  align-items: center;
  border-radius: calc(var(--md-sys-shape-corner-large) - 3px);
  color: var(--md-sys-color-on-surface-variant);
  display: flex;
  font: var(--md-sys-typescale-label-large);
  gap: 8px;
  padding: 7px 14px;
  text-decoration: none;
  white-space: nowrap;
}
.platform-tab:hover { background: var(--md-sys-color-surface-container-highest); }
.platform-tab[aria-current="page"] {
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}
/* Auf schmalen Geraeten bleibt nur das Symbol - die Kopfzeile traegt daneben
   noch Auftraege und Benutzer. */
.platform-tab > span { display: none; }

@media (min-width: 700px) {
  .platform-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Kundenzugaenge. Der frisch erzeugte Link steht abgesetzt: er erscheint
   genau einmal, und das soll man sehen. */
.guest-fresh {
  border: 1px solid var(--md-sys-color-primary);
  border-radius: var(--md-sys-shape-corner-medium);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  background: var(--md-sys-color-surface-container-high);
}

.guest-fresh code {
  display: block;
  overflow-wrap: anywhere;
  margin: 0.5rem 0;
  font-size: 0.8125rem;
}

.guest-form {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 1rem;
}

@media (max-width: 40rem) {
  .guest-form {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

.guest-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.guest-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border-radius: var(--md-sys-shape-corner-small);
  background: var(--md-sys-color-surface-container);
}

.guest-row span {
  display: block;
  font: var(--md-sys-typescale-label-small);
}

.guest-expired {
  opacity: 0.6;
}

/* Die Karte zeigt vorn nur, was man staendig braucht. Der Rest klappt auf -
   mit neun Knoepfen nebeneinander fand man vorher nichts wieder. */
.card-actions {
  position: relative;
}

.card-more-toggle {
  margin-left: auto;
}

.card-actions-more {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--md-sys-color-outline-variant);
}

.card-actions-more[hidden] {
  display: none;
}

/* Speicheruebersicht in den Einstellungen. */
.storage-report {
  list-style: none;
  margin: 0.5rem 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.storage-report label {
  display: flex;
  gap: 0.75rem;
  align-items: start;
  cursor: pointer;
}

.storage-report small {
  display: block;
  color: var(--md-sys-color-on-surface-variant);
  font: var(--md-sys-typescale-label-small);
}

.storage-report input:disabled + span {
  opacity: 0.5;
}

/* Der Stack traegt seine Erklaerung unter dem Feld: die Wahl zwischen vier
   Baukaesten ist ohne sie eine Wahl zwischen vier Namen. */
.stack-summary {
  color: var(--md-sys-color-on-surface-variant);
  font: var(--md-sys-typescale-body-medium);
  grid-column: 1 / -1;
  margin: 0;
}
/* Das Repo ist freiwillig und steht deshalb zugeklappt. */
.creation-details { grid-column: 1 / -1; }
.creation-details > summary {
  color: var(--md-sys-color-primary);
  cursor: pointer;
  font: var(--md-sys-typescale-label-large);
  margin-bottom: 8px;
}
.creation-details .field { margin-bottom: 12px; }
.creation-actions { grid-column: 1 / -1; }

/* Auswahl und der Weg daneben, wenn keine davon passt. Auf schmalen
   Schirmen bricht der Knopf unter das Feld statt es zu quetschen. */
.field-with-action {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}
.field-with-action > select { flex: 1 1 200px; }

/* "Passwort vergessen?" steht unter dem Fehlerplatz und vor dem Knopf -
   dort sucht man es, wenn die Anmeldung gerade gescheitert ist. */
.auth-aside { margin: 0 0 8px; text-align: right; }
.auth-actions { display: flex; gap: 8px; justify-content: flex-end; }
.form-hint { color: var(--md-sys-color-on-surface-variant); margin: 8px 0; }

/* Logfenster: die Ausgabe ist das Fenster, nicht ein Absatz darin. */
.log-dialog { display: flex; flex-direction: column; max-height: 86vh; }
.log-dialog-header {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: space-between;
}
.log-dialog .standalone-output { flex: 1; min-height: 40vh; overflow: auto; }
.log-follow { align-items: center; display: flex; gap: 6px; }
.log-status {
  color: var(--md-sys-color-on-surface-variant);
  font: var(--md-sys-typescale-body-medium);
  margin-right: auto;
}

.card-storage { color: var(--md-sys-color-on-surface-variant); }

/* Melden steht fest in der unteren rechten Ecke - der Platz, an dem man
   so etwas sucht. Auf schmalen Geraeten liegt darunter die Navigations-
   leiste (72px hoch), deshalb der groessere Abstand; ab 600px wandert sie
   an den linken Rand und der Abstand darf kleiner werden.
   z-index 25: ueber dem Inhalt und der Kopfleiste (10), aber unter Dialogen
   (30/40) und der Meldung unten (44) - ein Knopf gehoert nicht ueber einen
   offenen Dialog. */
.report-fab {
  align-items: flex-end;
  bottom: 88px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: fixed;
  right: 16px;
  z-index: 25;
}
.report-fab button {
  border-radius: 999px;
  box-shadow: var(--md-sys-elevation-2);
  gap: 8px;
  padding: 12px 20px;
}
.report-fab button[data-report-open="bug"] {
  background: var(--md-sys-color-error-container);
  color: var(--md-sys-color-on-error-container);
}
.report-fab button[data-report-open="feature"] {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}

/* Meldungen: zwei Gruppen, offen und erledigt. Erledigtes bleibt lesbar,
   tritt aber zurueck - durchgestrichen waere es kaum noch zu entziffern. */
.report-group { margin-bottom: 16px; }
.report-group h3 { margin: 0 0 12px; }
.report-list { display: grid; gap: 8px; list-style: none; margin: 0; padding: 0; }
.report {
  align-items: center;
  background: var(--md-sys-color-surface-container);
  border-radius: var(--md-sys-shape-corner-medium);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 12px;
}
.report-body { flex: 1 1 260px; min-width: 0; }
.report-message { margin: 0; overflow-wrap: anywhere; }
.report-body small { color: var(--md-sys-color-on-surface-variant); }
.report-kind {
  align-items: center;
  border-radius: var(--md-sys-shape-corner-small);
  display: flex;
  height: 32px;
  justify-content: center;
  width: 32px;
}
.report-kind[data-kind="bug"] {
  background: var(--md-sys-color-error-container);
  color: var(--md-sys-color-on-error-container);
}
.report-kind[data-kind="feature"] {
  background: var(--md-sys-color-success-container);
  color: var(--md-sys-color-on-success-container);
}
/* Abgehakt: die Meldung tritt zurueck und traegt ein Haekchen. */
.report.is-done { opacity: 0.72; }
.report.is-done .report-message { text-decoration: line-through; }
.report.is-done .report-kind {
  background: var(--md-sys-color-surface-container-highest);
  color: var(--md-sys-color-on-surface-variant);
}

/* Auf sehr schmalen Geraeten nur die Symbole: zwei Beschriftungen nebst
   Leiste sprengen sonst die Breite. Die Bedeutung bleibt ueber aria-label. */
@media (max-width: 30rem) {
  .report-fab button { padding: 12px; }
  .report-fab button > span { display: none; }
}

/* Ablagefeld fuer den Screenshot. Gestrichelt, weil es eine Flaeche zum
   Fallenlassen ist und kein Knopf. */
.report-drop {
  border: 1px dashed var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-corner-medium);
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 12px;
  text-align: center;
}
.report-drop.is-over {
  background: var(--md-sys-color-secondary-container);
  border-style: solid;
}
.report-drop-hint { color: var(--md-sys-color-on-surface-variant); margin: 0; }
.report-drop kbd {
  background: var(--md-sys-color-surface-container-highest);
  border-radius: 4px;
  font: var(--md-sys-typescale-label-small);
  padding: 2px 6px;
}
.report-preview {
  border-radius: var(--md-sys-shape-corner-small);
  max-height: 220px;
  max-width: 100%;
}
/* In der Liste nur ein Daumennagel; gross wird er im neuen Tab. */
.report-shot img {
  border-radius: var(--md-sys-shape-corner-small);
  display: block;
  max-height: 56px;
  max-width: 96px;
  object-fit: cover;
}

/* ---- Rueckmeldung und Bewegung -------------------------------------- */

/* Der Balken auf der Karte. Die Breite wandert weich mit, statt zu
   springen: dieselbe Zahl, aber man sieht, dass es vorangeht. */
.environment-job-status { gap: 12px; }
.environment-job-text { display: grid; flex: 1; gap: 6px; min-width: 0; }
.environment-job-text strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.environment-job-bar {
  background: color-mix(in srgb, var(--md-sys-color-primary) 22%, transparent);
  border-radius: 999px;
  display: block;
  height: 6px;
  overflow: hidden;
  position: relative;
}
.environment-job-bar > span {
  background: var(--md-sys-color-primary);
  border-radius: 999px;
  display: block;
  height: 100%;
  transition: width 350ms cubic-bezier(0.2, 0, 0, 1);
}
/* Kein bekannter Fortschritt: ein wanderndes Stueck statt einer falschen
   Zahl. */
.environment-job-bar.is-indeterminate > span {
  animation: job-sweep 1.4s infinite cubic-bezier(0.4, 0, 0.2, 1);
  width: 40%;
}
@keyframes job-sweep {
  from { transform: translateX(-110%); }
  to { transform: translateX(260%); }
}
.environment-job-percent {
  font: var(--md-sys-typescale-title-medium);
  font-variant-numeric: tabular-nums;
  min-width: 3.5ch;
  text-align: right;
}
/* Solange etwas laeuft, atmet das Symbol leicht - so unterscheidet sich
   "arbeitet" von "steht". */
.environment-job-status .icon {
  animation: job-breathe 2s infinite ease-in-out;
}
@keyframes job-breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* Karten heben sich beim Ueberfahren leicht an und geben beim Druecken
   nach - genug, um sich anfassbar anzufuehlen, zu wenig zum Auffallen. */
.environment-card {
  transition: box-shadow 200ms ease, transform 200ms ease;
}
.environment-card:hover { box-shadow: var(--md-sys-elevation-2); }
.md-filled-button, .md-tonal-button, .md-outlined-button, .md-text-button {
  transition: box-shadow 150ms ease, transform 120ms ease, opacity 150ms ease;
}
.md-filled-button:active, .md-tonal-button:active,
.md-outlined-button:active, .md-text-button:active { transform: scale(0.97); }
/* Ein gesperrter Knopf soll nicht nachgeben - sonst sieht es aus, als
   haette der Klick etwas bewirkt. */
button:disabled:active { transform: none; }

/* Der Fortschrittsbalken im Auftragsfenster bewegt sich ebenso weich. */
.job-progress span { transition: width 350ms cubic-bezier(0.2, 0, 0, 1); }

/* Hub: die Uebersicht nach der Anmeldung. Gleicher Hintergrund wie die
   Anmeldung, damit der Schritt dazwischen nicht wie ein Seitenwechsel in
   eine andere Anwendung wirkt. */
.hub-layout {
  display: grid;
  flex: 1;
  gap: 24px;
  margin: 0 auto;
  max-width: 880px;
  padding: 32px 16px;
  align-content: start;
  width: 100%;
}
.hub-header {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
}
.hub-header h1 { font: 600 2.2rem/1.1 system-ui, sans-serif; margin: 4px 0 0; }
.hub-user { align-items: center; display: flex; gap: 10px; }
.hub-avatar {
  align-items: center;
  background: var(--md-sys-color-primary-container);
  border-radius: 50%;
  color: var(--md-sys-color-on-primary-container);
  display: inline-flex;
  font: var(--md-sys-typescale-label-large);
  height: 32px;
  justify-content: center;
  width: 32px;
}
.hub-lead { color: var(--md-sys-color-on-surface-variant); margin: 0; }
.hub-tiles {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
}
.hub-tile {
  align-items: center;
  background: var(--md-sys-color-surface-container-lowest);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-extra-large);
  color: inherit;
  display: grid;
  gap: 16px;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  padding: 24px;
  text-decoration: none;
}
.hub-tile .icon { color: var(--md-sys-color-primary); height: 32px; width: 32px; }
.hub-tile strong { display: block; font: var(--md-sys-typescale-title-medium); }
.hub-tile small { color: var(--md-sys-color-on-surface-variant); }
a.hub-tile:hover { background: var(--md-sys-color-surface-container); }
a.hub-tile:focus-visible { outline: 3px solid var(--md-sys-color-primary); outline-offset: 2px; }
.hub-tile.is-disabled { opacity: .6; }
.hub-tile.is-disabled .icon { color: var(--md-sys-color-on-surface-variant); }
.hub-badge {
  background: var(--md-sys-color-surface-container-high);
  border-radius: 999px;
  font: var(--md-sys-typescale-label-small);
  padding: 4px 10px;
}
.hub-back { color: inherit; text-decoration: none; }
.hub-back:hover { text-decoration: underline; }
@media (min-width: 600px) {
  .hub-layout { padding: 48px 32px; }
  .hub-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
