:root {
  --fm-bg: #f3f6f4;
  --fm-card-bg: #ffffff;
  --fm-text: #182620;
  --fm-text-muted: #5c6d65;
  --fm-border: #dde5e0;
  --fm-accent: #2e7d4f;
  --fm-accent-strong: #1f6b40;
  --fm-accent-soft: #e7f3ec;
  --fm-accent-text: #ffffff;
  --fm-danger: #b3422e;
  --fm-danger-bg: #fdecea;
  --fm-warn: #9a6600;
  --fm-warn-bg: #fdf6e3;

  --fm-warn-solid: #d9970c;
  --fm-info: #2563a8;
  --fm-info-bg: #eaf1fb;
  --fm-off-bg: #eef1ef;

  --fm-tier-silver: #5f6b76;
  --fm-tier-silver-bg: #eef1f4;
  --fm-tier-gold: #8a6a00;
  --fm-tier-gold-bg: #fbf1d3;

  --fm-tunnel: #7c3aed;
  --fm-tunnel-text: #ffffff;

  --fm-alarm-hoch: #c2531f;
  --fm-shadow: 0 1px 2px rgba(15, 30, 20, 0.06), 0 4px 14px rgba(15, 30, 20, 0.05);
  --fm-radius: 10px;
  --fm-radius-sm: 7px;
  --fm-sans: "IBM Plex Sans", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --fm-mono: "IBM Plex Mono", "SF Mono", Menlo, Consolas, monospace;
  --fm-trans: 0.15s ease;
}

body.fm-dark {
  --fm-bg: #0f1a14;
  --fm-card-bg: #16241d;
  --fm-text: #e7f0ea;
  --fm-text-muted: #90a89b;
  --fm-border: #28392f;
  --fm-accent: #45b876;
  --fm-accent-strong: #5fca8a;
  --fm-accent-soft: #1a2e23;
  --fm-accent-text: #06150e;
  --fm-danger: #e0725f;
  --fm-danger-bg: #3a2420;
  --fm-warn: #e0b23e;
  --fm-warn-bg: #362c15;
  --fm-warn-solid: #f0c04b;
  --fm-info: #6badea;
  --fm-info-bg: #1c2c3d;
  --fm-off-bg: #1b2921;
  --fm-tier-silver: #b7c1c9;
  --fm-tier-silver-bg: #232c33;
  --fm-tier-gold: #e6c15a;
  --fm-tier-gold-bg: #3d3315;
  --fm-tunnel: #9d6bf0;
  --fm-tunnel-text: #140a2e;
  --fm-alarm-hoch: #f08a58;
  --fm-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 14px rgba(0, 0, 0, 0.25);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body.fm-dark {
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--fm-bg);
  color: var(--fm-text);
  font-family: var(--fm-sans);
  font-size: 14px;
  line-height: 1.5;
  transition: background var(--fm-trans), color var(--fm-trans);
}

h1, h2, h3 {
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}

h1 { font-size: 22px; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }

hr {
  border: none;
  border-top: 1px solid var(--fm-border);
  margin: 32px 0;
}

p {
  margin: 0 0 12px;
}

a {
  color: var(--fm-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.fm-switch-track:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--fm-accent);
  outline-offset: 2px;
  border-radius: var(--fm-radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

.fm-num {
  font-family: var(--fm-mono);
  font-variant-numeric: tabular-nums;
}

th.fm-num {
  font-family: inherit;
}

.fm-col-check {
  text-align: center;
}

.fm-haken {
  display: inline-block;
  line-height: 0;
}

.fm-haken svg {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
  color: var(--fm-accent, #2e7d32);
  stroke-width: 2.6;
}

.fm-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  padding: 12px 24px;
  background: var(--fm-card-bg);
  border-bottom: 1px solid var(--fm-border);
  transition: background var(--fm-trans), border-color var(--fm-trans);
}

.fm-head-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.fm-head-brand svg {
  flex: none;
}

.fm-head-menue { display: contents; }
.fm-head-menue-knopf,
.fm-head-rolle-mobil { display: none; }
.fm-head-menue-knopf {
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-radius-sm);
  background: var(--fm-card-bg);
  color: var(--fm-text);
}
.fm-head-menue-knopf svg { width: 18px; height: 18px; }

.fm-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex: 1;
}

.fm-nav-item {
  padding: 6px 12px;
  border-radius: var(--fm-radius-sm);
  color: var(--fm-text-muted);
  transition: background var(--fm-trans), color var(--fm-trans);
}

.fm-nav-item:hover {
  color: var(--fm-text);
  text-decoration: none;
  background: var(--fm-off-bg);
}

.fm-nav-item-active {
  color: var(--fm-accent-strong);
  background: var(--fm-accent-soft);
  font-weight: 600;
}

.fm-head-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.fm-user-email {
  color: var(--fm-text-muted);
  font-size: 13px;
}

.fm-user-email-knopf {
  color: var(--fm-text-muted);
  font-size: 13px;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: color var(--fm-trans), text-decoration-color var(--fm-trans);
}

.fm-user-email-knopf:hover {
  color: var(--fm-text);
  text-decoration-color: currentColor;
}

.fm-user-rolle {
  color: var(--fm-text-muted);
  font-size: 12px;
  padding: 2px 8px;
  border: 1px solid var(--fm-border);
  border-radius: 999px;
}

.fm-user-rolle-inhaber {
  color: var(--fm-danger);
  border-color: var(--fm-danger);
  background: var(--fm-danger-bg);
}

.fm-user-rolle-administrator {
  color: var(--fm-warn);
  border-color: var(--fm-warn);
  background: var(--fm-warn-bg);
}

.fm-user-rolle-betrachter_backup {
  color: var(--fm-info);
  border-color: var(--fm-info);
  background: var(--fm-info-bg);
}

.fm-btn-ghost {
  border: 1px solid var(--fm-border);
  background: transparent;
  color: var(--fm-text);
  border-radius: var(--fm-radius-sm);
  padding: 5px 10px;
  font: inherit;
  font-size: 13px;
  transition: background var(--fm-trans), border-color var(--fm-trans);
}

.fm-form-control .fm-btn-ghost + .fm-btn-ghost,
.fm-form-control span + .fm-btn-ghost {
  margin-left: 8px;
}

.fm-btn-ghost:hover {
  background: var(--fm-off-bg);
  text-decoration: none;
}

.fm-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#fm-theme-toggle span {
  display: inline-flex;
}
#fm-theme-toggle svg {
  width: 16px;
  height: 16px;
}
#fm-theme-toggle .fm-theme-sonne,
body.fm-dark #fm-theme-toggle .fm-theme-mond {
  display: none;
}
body.fm-dark #fm-theme-toggle .fm-theme-sonne {
  display: inline-flex;
}

.fm-lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
}

.fm-lang-link,
.fm-lang-current {
  padding: 2px 5px;
  border-radius: var(--fm-radius-sm);
}

.fm-lang-link {
  color: var(--fm-text-muted);
}

.fm-lang-link:hover {
  background: var(--fm-off-bg);
  color: var(--fm-text);
  text-decoration: none;
}

.fm-lang-current {
  color: var(--fm-text);
  border: 1px solid var(--fm-border);
}

.fm-main {

  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
}

.fm-version {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px 16px;
  text-align: right;
  font-size: 12px;
  color: var(--fm-text-muted);
}

.fm-breadcrumb {
  margin-bottom: 16px;
  color: var(--fm-text-muted);
  font-size: 13px;
}

.fm-breadcrumb a {
  color: var(--fm-text-muted);
}

.fm-breadcrumb a:hover {
  color: var(--fm-text);
}

.fm-breadcrumb-sep {
  margin: 0 6px;
}

.fm-breadcrumb-current {
  color: var(--fm-text);
  font-weight: 600;
}

.fm-card {
  background: var(--fm-card-bg);
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-radius);
  box-shadow: var(--fm-shadow);
  padding: 18px 20px;
  margin-bottom: 16px;
  transition: background var(--fm-trans), border-color var(--fm-trans);
}

.fm-card-title {
  font-weight: 700;
  font-size: 19px;
  margin: 0 0 12px 0;
}

.fm-card-titelzeile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}

.fm-card-titelzeile .fm-card-title {
  margin: 0;
}

.fm-geraet-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fm-geraet-links .fm-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.fm-geraet-links .fm-btn svg {
  width: 14px;
  height: 14px;
  flex: none;
}

.fm-uebersicht-grid {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 760px) {
  .fm-uebersicht-grid {
    grid-template-columns: 1fr;
  }
}

.fm-tile-grid.fm-tile-grid-2x2 {
  grid-template-columns: repeat(2, 1fr);
}

.fm-uebersicht-grid .fm-map {
  height: 100%;
}

.fm-uebersicht-grid .fm-tile-grid {
  margin-bottom: 0;
}

.fm-systemstatus {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-radius);
  padding: 12px 16px;
  text-align: center;
}

.fm-systemstatus-typicon {
  position: absolute;
  top: 4px;
  right: 10px;
}

.fm-systemstatus-typicon svg {
  display: block;
}

.fm-systemstatus-pin {
  position: absolute;
  top: 10px;
  right: 10px;
  color: var(--fm-text-muted);
}

.fm-systemstatus-pin svg {
  display: block;
}

.fm-systemstatus-label {
  align-self: flex-start;
  color: var(--fm-text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fm-systemstatus-mitte {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.fm-systemstatus-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 3px solid currentColor;
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
}

.fm-systemstatus-text {
  font-size: 16px;
  font-weight: 700;
}

.fm-systemstatus-ok {
  background: var(--fm-accent-soft);
  border-color: var(--fm-accent);
}

.fm-systemstatus-ok .fm-systemstatus-icon,
.fm-systemstatus-ok .fm-systemstatus-text {
  color: var(--fm-accent-strong);
}

.fm-systemstatus-warn {
  background: var(--fm-warn-bg);
  border-color: var(--fm-warn-solid);
}

.fm-systemstatus-warn .fm-systemstatus-icon,
.fm-systemstatus-warn .fm-systemstatus-text {
  color: var(--fm-warn-solid);
}

.fm-systemstatus-error {
  background: var(--fm-danger-bg);
  border-color: var(--fm-danger);
}

.fm-systemstatus-error .fm-systemstatus-icon,
.fm-systemstatus-error .fm-systemstatus-text {
  color: var(--fm-danger);
}

.fm-systemstatus-tunnel {
  margin-top: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--fm-tunnel);
  color: var(--fm-tunnel-text);
}

.fm-systemstatus-info {
  background: var(--fm-info-bg);
  border-color: var(--fm-info);
}

.fm-systemstatus-info .fm-systemstatus-icon,
.fm-systemstatus-info .fm-systemstatus-text {
  color: var(--fm-info);
}

.fm-geraet-uebersicht-grid {
  display: grid;
  grid-template-columns: 2.4fr 2.2fr 2.2fr 2.2fr 2.2fr;
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 1400px) {
  .fm-geraet-uebersicht-grid {
    grid-template-columns: 1fr;
  }
}

.fm-geraet-uebersicht-grid .fm-systemstatus {
  height: 100%;
}

.fm-systemstatus-meta {
  margin-top: 16px;
  text-align: left;
  color: var(--fm-text-muted);
  font-size: 13px;
}

.fm-systemstatus-meta p {
  margin: 2px 0;
}

.fm-chart-box {
  background: var(--fm-card-bg);
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-radius);
  padding: 4px;
}

.fm-chart-box .fm-chart {
  width: 100%;
  height: 266px;
}

.fm-chart-box .fm-chart-netz {
  height: 266px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--fm-text-muted);
}

.fm-chart-box .fm-chart-netz svg {
  width: 56px;
  height: 56px;
  color: var(--fm-accent);
}

.fm-chart-box .fm-chart-netz-titel {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--fm-text);
}

.fm-chart-box .fm-chart-zusatz {
  margin: -34px 8px 10px;
  text-align: center;
  font-size: .8rem;
  color: var(--fm-text-muted);
  font-variant-numeric: tabular-nums;
}

.fm-verlauf-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 760px) {
  .fm-verlauf-row {
    grid-template-columns: 1fr;
  }
}

.fm-verlauf-tile {

  position: relative;
  min-width: 0;
  background: var(--fm-card-bg);
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-radius);
  padding: 10px 12px 8px;
}

.fm-verlauf-kopf {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-right: 26px;
}

.fm-verlauf-label {
  min-width: 0;
  overflow-wrap: break-word;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--fm-text-muted);
}

.fm-verlauf-wert {
  font-family: var(--fm-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--fm-text);
}

.fm-verlauf-wert-ok { color: var(--fm-accent); }
.fm-verlauf-wert-warn { color: var(--fm-warn); }
.fm-verlauf-wert-err { color: var(--fm-danger); }

.fm-verlauf-tile .fm-chart,
.fm-verlauf-tile p {
  margin: 4px 0 0;
}

.fm-verlauf-chart {
  width: 100%;
  height: 108px;
  margin-top: 4px;
}

.fm-verlauf-legende {
  display: flex;
  gap: 14px;
  font-size: 11px;
  color: var(--fm-text-muted);
  margin-top: 4px;
}

.fm-verlauf-punkt {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 4px;
}

.fm-verlauf-punkt-primaer { background: var(--fm-accent); }
.fm-verlauf-punkt-sekundaer { background: var(--fm-info); }
.fm-verlauf-punkt-tertiaer { background: var(--fm-tunnel); }

.fm-verlauf-zoom {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: var(--fm-radius-sm);
  border: 1px solid var(--fm-border);
  background: var(--fm-card-bg);
  color: var(--fm-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--fm-trans), border-color var(--fm-trans);
}

.fm-verlauf-zoom:hover,
.fm-verlauf-zoom:focus-visible {
  color: var(--fm-accent);
  border-color: var(--fm-accent);
}

.fm-verlauf-zoom svg {
  width: 14px;
  height: 14px;
}

.fm-verlauf-freigabe {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 16px;
  height: 16px;
  color: var(--fm-danger);
}
.fm-verlauf-freigabe svg {
  width: 100%;
  height: 100%;
  display: block;
}

.fm-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.fm-charts-karte {
  position: relative;
  min-width: 0;
  background: var(--fm-card-bg);
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-radius);
  padding: 10px 12px 8px;
}

.fm-charts-karte-werkzeug {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
}

.fm-charts-karte-werkzeug .fm-verlauf-zoom {
  position: static;
}

.fm-charts-karte .fm-verlauf-kopf {

  padding-right: 60px;
}

.fm-charts-karte-freigabe-aktiv .fm-verlauf-kopf {
  padding-right: 84px;
}

.fm-charts-karte-freigabe {
  width: 24px;
  height: 24px;
  border-radius: var(--fm-radius-sm);
  background: var(--fm-danger);
  color: var(--fm-accent-text);
  display: flex;
  align-items: center;
  justify-content: center;
}
.fm-charts-karte-freigabe svg {
  width: 14px;
  height: 14px;
}

.fm-charts-view-mehr {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.fm-charts-view-mehr[hidden] { display: none; }

.fm-charts-reihenfolge-liste {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  max-height: 360px;
  overflow-y: auto;
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-radius);
}

.fm-charts-reihenfolge-zeile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--fm-border);
  background: var(--fm-card-bg);
  color: var(--fm-text);
}

.fm-charts-reihenfolge-zeile:last-child {
  border-bottom: none;
}

.fm-charts-reihenfolge-griff {
  flex: 0 0 auto;
  display: flex;
  border: 0;
  background: none;
  padding: 8px;
  margin: -8px -4px -8px -8px;
  border-radius: var(--fm-radius-sm);
  color: var(--fm-text-muted);
  touch-action: none;
}
.fm-charts-reihenfolge-griff:hover {
  color: var(--fm-text);
}
.fm-charts-reihenfolge-griff:focus-visible {
  outline: 2px solid var(--fm-accent);
  outline-offset: 0;
  color: var(--fm-accent);
}

.fm-charts-reihenfolge-ansage {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.fm-charts-reihenfolge-griff svg {
  width: 18px;
  height: 18px;
  display: block;
}

.fm-charts-reihenfolge-label {
  flex: 1 1 auto;
  min-width: 0;
}

.fm-charts-reihenfolge-ziehend {
  opacity: 0.4;
}

.fm-charts-reihenfolge-ziel-oben {
  box-shadow: inset 0 3px 0 0 var(--fm-accent);
}
.fm-charts-reihenfolge-ziel-unten {
  box-shadow: inset 0 -3px 0 0 var(--fm-accent);
}

@media (max-width: 760px) {
  .fm-charts-grid {
    grid-template-columns: 1fr;
  }
}

.fm-verlauf-vollbild-kopf {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.fm-verlauf-vollbild-aktuell {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
  font-weight: 700;
  font-size: 19px;
  color: var(--fm-text);
}

.fm-verlauf-werkzeugleiste {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.fm-verlauf-werkzeug {
  display: flex;
  gap: 6px;
}

.fm-verlauf-bereich {
  display: flex;
  gap: 6px;
}

.fm-verlauf-bereich-knopf {
  font: inherit;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: var(--fm-radius-sm);
  border: 1px solid var(--fm-border);
  background: var(--fm-card-bg);
  color: var(--fm-text-muted);
  transition: color var(--fm-trans), border-color var(--fm-trans), background var(--fm-trans);
}

.fm-verlauf-bereich-knopf:hover {
  border-color: var(--fm-accent);
}

.fm-verlauf-bereich-knopf.fm-aktiv {
  color: var(--fm-accent-strong);
  border-color: var(--fm-accent);
  background: var(--fm-accent-soft);
  font-weight: 500;
}

.fm-verlauf-icon-knopf {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 33.5px;
  height: 33.5px;
  padding: 0;
  border-radius: var(--fm-radius-sm);
  border: 1px solid var(--fm-border);
  background: var(--fm-card-bg);
  color: var(--fm-text-muted);
  transition: color var(--fm-trans), border-color var(--fm-trans), background var(--fm-trans);
}
.fm-verlauf-icon-knopf:hover {
  border-color: var(--fm-accent);
  color: var(--fm-accent-strong);
}
.fm-verlauf-icon-knopf.fm-aktiv {
  color: var(--fm-accent-strong);
  border-color: var(--fm-accent);
  background: var(--fm-accent-soft);
}

.fm-verlauf-icon-knopf-freigabe-aktiv {
  background: var(--fm-danger);
  border-color: var(--fm-danger);
  color: var(--fm-accent-text);
}
.fm-verlauf-icon-knopf-freigabe-aktiv:hover {
  background: var(--fm-danger);
  border-color: var(--fm-danger);
  color: var(--fm-accent-text);
  opacity: 0.88;
}
.fm-verlauf-icon-knopf svg {
  width: 16px;
  height: 16px;
  display: block;
}

.fm-verlauf-vollbild-chart {
  width: 100%;
  height: 440px;
}

.fm-verlauf-vollbild-hinweis {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--fm-text-muted);
}

@media (max-width: 640px) {
  .fm-verlauf-vollbild-chart {
    height: 320px;
  }
}

.fm-share-kopf {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--fm-border);
  background: var(--fm-card-bg);
}
.fm-share-marke {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--fm-text);
}
.fm-share-partner {
  color: var(--fm-text-muted);
  font-size: 0.9em;
}

.fm-share-kopf-rechts {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  min-width: 0;
}

.fm-share-titel {
  margin: 0;
  font-size: 1em;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fm-share-werkzeug {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.fm-share-kopf {
  position: relative;
}

.fm-share-warnung {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 4px 12px;
  border-radius: var(--fm-radius-sm);
  background: var(--fm-danger-bg);
  color: var(--fm-danger);
  border: 1px solid var(--fm-danger);
  font-size: 0.85em;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
}

.fm-share-warnung[hidden] {
  display: none;
}

@media (max-width: 900px) {

  .fm-share-warnung {
    position: static;
    transform: none;
    order: 3;
    width: 100%;
    text-align: center;
  }
}

.fm-share-inhalt {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.fm-share-inhalt-breit {
  max-width: none;
  padding: 12px 16px;
}

.fm-share-kopf + .fm-main {
  max-width: none;
  padding: 12px 16px;
}

.fm-share-kopf ~ .fm-version {
  max-width: none;
  padding: 0 18px 12px;
}

@media (max-width: 640px) {
  .fm-share-kopf { flex-wrap: wrap; padding: 12px 16px; gap: 8px; }
  .fm-share-inhalt { padding: 16px; }

  .fm-share-kopf-rechts { margin-left: 0; width: 100%; }
  .fm-share-titel { white-space: normal; }
}

.fm-dashboard-takt {
  margin: 6px 2px 0 0;
  text-align: right;
  font-size: 0.8em;
  color: var(--fm-text-muted);
}
.fm-dashboard-takt:empty { display: none; }

.fm-map {
  height: 380px;
  border-radius: var(--fm-radius);
  overflow: hidden;
  background: var(--fm-off-bg);
}

.fm-map .leaflet-container {
  font-family: var(--fm-sans);
  background: var(--fm-off-bg);
}

.fm-map-pin {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 2px solid var(--fm-card-bg);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.fm-map-pin-ok    { background: var(--fm-accent); }
.fm-map-pin-warn  { background: var(--fm-warn-solid); }
.fm-map-pin-error { background: var(--fm-danger); }
.fm-map-pin-info  { background: var(--fm-info); }

.fm-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.fm-tile {
  background: var(--fm-card-bg);
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-radius);
  padding: 12px 16px;
  transition: background var(--fm-trans), border-color var(--fm-trans);
}

.fm-tile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fm-tile-label {
  color: var(--fm-text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fm-tile-value {
  font-family: var(--fm-mono);
  font-size: 36px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-top: 4px;
  text-align: center;
}

.fm-tile-icon {
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  flex: none;
}

.fm-tile-ok {
  background: var(--fm-accent-soft);
  border-color: var(--fm-accent);
}

.fm-tile-ok .fm-tile-label,
.fm-tile-ok .fm-tile-value,
.fm-tile-ok .fm-tile-icon {
  color: var(--fm-accent-strong);
}

.fm-tile-warn {
  background: var(--fm-warn-bg);
  border-color: var(--fm-warn);
}

.fm-tile-warn .fm-tile-label,
.fm-tile-warn .fm-tile-value,
.fm-tile-warn .fm-tile-icon {
  color: var(--fm-warn);
}

.fm-tile-error {
  background: var(--fm-danger-bg);
  border-color: var(--fm-danger);
}

.fm-tile-error .fm-tile-label,
.fm-tile-error .fm-tile-value,
.fm-tile-error .fm-tile-icon {
  color: var(--fm-danger);
}

.fm-tile-info {
  background: var(--fm-info-bg);
  border-color: var(--fm-info);
}

.fm-tile-info .fm-tile-label,
.fm-tile-info .fm-tile-value,
.fm-tile-info .fm-tile-icon {
  color: var(--fm-info);
}

.fm-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid var(--fm-border);
  margin-bottom: 16px;
}

.fm-tab {
  padding: 8px 14px;
  border: none;
  background: transparent;
  color: var(--fm-text-muted);
  font: inherit;
  border-bottom: 2px solid transparent;

  border-radius: var(--fm-radius-sm) var(--fm-radius-sm) 0 0;
  font-size: 14px;

  cursor: pointer;
  transition: background var(--fm-trans), color var(--fm-trans),
    border-color var(--fm-trans);
}

.fm-tab:hover {
  color: var(--fm-text);
  background: var(--fm-off-bg);
}

.fm-tab-active,

.fm-tab-active:hover {
  color: var(--fm-accent);
  border-bottom-color: var(--fm-accent);
  font-weight: 600;
}

.fm-tabpanel {
  display: none;
}

.fm-tabpanel-active {
  display: block;

  overflow-x: auto;
}

.fm-table {
  width: 100%;
  border-collapse: collapse;
}

.fm-tabelle-wrap {
  overflow-x: auto;
}

.fm-table-eigenschaften {
  table-layout: fixed;
}

.fm-table-eigenschaften td:first-child {
  width: 260px;
}

.fm-table th {
  text-align: left;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fm-text-muted);
  border-bottom: 1px solid var(--fm-border);
  padding: 8px 10px;
}

.fm-table td {
  border-bottom: 1px solid var(--fm-border);
  padding: 8px 10px;
  vertical-align: middle;
}

.fm-table tbody tr:hover {
  background: var(--fm-off-bg);
}

.fm-table tbody tr.fm-filter-leer td {
  text-align: center;
  font-style: italic;
  color: var(--fm-text-muted);
  padding: 14px 10px;
}
.fm-table tbody tr.fm-filter-leer:hover { background: none; }

.fm-link-knopf {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-style: normal;
  color: var(--fm-accent);
  text-decoration: underline;
}

.fm-table tbody tr.fm-row-error {
  background: var(--fm-danger-bg);
}

.fm-table tbody tr.fm-row-ok {
  background: var(--fm-accent-soft);
}

.fm-table tbody tr.fm-row-warn {
  background: var(--fm-warn-bg);
}

.fm-table tbody tr.fm-row-info {
  background: var(--fm-info-bg);
}

label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 4px;
}

input,
select,
textarea {
  font: inherit;
  color: var(--fm-text);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="time"],
select,
textarea {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-radius-sm);
  background: var(--fm-bg);
  color: var(--fm-text);
  font-size: 14px;
  line-height: 1.4;
  transition: border-color var(--fm-trans), box-shadow var(--fm-trans);
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 30px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--fm-text-muted) 50%),
    linear-gradient(135deg, var(--fm-text-muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) center,
    calc(100% - 13px) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--fm-text-muted);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--fm-accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--fm-accent-soft);
}

input::placeholder,
textarea::placeholder {
  color: var(--fm-text-muted);
  opacity: 1;
}

input:not([type="checkbox"]):not([type="radio"]):read-only,
input:disabled,
textarea:read-only,
textarea:disabled,
select:disabled {
  background: var(--fm-off-bg);
  color: var(--fm-text-muted);
}

input:not([type="checkbox"]):not([type="radio"]):read-only:hover,
input:disabled:hover,
textarea:read-only:hover,
textarea:disabled:hover,
select:disabled:hover {
  border-color: var(--fm-border);
}

textarea {
  resize: vertical;
  min-height: 5em;
}

fieldset {
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-radius);
  padding: 14px 16px 16px;
  margin: 0 0 16px;
}

legend {
  padding: 0 6px;
  font-weight: 600;
  font-size: 13px;
  color: var(--fm-text-muted);
}

fieldset label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--fm-text-muted);
  margin-top: 10px;
}

.fm-eingabe-mit-status {
  position: relative;
  display: block;

  max-width: 360px;
}

.fm-form-row .fm-eingabe-mit-status {
  flex: 1 1 200px;
  min-width: 0;
}

.fm-eingabe-mit-status input {
  padding-right: 38px;

  width: 100%;
  max-width: 360px;
}

.fm-status-icon {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  pointer-events: none;
  transition: background var(--fm-trans);
}

.fm-status-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  color: #fff;
}

.fm-status-icon[data-status="leer"] {
  background: var(--fm-text-muted);

  opacity: 0.45;
}

.fm-status-icon[data-status="ungueltig"] {
  background: var(--fm-danger);
}

.fm-status-icon[data-status="ungueltig"]::before,
.fm-status-icon[data-status="ungueltig"]::after,
.fm-status-icon[data-status="leer"]::before,
.fm-status-icon[data-status="leer"]::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 2px;
  background: #fff;
}

.fm-status-icon[data-status="ungueltig"]::before,
.fm-status-icon[data-status="leer"]::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.fm-status-icon[data-status="ungueltig"]::after,
.fm-status-icon[data-status="leer"]::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.fm-status-icon[data-status="gueltig"] {
  background: var(--fm-accent);
}

.fm-status-icon[data-status="gueltig"]::before {
  content: "\2713";
}

.fm-status-punkt {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.fm-status-punkt::before {
  content: "";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  color: #fff;
}

.fm-status-punkt[data-status="aktiv"] {
  background: var(--fm-accent);
}

.fm-status-punkt[data-status="aktiv"]::before {
  content: "\2713";
}

.fm-status-punkt[data-status="inaktiv"] {
  background: var(--fm-danger);
}

.fm-status-punkt[data-status="inaktiv"]::before,
.fm-status-punkt[data-status="inaktiv"]::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 2px;
  background: #fff;
}

.fm-status-punkt[data-status="inaktiv"]::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.fm-status-punkt[data-status="inaktiv"]::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

fieldset label:first-child {
  margin-top: 0;
}

button {
  font: inherit;
}

button:not([class]) {
  display: inline-block;
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-radius-sm);
  background: var(--fm-card-bg);
  color: var(--fm-text);
  padding: 8px 16px;
  font-size: 14px;
  transition: background var(--fm-trans), border-color var(--fm-trans);
}

button:not([class]):hover {
  background: var(--fm-off-bg);
}

.fm-form-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  padding: 12px 0;
  border-bottom: 1px solid var(--fm-border);
}

.fm-form-row:last-child {
  border-bottom: none;
}

.fm-form-row:has(+ hr) {
  border-bottom: none;
}

.fm-form-label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  flex: 1 1 100%;
  min-width: 0;
}

.fm-form-label[hidden] {
  display: none;
}

.fm-form-row[hidden] {
  display: none;
}

.fm-form-label-text {
  font-weight: 600;
  flex: 0 0 260px;
}

.fm-form-help {
  color: var(--fm-text-muted);
  font-size: 12px;
  margin-top: 2px;
}

.fm-form-help a {
  text-decoration: underline;
}

.fm-form-help.fm-hinweis-abstand {
  margin-top: 12px;
}

.fm-form-control {
  display: inline-flex;

  align-items: center;
  flex: 1 1 200px;
  min-width: 0;
}

.fm-form-control input[type="text"],
.fm-form-control input[type="email"],
.fm-form-control input[type="password"],
.fm-form-control input[type="number"],
.fm-form-control select,
.fm-form-control textarea {
  width: 100%;
  max-width: 360px;
}

.fm-form-control textarea.fm-textarea-breit {
  max-width: none;
}

.fm-form-control input.fm-input-tage {
  width: 80px;
  flex: none;
}

.fm-input-einheit {
  margin-left: 8px;
  color: var(--fm-text-muted);
}

.fm-form-control input[type="time"] {
  width: 120px;
  flex: none;
}

.fm-zeitplan-wochentage {
  flex-wrap: wrap;
  gap: 4px 12px;
}

.fm-zeitplan-tag {
  display: inline-flex;

  flex-direction: row;
  align-items: center;
  gap: 4px;
  font-weight: normal;
}

.fm-filter-block {
  margin-bottom: 8px;
}

.fm-filter-zeile {
  border-bottom: none;
}

.fm-filter-zeile .fm-form-label {
  flex: 0 1 auto;
  gap: 6px;
}

.fm-filter-zeile .fm-form-label-text {
  flex: 0 0 auto;
  font-size: 12px;
}

.fm-filter-zeile .fm-form-control {
  flex: 0 1 auto;
}

.fm-filter-zeile .fm-form-control select {
  min-width: 110px;
  max-width: 160px;
}

.fm-filter-wert-reset {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  gap: 10px 24px;
}

.fm-filter-suche-zeile {
  align-items: stretch;
}

.fm-filter-suche-feld {
  flex: 1 1 auto !important;
}

.fm-filter-suche-feld .fm-form-label-text {
  flex: 0 0 auto;
}

.fm-filter-suche-feld .fm-form-control {
  flex: 1 1 auto;
}

.fm-filter-suche-feld .fm-form-control input[type="search"] {
  width: 100%;
  max-width: none;
}

.fm-modal-karte .fm-btn-icon-aktion {
  width: 30px;
  height: 30px;
}

.fm-modal-karte .fm-btn-icon-aktion svg {
  width: 18px;
  height: 18px;
}

.fm-modal-speichern-zeile {
  margin-top: 20px;
}

.fm-filter-zeile .fm-btn-icon-aktion,
.fm-filter-suche-zeile .fm-btn-icon-aktion {
  width: 38px;
  height: 38px;

  font-size: 20px;
}

.fm-filter-zeile .fm-btn-icon-aktion {
  align-self: flex-start;
}

.fm-td-meldung {
  width: 100%;
  max-width: 0;
  min-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fm-meldung-link {
  color: var(--fm-accent);
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color var(--fm-trans);
}

tr:hover .fm-meldung-link {
  text-decoration-color: currentColor;
}

@media (max-width: 900px) {

  #meldungen-tabelle {
    width: auto;
    min-width: 100%;
  }

  #fleet-tabelle {
    width: auto;
    min-width: 100%;
  }

  #systemwerte-tabelle .fm-col-beschreibung,
  #systemwerte-tabelle .fm-col-raum,
  #systemwerte-tabelle .fm-col-kategorie,
  #systemwerte-tabelle .fm-col-typ,
  #meldungen-tabelle .fm-col-raum,
  #meldungen-tabelle .fm-col-quelle {
    display: none;
  }
  .fm-td-meldung {
    min-width: 100px;
  }

  #projekt-custom-tabelle {
    width: auto;
    min-width: 100%;
  }
  #projekt-custom-tabelle .fm-col-groesse,
  #projekt-custom-tabelle .fm-col-firmware,
  #projekt-custom-tabelle .fm-col-ersteller,
  #projekt-custom-tabelle .fm-col-kunde,
  #projekt-custom-tabelle .fm-col-bemerkung,
  #projekt-custom-tabelle .fm-col-ablage {
    display: none;
  }
}

@media (max-width: 760px) {
  #meldungen-tabelle .fm-col-geraet {
    display: none;
  }
}

@media (max-width: 600px) {
  #meldungen-tabelle .fm-col-anzahl {
    display: none;
  }
}

@media (max-width: 560px) {
  #meldungen-tabelle .fm-col-zeitpunkt {
    display: none;
  }
}

@media (max-width: 640px) {
  #nutzer-tabelle .fm-col-rolle,
  #nutzer-tabelle .fm-col-status,
  #nutzer-tabelle .fm-col-mfa {
    display: none;
  }

  #nutzer-tabelle .fm-col-email {
    max-width: 150px;
    overflow-wrap: anywhere;
  }

  #standort-tabelle .fm-col-status,
  #standort-tabelle .fm-col-miniserver {
    display: none;
  }

  #backups-tabelle .fm-col-msno,
  #backups-tabelle .fm-col-groesse,
  #backups-tabelle .fm-col-dateien,
  #backups-tabelle .fm-col-check,
  #backups-tabelle .fm-col-ablage {
    display: none;
  }

  #projekt-tabelle .fm-col-groesse,
  #projekt-tabelle .fm-col-zusatz {
    display: none;
  }

  #fleet-tabelle .fm-col-zuletzt,
  #fleet-tabelle .fm-col-backup {
    display: none;
  }

  #inventar-tabelle .fm-col-serial,
  #inventar-tabelle .fm-col-firmware,
  #inventar-tabelle .fm-col-projekt,
  #gateway-tabelle .fm-col-serial,
  #gateway-tabelle .fm-col-firmware,
  #gateway-tabelle .fm-col-typ,
  #gw-verwaltung-tabelle .fm-col-serial,
  #gw-verwaltung-tabelle .fm-col-firmware,
  #gw-verwaltung-tabelle .fm-col-typ,
  #gateway-liste-tabelle .fm-col-serial,
  #gateway-liste-tabelle .fm-col-firmware,
  #gateway-liste-tabelle .fm-col-typ {
    display: none;
  }

  #miniserver-tabelle .fm-col-serial,
  #miniserver-tabelle .fm-col-firmware,
  #miniserver-tabelle .fm-col-projekt {
    display: none;
  }
}

@media (max-width: 480px) {

  #meldungen-tabelle .fm-col-zeitpunkt,
  #meldungen-tabelle .fm-col-anzahl,
  #meldungen-tabelle .fm-col-schwere {
    display: none;
  }
  .fm-td-meldung {
    min-width: 100px;
  }

  #meldungen-tabelle .fm-col-zuletzt {
    max-width: 72px;
    white-space: normal;
  }

  #fleet-tabelle .fm-col-miniserver,
  #fleet-tabelle .fm-col-gateways {
    display: none;
  }
}

@media (max-width: 360px) {
  #meldungen-tabelle .fm-col-zuletzt {
    display: none;
  }

  .fm-td-meldung {
    min-width: 80px;
  }
}

.fm-meldung-sammel-zeile {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 12px;
}

.fm-meldung-sammel-zeile form {
  display: flex;
  gap: 8px;
}

.fm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 12, 9, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;

  z-index: 2000;
}

.fm-modal-overlay[hidden] {
  display: none;
}

.fm-modal-karte {
  position: relative;
  background: var(--fm-card-bg);
  border-radius: var(--fm-radius);
  box-shadow: var(--fm-shadow);
  max-width: 440px;
  width: 100%;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 40px 24px 20px;
  text-align: center;
}

.fm-modal-karte-breit {
  max-width: 640px;
}

#fm-eigenes-konto-modal .fm-modal-karte {
  height: 440px;
}

#fm-nutzer-modal .fm-modal-karte,
#fm-nutzer-neu-modal .fm-modal-karte {
  height: 480px;
}

#fm-freigabe-modal .fm-modal-karte {
  height: 440px;
}

#fm-dashboard-kachel-modal .fm-modal-karte {
  height: 530px;
}

#fm-dashboard-kachel-modal .fm-segment { display: grid; grid-template-columns: 1fr 1fr; }
#fm-dashboard-kachel-modal .fm-segment button + button { border-left: 0; }
#fm-dashboard-kachel-modal .fm-segment button:nth-of-type(even) { border-left: 1px solid var(--fm-border); }
#fm-dashboard-kachel-modal .fm-segment button:nth-of-type(n+3) { border-top: 1px solid var(--fm-border); }
#fm-dashboard-kachel-modal .fm-pop-abschnitt:first-child { margin-top: 0; }
#fm-dashboard-konfig-modal .fm-modal-karte { height: 360px; }

.fm-freigabe-link-zeile {
  display: flex;
  align-items: center;
  gap: 8px;

  flex: 1 1 auto;
  min-width: 0;
}

.fm-freigabe-link-zeile input[type="text"]:read-only,
.fm-freigabe-link-zeile input[type="text"]:read-only:hover {
  background: var(--fm-bg);
  color: var(--fm-text);
  border-color: var(--fm-border);
}

.fm-freigabe-link-zeile input[type="text"] {
  flex: 1 1 auto;
  min-width: 0;

  max-width: none;
}
.fm-freigabe-link-zeile button {
  flex: 0 0 auto;
}

#fm-nutzer-aktiviert-modal .fm-modal-karte {
  padding-top: 48px;
}

#fm-nutzer-aktiviert-modal .fm-modal-titel {
  margin-bottom: 16px;
}

#fm-nutzer-aktiviert-modal p {
  margin: 0 0 24px;
  line-height: 1.5;
}

.fm-standort-rollen-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 100%;
  min-width: 0;
}

.fm-standort-rollen-box[hidden] {
  display: none;
}

#fm-nb-standort-zeilen {
  max-height: 160px;
  overflow-y: auto;
}

.fm-schritt-fehler {
  color: var(--fm-danger);
  font-weight: 600;
}

.fm-modal-schliessen {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  border: none;
  background: var(--fm-off-bg);
  transition: background var(--fm-trans);
}

.fm-modal-schliessen::before,
.fm-modal-schliessen::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 2px;
  background: var(--fm-text-muted);
  transition: background var(--fm-trans);
}

.fm-modal-schliessen::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.fm-modal-schliessen::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.fm-modal-schliessen:hover {
  background: var(--fm-border);
}

.fm-modal-schliessen:hover::before,
.fm-modal-schliessen:hover::after {
  background: var(--fm-text);
}

.fm-modal-titel {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 700;
  color: var(--fm-text);
}

.fm-modal-karte .fm-form-row {
  text-align: left;
}

.fm-form-label + .fm-form-help {
  flex-basis: 100%;
  margin: -6px 0 6px 270px;
}

.fm-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
}

.fm-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.fm-switch-track {
  position: absolute;
  inset: 0;
  background: var(--fm-off-bg);
  border: 1px solid var(--fm-border);
  border-radius: 999px;
  transition: background var(--fm-trans);
}

.fm-switch-track::before {
  content: "";
  position: absolute;
  height: 16px;
  width: 16px;
  left: 2px;
  top: 2px;
  background: var(--fm-card-bg);
  border-radius: 50%;
  transition: transform var(--fm-trans);
}

.fm-switch input:checked + .fm-switch-track {
  background: var(--fm-accent);
}

.fm-switch input:checked + .fm-switch-track::before {
  transform: translateX(16px);
}

.fm-switch input:disabled + .fm-switch-track {
  opacity: 0.5;
}

.fm-switch:has(input:disabled) + .fm-switch-label {
  color: var(--fm-text-muted);
}

.fm-switch-label {
  margin-left: 8px;
}

.fm-meter {
  background: var(--fm-border);
  border-radius: var(--fm-radius-sm);
  height: 10px;
  overflow: hidden;
  max-width: 400px;

  margin-top: 10px;
}

.fm-meter-bar {
  height: 100%;
  background: var(--fm-accent);
}

.fm-meter-bar.fm-meter-warn {
  background: var(--fm-warn-solid);
}

.fm-meter-bar.fm-meter-danger {
  background: var(--fm-danger);
}

.fm-storage-spalte {
  display: inline-flex;
  flex-direction: column;
}

.fm-storage-eingabe {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.fm-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;

  border: 1px solid transparent;
}

.fm-badge-ok::before,
.fm-badge-warn::before,
.fm-badge-error::before,
.fm-badge-info::before,
.fm-badge-off::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: none;
}

.fm-badge-ok {
  background: var(--fm-accent-soft);
  color: var(--fm-accent-strong);
  border-color: var(--fm-accent);
}

.fm-badge-ok::before {
  background: var(--fm-accent);
  box-shadow: 0 0 0 0 var(--fm-accent);
  animation: fm-pulse 2.4s ease-in-out infinite;
}

@keyframes fm-pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--fm-accent) 45%, transparent); }
  70%  { box-shadow: 0 0 0 5px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.fm-badge-warn {
  background: var(--fm-warn-bg);
  color: var(--fm-warn);
  border-color: var(--fm-warn);
}

.fm-badge-warn::before {
  background: var(--fm-warn);
}

.fm-badge-error {
  background: var(--fm-danger-bg);
  color: var(--fm-danger);
  border-color: var(--fm-danger);
}

.fm-badge-error::before {
  background: var(--fm-danger);
}

.fm-badge-info {
  background: var(--fm-info-bg);
  color: var(--fm-info);
  border-color: var(--fm-info);
}

.fm-badge-info::before {
  background: var(--fm-info);
}

.fm-badge-off {
  background: var(--fm-off-bg);
  color: var(--fm-text-muted);
  border-color: var(--fm-border);
}

.fm-meldung-quittiert > td:not(.fm-meldung-aktionen) { opacity: 0.55; }

.fm-badge-off::before {
  background: var(--fm-text-muted);
}

.fm-badge-schloss svg { width: 13px; height: 13px; flex: none; }

.fm-badge-tier-free {
  background: var(--fm-off-bg);
  color: var(--fm-text-muted);
  border-color: var(--fm-border);
}

.fm-badge-tier-silver {
  background: var(--fm-tier-silver-bg);
  color: var(--fm-tier-silver);
  border-color: var(--fm-tier-silver);
}

.fm-badge-tier-gold {
  background: var(--fm-tier-gold-bg);
  color: var(--fm-tier-gold);
  border-color: var(--fm-tier-gold);
}

.fm-badge-tier-enterprise {
  background: var(--fm-info-bg);
  color: var(--fm-info);
  border-color: var(--fm-info);
}

button[form="fm-ek-form"],
button[form="fm-ek-schritt-form"] {
  margin-top: 16px;
}

.fm-banner {
  position: relative;
  border-left: 3px solid var(--fm-border);
  background: var(--fm-off-bg);
  border-radius: var(--fm-radius);
  padding: 12px 40px 12px 16px;
  margin-bottom: 16px;
}

.fm-banner-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  opacity: 0.55;
  font-size: 16px;
  line-height: 1;
}

.fm-banner-close:hover {
  opacity: 1;
}

.fm-banner-info {
  border-left-color: var(--fm-info);
  background: var(--fm-info-bg);
}

.fm-banner-warn {
  border-left-color: var(--fm-warn);
  background: var(--fm-warn-bg);
}

.fm-banner-danger {
  border-left-color: var(--fm-danger);
  background: var(--fm-danger-bg);
}

.fm-banner-ok {
  border-left-color: var(--fm-accent);
  background: var(--fm-accent-soft);
}

.fm-code {
  font-family: var(--fm-mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.fm-code-zeile {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.fm-code-zeile .fm-code {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.fm-btn-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-radius-sm);
  background: var(--fm-card-bg);
  color: var(--fm-text);
  transition: background var(--fm-trans), border-color var(--fm-trans), color var(--fm-trans);
}

.fm-btn-icon:hover {
  border-color: var(--fm-accent);
}

.fm-btn-icon svg {
  width: 16px;
  height: 16px;
}

code + .fm-btn-icon {
  margin-left: 8px;
}

.fm-btn-icon.fm-btn-icon-ok {
  background: var(--fm-ok, var(--fm-info));
  border-color: var(--fm-ok, var(--fm-info));
  color: #fff;
}

.fm-btn-icon-danger:hover {
  border-color: var(--fm-danger);
  color: var(--fm-danger);
}

.fm-table th[data-sortable] {
  user-select: none;

}

.fm-table th[data-sortable]:hover {
  color: var(--fm-text);
}

.fm-table th[data-sortable]::after {
  content: '\21C5';

  display: inline;
  margin-left: 4px;
  opacity: 0.35;
  font-size: 10px;
}

.fm-table th[data-sort-dir="asc"]::after {
  content: '\25B2';
  opacity: 1;
}

.fm-table th[data-sort-dir="desc"]::after {
  content: '\25BC';
  opacity: 1;
}

.fm-btn {
  display: inline-block;
  border: 1px solid transparent;
  border-radius: var(--fm-radius-sm);
  background: var(--fm-accent);
  color: var(--fm-accent-text);
  padding: 8px 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  transition: background var(--fm-trans), opacity var(--fm-trans);
}

.fm-btn:disabled,
.fm-verlauf-icon-knopf:disabled {
  opacity: 0.5;
  background: var(--fm-off-bg);
  color: var(--fm-text-muted);
  border-color: var(--fm-border);
}
.fm-btn:disabled:hover,
.fm-verlauf-icon-knopf:disabled:hover {
  background: var(--fm-off-bg);
  color: var(--fm-text-muted);
  border-color: var(--fm-border);
}

.fm-btn:hover {
  background: var(--fm-accent-strong);
  opacity: 1;
  text-decoration: none;
}

.fm-btn:disabled,
.fm-btn:disabled:hover {
  background: var(--fm-off-bg);
  color: var(--fm-text-muted);
}

.fm-btn-sekundaer {
  background: transparent;
  border-color: var(--fm-border);
  color: var(--fm-text);
  font-weight: 500;
}

.fm-btn-sekundaer:hover {
  background: var(--fm-off-bg);
}

.fm-btn-geraet-link {
  background: var(--fm-accent-soft);
  border-color: var(--fm-accent);
  color: var(--fm-accent-strong);
}

.fm-btn-geraet-link:hover {
  background: var(--fm-accent-soft);
  opacity: 0.8;
}

.fm-btn-danger {
  background: var(--fm-danger);
  color: var(--fm-accent-text);
}

.fm-btn-danger:hover {
  background: var(--fm-danger);
  opacity: 0.88;
}

.fm-btn-erfolg {
  background: var(--fm-accent-soft);
  color: var(--fm-accent-strong);
  border: 1px solid var(--fm-accent);
}

.fm-btn-erfolg:hover {
  opacity: 0.8;
}

.fm-btn-loeschen {
  background: var(--fm-danger-bg);
  color: var(--fm-danger);
  border: 1px solid var(--fm-danger);
}

.fm-btn-loeschen:hover {
  opacity: 0.8;
}

.fm-btn-icon-aktion {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-radius-sm);
  background: transparent;
  color: var(--fm-text);
  font-size: 12px;
  line-height: 1;
  transition: background var(--fm-trans), opacity var(--fm-trans);
}

.fm-btn-icon-aktion[hidden] {
  display: none;
}

.fm-btn-icon-aktion svg {
  width: 14px;
  height: 14px;
}

.fm-btn-icon-aktion:hover {
  background: var(--fm-off-bg);
}

.fm-btn-icon-aktion.fm-btn-loeschen {
  border-color: var(--fm-danger);
  background: var(--fm-danger-bg);
  color: var(--fm-danger);
}

.fm-btn-icon-aktion.fm-btn-loeschen:hover {
  opacity: 0.8;
}

.fm-btn-icon-aktion:disabled,
.fm-btn-icon-aktion:disabled:hover {
  opacity: 0.45;
  background: var(--fm-off-bg);
  color: var(--fm-text-muted);
  border-color: var(--fm-border);
}

.fm-btn-icon-aktion.fm-verlauf-icon-knopf-freigabe-aktiv,
.fm-btn-icon-aktion.fm-verlauf-icon-knopf-freigabe-aktiv:hover {
  background: var(--fm-danger);
  border-color: var(--fm-danger);
  color: var(--fm-accent-text);
}
.fm-btn-icon-aktion.fm-verlauf-icon-knopf-freigabe-aktiv:hover {
  opacity: 0.88;
}

.fm-charts-alle-freigaben-loeschen {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 39px;
  height: 39px;
  padding: 0;
  border-radius: var(--fm-radius-sm);
  background: var(--fm-danger);
  border: 1px solid var(--fm-danger);
  color: var(--fm-accent-text);
  transition: background var(--fm-trans), opacity var(--fm-trans);
}
.fm-charts-alle-freigaben-loeschen svg {
  width: 16px;
  height: 16px;
}
.fm-charts-alle-freigaben-loeschen:hover {
  background: var(--fm-danger);
  opacity: 0.88;
}
.fm-charts-alle-freigaben-loeschen[hidden] {
  display: none;
}

.fm-btn-icon-aktion.fm-btn-erfolg {
  border-color: var(--fm-accent);
  background: var(--fm-accent-soft);
  color: var(--fm-accent-strong);
}

.fm-btn-icon-aktion.fm-btn-erfolg:hover {
  opacity: 0.8;
}

.fm-nb-standort-zeile .fm-form-control {
  gap: 8px;
}

.fm-nb-standort-zeile-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-left: 18px;
}

.fm-nb-standort-zeile-label svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--fm-text-muted);
}

.fm-nb-standort-zeile .fm-nb-standort-rolle-select {
  width: auto;
  max-width: none;
  flex: 1 1 auto;
}

.fm-nb-standort-suche-feld {
  position: relative;
}

.fm-nb-standort-suche-feld input[type="text"] {
  max-width: none;
}

.fm-nb-standort-vorschlaege {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  margin-top: 2px;
  max-height: 220px;
  overflow-y: auto;
  background: var(--fm-card-bg);
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-radius-sm);
  box-shadow: var(--fm-shadow);
}

.fm-nb-standort-vorschlag {
  display: block;
  width: 100%;
  padding: 6px 10px;
  border: none;
  background: none;
  color: var(--fm-text);
  font: inherit;
  text-align: left;
}

.fm-nb-standort-vorschlag:hover,
.fm-nb-standort-vorschlag:focus {
  background: var(--fm-accent-soft);
}

.fm-nb-standort-vorschlag-hinweis {
  display: block;
  padding: 6px 10px;
  color: var(--fm-text-muted);
  font-size: 0.85em;
}

#backups-tabelle .fm-btn-icon-aktion,
#projekt-tabelle .fm-btn-icon-aktion,
#projekt-custom-tabelle .fm-btn-icon-aktion,
#standort-tabelle .fm-btn-icon-aktion,
#nutzer-tabelle .fm-btn-icon-aktion,
#ms-verwaltung-tabelle .fm-btn-icon-aktion,
#gw-verwaltung-tabelle .fm-btn-icon-aktion,
#dashboards-tabelle .fm-btn-icon-aktion,
#schemata-tabelle .fm-btn-icon-aktion {
  width: 30px;
  height: 30px;
}

#backups-tabelle .fm-btn-icon-aktion svg,
#projekt-tabelle .fm-btn-icon-aktion svg,
#projekt-custom-tabelle .fm-btn-icon-aktion svg,
#standort-tabelle .fm-btn-icon-aktion svg,
#nutzer-tabelle .fm-btn-icon-aktion svg,
#ms-verwaltung-tabelle .fm-btn-icon-aktion svg,
#gw-verwaltung-tabelle .fm-btn-icon-aktion svg,
#dashboards-tabelle .fm-btn-icon-aktion svg,
#schemata-tabelle .fm-btn-icon-aktion svg {
  width: 18px;
  height: 18px;
}

.fm-meldung-aktionen {
  vertical-align: middle;
  white-space: nowrap;
}

.fm-meldung-aktionen form {
  display: inline-flex;
  vertical-align: middle;
  margin: 0;
}

.fm-meldung-aktionen form + form {
  margin-left: 6px;
}

.fm-aktion-form {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.fm-form-inline {
  display: contents;
}

.fm-main-login {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px;
  min-height: calc(100vh - 60px);
  padding: 48px 16px;
}

.fm-login-logo {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fm-login-logo svg {
  height: 100%;
  width: 100%;
  display: block;
}

.fm-login-card {
  width: 100%;
  max-width: 400px;
  padding: 28px 28px 24px;
}

.fm-login-card .fm-sprachen {
  text-align: right;
  font-size: 13px;
  color: var(--fm-text-muted);
  margin: 0 0 8px;
}

.fm-login-card .fm-sprachen a {
  color: var(--fm-text-muted);
}

.fm-login-card .fm-sprachen strong {
  color: var(--fm-text);
}

.fm-login-card h1 {
  font-size: 20px;
  margin-bottom: 6px;
}

.fm-login-card p {
  color: var(--fm-text-muted);
  font-size: 13.5px;
}

.fm-login-card form + form,
.fm-login-card > form {
  margin-top: 4px;
}

.fm-login-card button:not([class]) {
  width: 100%;
  margin-top: 10px;
  padding: 10px 16px;
  background: var(--fm-accent);
  border-color: var(--fm-accent);
  color: var(--fm-accent-text);
  font-weight: 600;
}

.fm-login-card button.fm-btn {
  background: var(--fm-accent);
  border-color: var(--fm-accent);
  color: var(--fm-accent-text);
  font-weight: 600;
}

.fm-login-card button.fm-btn-danger {
  background: var(--fm-danger);
  border-color: var(--fm-danger);
  color: var(--fm-accent-text);
}

.fm-login-card button:not([class]):hover {
  background: var(--fm-accent-strong);
}

.fm-devicebaum-farbe {
  width: 6px;
  padding: 0 !important;
}
.fm-devicebaum-kat-bus        { background: #2563eb; }
.fm-devicebaum-kat-tree       { background: #16a34a; }
.fm-devicebaum-kat-air        { background: #9333ea; }
.fm-devicebaum-kat-network    { background: #0891b2; }
.fm-devicebaum-kat-tablet     { background: #ea580c; }
.fm-devicebaum-kat-multimedia { background: #ca8a04; }
.fm-devicebaum-kat-sonstiges  { background: var(--fm-border); }

.fm-devicebaum-pfeil {
  width: 28px;
  text-align: center;
}
.fm-devicebaum-toggle {
  background: none;
  border: none;

  font-size: 18px;
  padding: 2px 5px;
  color: inherit;
  line-height: 1;
}

.fm-devicebaum-toggle[aria-expanded="true"] {
  display: inline-block;
  transform: rotate(90deg);
}

.fm-devicebaum-name {
  padding-left: calc(0.6rem + var(--tiefe, 0) * 1.4rem) !important;
}

.fm-devicebaum-haupt td {
  font-weight: 600;
}

.fm-devicebaum-zeile[data-hat-kinder]:hover {
  background: var(--fm-accent-soft);
}

.fm-dokumentation-vorschau {
  margin-top: 16px;
}

.fm-dokumentation-knopfe {
  margin-top: 12px;
  margin-bottom: 12px;
}

.fm-btn-schloss { display: inline-flex; margin-right: 6px; vertical-align: -2px; }
.fm-btn-schloss svg { width: 13px; height: 13px; }

.dk-fehler-titel { font-weight: 600; margin: 0 0 4px; }
.dk-fehler-text { margin: 0 0 10px; }
.dk-fehler-angaben {
  font-size: 12px;
  background: var(--fm-card-bg);
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-radius-sm);
  padding: 10px 12px;
  margin: 0 0 10px;
  overflow-wrap: anywhere;
}
.dk-fehler-angaben b { font-weight: 600; }
.dk-fehler .fm-btn { padding: 5px 12px; font-size: 13px; }

.dk-fehler .fm-btn.fm-btn-icon-ok {
  background: var(--fm-ok, var(--fm-info));
  border-color: var(--fm-ok, var(--fm-info));
  color: #fff;
}
.dk-werkzeugleiste {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 12px;
}
.dk-doc {
  font-family: var(--fm-sans);
  color: var(--fm-text);
  line-height: 1.45;
}
.dk-doc h1 {
  color: var(--fm-text);
  border-bottom: 3px solid var(--fm-accent);
  padding-bottom: .3rem;
}
.dk-doc h2, .dk-doc h3, .dk-doc h4, .dk-doc h5 {
  color: var(--fm-text);
}
.dk-doc h2 { margin-top: 1.6rem; border-bottom: 1px solid var(--fm-border); }
.dk-doc h3 { margin-top: 1.1rem; color: var(--fm-accent-strong); }
.dk-doc h4 { margin-top: .8rem; font-size: 1rem; color: var(--fm-accent-strong); }
.dk-doc h5 { margin-top: .6rem; font-size: .95rem; color: var(--fm-accent-strong); }

.dk-doc .dk-abschnitt-kopf {
  user-select: none;
}
.dk-doc .dk-abschnitt-kopf::before {
  content: "\25BC";
  display: inline-block;
  width: 1em;
  font-size: .7em;
  margin-right: .4em;
  color: var(--fm-text-muted);
  transition: transform var(--fm-trans);
}
.dk-abschnitt.dk-eingeklappt > .dk-abschnitt-kopf::before {
  transform: rotate(-90deg);
}
.dk-abschnitt.dk-eingeklappt > .dk-abschnitt-rumpf {
  display: none;
}

.dk-abschnitt-rumpf {
  padding-left: 16px;
  border-left: 1px solid var(--fm-border);
}
.dk-doc table {
  border-collapse: collapse;
  width: 100%;
  margin: .4rem 0 1rem;
  font-size: .9rem;
  table-layout: fixed;
}
.dk-doc th, .dk-doc td {
  border: 1px solid var(--fm-border);
  padding: .35rem .6rem;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.dk-doc th {
  background: var(--fm-accent-strong);
  color: var(--fm-accent-text);
}
.dk-doc .dk-mono {
  font-family: var(--fm-mono);
  word-break: break-all;
  overflow-wrap: anywhere;
}
.dk-hardware-bild {
  text-align: left;
  margin: .6rem 0;
  background: #fff;
  border-radius: 6px;
  padding: .4rem;
}
.dk-hardware-bild svg {
  max-width: 840px;
  height: auto;
}

.dk-seitenanfang {
  display: block;
  text-align: right;
  margin: 1rem 0 .8rem;
  font-size: .82rem;
  color: var(--fm-text-muted);
}

.fm-charts-werkzeug { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; margin: 12px 0; }
.fm-charts-werkzeug-links, .fm-charts-werkzeug-rechts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fm-charts-werkzeug-rechts { margin-left: auto; justify-content: flex-end; }

.fm-charts-zaehler { min-width: 0; }
.fm-col-aktiv { width: 1%; }
.fm-charts-wert { white-space: nowrap; text-align: right; }
.fm-charts-meldung:empty { display: none; }
.fm-charts-hinweis { color: var(--fm-text-muted); font-size: .9rem; margin: .5rem 0; }

.fm-charts-mehr { margin-top: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }

.fm-charts-mehr[hidden] { display: none; }

.fm-charts-mehr .fm-btn[hidden] { display: none; }
.fm-charts-mehr p { margin: 0; }

.fm-charts-wert-leer { color: var(--fm-text-muted); }

#systemwerte-tabelle .fm-col-bezeichnung,
#systemwerte-tabelle .fm-col-beschreibung {
  width: 18%;
  white-space: normal;
  overflow-wrap: anywhere;
}
#systemwerte-tabelle .fm-btn-icon-aktion { width: 30px; height: 30px; }
#systemwerte-tabelle .fm-btn-icon-aktion svg { width: 18px; height: 18px; }

#systemwerte-tabelle .fm-icon-gespiegelt {
  font-size: 18px;
  transform: scaleY(-1);
}

#systemwerte-tabelle tbody tr.fm-row-ok {
  background: var(--fm-accent-soft);
}

#systemwerte-tabelle tbody tr.fm-baustein-zeile:hover { background: transparent; }

#systemwerte-tabelle tbody tr.fm-baustein-kind .fm-baustein-einzug { padding-left: 2rem; }

#systemwerte-tabelle .fm-baustein-name-kind-reihe {
  display: flex;
  align-items: center;
  gap: 4px;
}
#systemwerte-tabelle .fm-baustein-pfeil-zeichen {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
}

#systemwerte-tabelle .fm-baustein-name-kind-text {
  min-width: 0;
  overflow-wrap: anywhere;
}
#systemwerte-tabelle .fm-baustein-pfeil-zeichen svg {
  width: 100%;
  height: 100%;
  display: block;
}

#systemwerte-tabelle .fm-checkbox-abgeleitet { accent-color: var(--fm-info); }

.fm-charts-grenzen {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--fm-border);
}

.fm-charts-grenzen h4 {
  flex: 1 0 100%;
  margin: 0;
}

.fm-charts-grenze {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.fm-charts-grenze span {
  color: var(--fm-text-muted);
  font-size: .85rem;
}
.fm-charts-grenze input {
  width: 9em;
  max-width: 100%;
}

@media (max-width: 640px) {
  #systemwerte-tabelle th,
  #systemwerte-tabelle td { padding-left: 4px; padding-right: 4px; }
}

@media (max-width: 640px) {
  .fm-main { padding: 16px; }
  .fm-version { padding: 0 16px 12px; }
  .fm-head { padding: 10px 16px; }

  .fm-head-user { flex-wrap: wrap; gap: 8px; min-width: 0; max-width: 100%; }
  .fm-user-email, .fm-user-email-knopf { overflow-wrap: anywhere; text-align: left; }
  .fm-form-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .fm-form-label { flex-direction: column; align-items: stretch; gap: 4px; flex-basis: auto; }

  .fm-form-label + .fm-form-help { margin: 0; }
  .fm-form-label-text { flex-basis: auto; }

  .fm-form-control { flex-basis: auto; }

  .fm-storage-spalte { width: 100%; }
  .fm-storage-eingabe { flex-wrap: wrap; width: 100%; }

  .fm-form-control input[type="time"] { width: 100%; max-width: 160px; }

  .fm-form-row .fm-eingabe-mit-status { flex-basis: auto; }

  .fm-table-eigenschaften,
  .fm-table-eigenschaften tbody,
  .fm-table-eigenschaften tr,
  .fm-table-eigenschaften td {
    display: block;
    width: auto;
  }
  .fm-table-eigenschaften tr {
    padding: 10px 0;
    border-bottom: 1px solid var(--fm-border);
  }
  .fm-table-eigenschaften tr:last-child {
    border-bottom: none;
  }
  .fm-table-eigenschaften td {
    border-bottom: none;
    padding: 0;
  }
  .fm-table-eigenschaften td:first-child {
    font-weight: 600;
    padding-bottom: 4px;
  }

  .fm-devicebaum-schmal {
    display: none;
  }
  .fm-devicebaum-name {
    padding-left: calc(0.4rem + var(--tiefe, 0) * 0.8rem) !important;
  }
}

.fm-dropzone {
  border: 2px dashed var(--fm-border);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
}
.fm-dropzone-aktiv {
  border-color: var(--fm-accent);
  background: var(--fm-accent-soft);
}
.fm-fortschritt {
  height: 8px;
  border-radius: 4px;
  background: var(--fm-border);
  overflow: hidden;
  margin-top: 12px;
}
.fm-fortschritt-balken {
  height: 100%;
  width: 0%;
  background: var(--fm-accent);
  transition: width 0.2s ease;
}

.fm-update h3 { margin: 24px 0 8px; }
.fm-update h3:first-of-type { margin-top: 0; }

.fm-update hr + h3 { margin-top: 0; }
.fm-update-marke {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  background: var(--fm-off-bg);
  color: var(--fm-text-muted);
}

.fm-update-vor { margin: 0 0 8px; padding: 0; list-style: none; }
.fm-update-vor li { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.fm-update-vor .fm-status-punkt { flex: none; }
.fm-update-knoepfe { display: flex; justify-content: center; gap: 8px; margin: 12px 0; }

.fm-update-knoepfe [hidden] { display: none; }

.fm-statistik-werte code { word-break: break-all; }

.fm-firmware { white-space: nowrap; }
.fm-firmware-update { display: inline-block; width: 16px; height: 16px; margin-left: 6px; vertical-align: -3px; color: var(--fm-info); }
.fm-firmware-update svg { display: block; width: 16px; height: 16px; }
.fm-firmware-update.fm-firmware-warn { color: var(--fm-warn); }
.fm-firmware-update.fm-firmware-error,
.fm-firmware.fm-firmware-abgelaufen > span:first-child { color: var(--fm-danger); }
.fm-firmware.fm-firmware-abgelaufen > span:first-child { font-weight: 600; }

.fm-geraet-links .fm-btn.fm-btn-rc-abgelaufen { border-color: var(--fm-danger); color: var(--fm-danger); }
.fm-rc-hinweis { flex-basis: 100%; margin: 6px 0 0; font-size: 13px; color: var(--fm-danger); text-align: right; }
.fm-rc-hinweis a { color: inherit; }

.fm-update-bereit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow-wrap: anywhere;
}
.fm-update-bereit[hidden] { display: none; }
.fm-update-bereit .fm-status-punkt { flex: none; }
.fm-update-bereit-version { color: var(--fm-text-muted); font-size: 13px; }

.fm-projekt-abschnitt {
  margin-top: 28px;
  margin-bottom: 16px;
}
.fm-projekt-hochladen-knopf {
  display: inline-block;
  margin-bottom: 16px;
}

#projekt-custom-tabelle tr.fm-projekt-custom-gesperrt {
  background: var(--fm-danger-bg);
}
#projekt-custom-tabelle tr.fm-projekt-custom-gesperrt:hover {
  background: var(--fm-danger-bg);
}

.fm-vault-leiste {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.fm-vault-entsperren .fm-form-label {
  display: block;
  margin-bottom: 10px;
}
.fm-vault-entsperren .fm-input {
  display: block;
  width: 100%;
  max-width: 420px;
  box-sizing: border-box;
}
.fm-vault-aktionen {
  white-space: nowrap;
  text-align: right;
}
.fm-vault-aktionen .fm-btn-icon {
  margin-left: 4px;
}

.fm-vault-tabelle {
  table-layout: fixed;
  width: 100%;
  min-width: 900px;
}
.fm-vault-tabelle th:nth-child(1) { width: 20%; }
.fm-vault-tabelle th:nth-child(2) { width: 17%; }

.fm-vault-tabelle th:nth-child(4) { width: 20%; }
.fm-vault-tabelle th:nth-child(5) { width: 110px; text-align: center; }
.fm-vault-tabelle th:nth-child(6) { width: 118px; }
.fm-vault-auto {
  text-align: center;
}
.fm-vault-tabelle td {
  word-break: break-word;
}

.fm-vault-zelle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}
.fm-vault-wert {
  min-width: 0;
  word-break: break-all;
}
.fm-vault-kopieren {
  width: 28px;
  height: 28px;
}

.fm-vault-entsperren-zeile {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.fm-vault-neuer-tab {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--fm-text-muted);
}
.fm-vault-neuer-tab input {
  margin: 0;
}

.fm-vault-pass-wert {
  font-family: monospace;
  word-break: break-all;
}
.fm-vault-unlesbar {
  color: var(--fm-muted, var(--fm-text));
  font-style: italic;
}

.fm-vault-kein {
  margin-top: 14px;
}

.fm-titel-abstand {
  margin-top: 28px;
}

.fm-elemente-streifen {
  background: var(--fm-info-bg);
  border-bottom: 1px solid var(--fm-info);
  transition: background var(--fm-trans), border-color var(--fm-trans);
}

.fm-elemente-banner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  color: var(--fm-text);
}

.fm-elemente-banner-text {
  margin: 0;
  flex: 1 1 320px;
  font-size: 14px;
}

.fm-elemente-banner-knoepfe {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.fm-elemente-banner-meldung {
  flex: 1 1 100%;
  margin: 0;
  color: var(--fm-danger);
  font-size: 13px;
}

.fm-elemente-banner-meldung[hidden] {
  display: none;
}

@media (max-width: 640px) {
  .fm-elemente-banner { padding: 12px 16px; }
}

.fm-dashboard-hinweis { color: var(--fm-text-muted); }

.fm-dashboard-kachel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--fm-card-bg);
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-radius);
}

.fm-dashboard-kachel-titel {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 30px 6px 10px;
  font-weight: 600;
  font-size: .9em;
}

.fm-dashboard-kachel-name {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fm-dashboard-kachel-titel .fm-verlauf-wert { flex: 0 0 auto; }

.fm-dashboard-bearbeiten .fm-dashboard-kachel-titel { padding-right: 64px; }

.fm-dashboard-kachel-chart { flex: 1 1 auto; min-height: 0; }
.fm-dashboard-kachel-fehlt { padding: 10px; color: var(--fm-text-muted); }

.fm-dashboard-kachel-weg {
  position: absolute;
  top: 6px;
  right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-radius-sm);
  background: var(--fm-card-bg);
  color: var(--fm-text);
}
.fm-dashboard-kachel-weg svg { width: 14px; height: 14px; }
.fm-dashboard-kachel-weg:hover { background: var(--fm-off-bg); }

.fm-dashboard-kachel-konfig {
  position: absolute;
  top: 6px;
  right: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-radius-sm);
  background: var(--fm-card-bg);
}
.fm-dashboard-kachel-konfig svg { width: 14px; height: 14px; }
.fm-dashboard-kachel-konfig:hover { background: var(--fm-off-bg); }

.fm-dashboards-meldung {
  border-left: 3px solid var(--fm-danger);
  background: var(--fm-danger-bg);
  border-radius: var(--fm-radius);
  padding: 12px 16px;
  margin-bottom: 12px;
}

.grid-stack .ui-resizable-handle,
.grid-stack .ui-resizable-n,
.grid-stack .ui-resizable-e,
.grid-stack .ui-resizable-s,
.grid-stack .ui-resizable-w,
.grid-stack .ui-resizable-ne,
.grid-stack .ui-resizable-se,
.grid-stack .ui-resizable-sw,
.grid-stack .ui-resizable-nw {
  cursor: auto !important;
}

.fm-dashboard-bearbeiten .fm-dashboard-kachel {
  outline: 2pt solid var(--fm-info);
  outline-offset: -2pt;
}

.fm-dashboard-bearbeiten .grid-stack-item > .grid-stack-item-content {
  cursor: pointer;
}

.fm-dashboard-bearbeiten .grid-stack-item > .grid-stack-item-content > * {
  pointer-events: none;
}

.fm-dashboard-bearbeiten .grid-stack-item > .grid-stack-item-content > button {
  pointer-events: auto;
  cursor: auto;
}

.fm-dashboard-bearbeiten .grid-stack-item > .ui-resizable-se {
  cursor: nwse-resize !important;
  background-image: none;
  transform: none;
  width: 32px;
  height: 32px;
}

.fm-dashboard-bearbeiten .grid-stack-item > .ui-resizable-se::after {
  content: "";
  position: absolute;
  right: -7px;
  bottom: -7px;
  width: 14px;
  height: 14px;
  background: var(--fm-info);
}

.fm-dashboard:not(.fm-dashboard-bearbeiten) .grid-stack-item > .ui-resizable-handle {
  display: none;
}

.fm-dashboard .grid-stack > .grid-stack-item > .grid-stack-item-content {
  overflow: hidden;
}

.fm-dashboard-kachel.fm-dashboard-zustand {
  container-type: size;
}

.fm-dashboard-zustand .fm-systemstatus {
  flex: 1 1 auto;
  min-height: 0;

  border: 0;
  padding: clamp(4px, 3cqmin, 12px) clamp(6px, 4cqmin, 16px);
  overflow: hidden;
}

.fm-dashboard-zustand .fm-systemstatus-icon {
  width: clamp(28px, 34cqmin, 84px);
  height: clamp(28px, 34cqmin, 84px);
}

.fm-dashboard-zustand .fm-systemstatus-icon svg {
  width: 55%;
  height: 55%;
}

.fm-dashboard-zustand .fm-systemstatus-typicon svg {
  width: clamp(20px, 22cqmin, 56px);
  height: auto;
}

.fm-dashboard-zustand .fm-systemstatus-label {
  font-size: clamp(8px, 5cqmin, 12px);
}

.fm-dashboard-zustand .fm-systemstatus-text {
  font-size: clamp(11px, 9cqmin, 22px);
}

.fm-dashboard-zustand .fm-systemstatus-meta {
  font-size: clamp(8px, 5cqmin, 13px);
}

@container (max-height: 150px) {
  .fm-dashboard-zustand .fm-systemstatus-meta {
    display: none;
  }
}

.fm-schema {
  padding: 0;
  overflow: hidden;
}

.fm-schema-meldung {
  margin: 0;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: none;
}

.fm-schema-hinweis {
  margin: 0;
  padding: 10px 14px;
  color: var(--fm-text-muted);
}

.fm-schema-flaeche {
  position: relative;
  overflow: hidden;
  background: var(--fm-card-bg);

  margin: 0 auto;
}

.fm-schema-modus-original {
  margin: 0;
}

.fm-schema:has(.fm-schema-modus-original) {
  overflow: auto;
}

@supports not selector(:has(*)) {
  .fm-schema {
    overflow: auto;
  }
}

.fm-schema-flaeche-leer {
  background-image:
    linear-gradient(to right, var(--fm-border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--fm-border) 1px, transparent 1px);
  background-size: 5% 5%;
}

.fm-schema-bild {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  user-select: none;

  object-fit: contain;
}

.fm-schema-modus-verzerrt .fm-schema-bild {
  object-fit: fill;
}

.fm-schema-el {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 0.2em 0.4em;
  border: 1px solid var(--fm-border);
  border-radius: 0.35em;
  background: var(--fm-card-bg);
  color: var(--fm-text);
  line-height: 1.2;
  text-align: center;
  overflow: hidden;

  transform-origin: 50% 50%;
}

.fm-schema-el-inhalt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3em;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.fm-schema-el-text {
  min-width: 0;
  overflow: hidden;

  white-space: nowrap;
  text-overflow: ellipsis;
}

.fm-schema-el-text:empty { display: none; }

.fm-schema-el-icon {
  flex: none;
  width: 1.25em;
  height: 1.25em;
  fill: currentColor;
}

.fm-schema-icon-vorrat {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.fm-schema-takt {
  margin: 6px 0 0;
  text-align: right;
  font-size: 0.8rem;
  color: var(--fm-text-muted);
}

.fm-schema-takt:empty {
  display: none;
}

.fm-schema-verlauf-chart {
  width: 100%;
  height: 320px;
}

#fm-schema-verlauf-modal .fm-modal-karte {
  height: 600px;
}

#fm-schema-element-modal .fm-modal-karte {
  height: 820px;
}

#fm-schema-bild-modal .fm-modal-karte {
  height: 500px;
}

.fm-schema-el-vorschau {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 92px;
  margin: 0 0 16px;
  padding: 10px;
  border: 1px solid var(--fm-border);
  border-radius: 6px;
  background: var(--fm-bg);
}

.fm-schema-el-vorschau .fm-schema-el {
  position: static;
  max-width: 100%;
  width: auto;
  height: auto;
}

.fm-schrift-knopf {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-radius-sm);
  background: var(--fm-card-bg);
  color: var(--fm-text);
  font-family: inherit;
  font-size: 15px;
  line-height: 1;
}

.fm-schrift-knopf[aria-pressed="true"] {
  background: var(--fm-accent-soft);
  border-color: var(--fm-accent);
  color: var(--fm-accent);
}

.fm-schrift-fett {
  font-weight: 700;
}

.fm-schrift-kursiv {
  font-style: italic;
  font-weight: 600;
}

.fm-schrift-zeile,
.fm-stil-zeile {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  flex-wrap: nowrap;
}

.fm-form-control .fm-schrift-groesse {
  width: 56px;
  max-width: 56px;
  flex: 0 0 auto;
  padding-right: 20px;
  text-align: left;
}

.fm-groesse-feld {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.fm-groesse-pfeil {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--fm-text-muted);
}

.fm-groesse-pfeil svg {
  width: 12px;
  height: 12px;
}

.fm-groesse-liste {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  z-index: 5;
  width: 72px;
  max-height: 220px;
  overflow-y: auto;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-radius-sm);
  background: var(--fm-card-bg);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
}

.fm-groesse-eintrag {
  display: block;
  width: 100%;
  padding: 5px 12px;
  border: none;
  background: transparent;
  color: var(--fm-text);
  font-family: inherit;
  font-size: 14px;
  text-align: left;
}

.fm-groesse-eintrag:hover,
.fm-groesse-eintrag:focus-visible {
  background: var(--fm-off-bg);
}

.fm-schieber-feld {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  flex: 0 0 auto;
}

.fm-schieber-eingabe {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.fm-form-control .fm-schieber-eingabe input {
  width: 64px;
  max-width: 64px;
  flex: 0 0 auto;
  text-align: right;
}

.fm-schieber-einheit {
  color: var(--fm-text-muted);
}

.fm-schieber {
  display: none;
  width: 180px;
  max-width: 100%;
}

.fm-schieber-feld:focus-within .fm-schieber {
  display: block;
}

.fm-schema-vorschau {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 140px;
  margin: 0 0 16px;
  padding: 6px;
  border: 1px solid var(--fm-border);
  border-radius: 6px;
  background: var(--fm-bg);
}

.fm-schema-vorschau-bild {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.fm-schema-vorschau-leer {
  margin: 0;
  color: var(--fm-text-muted);
}

.fm-schema-knopfzeile {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.fm-schema:not(.fm-schema-bearbeiten) .fm-schema-el[data-art="wert"],
.fm-schema:not(.fm-schema-bearbeiten) .fm-schema-el[data-art="system"],
.fm-schema:not(.fm-schema-bearbeiten) .fm-schema-el[data-art="weblink"],
.fm-schema:not(.fm-schema-bearbeiten) .fm-schema-el[data-art="schemalink"],
.fm-schema:not(.fm-schema-bearbeiten) .fm-schema-el[data-art="dashlink"] {
  cursor: pointer;
}

.fm-schema-bearbeiten .fm-schema-el {
  cursor: pointer;
}

.fm-schema-bearbeiten .fm-schema-el button,
.fm-schema-bearbeiten .fm-schema-el input,
.fm-schema-bearbeiten .fm-schema-el select {
  cursor: auto;
}

.fm-schema-bearbeiten .fm-schema-el-gewaehlt {
  outline: 2pt solid var(--fm-info);
  outline-offset: 0;

  overflow: visible;
}

.fm-schema-el-zahnrad {
  display: none;
}

.fm-schema-bearbeiten .fm-schema-el-zahnrad {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 1px;
  right: 1px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid var(--fm-border);
  border-radius: 4px;
  background: var(--fm-card-bg);
  color: var(--fm-text);

  z-index: 2;
}

.fm-schema-bearbeiten .fm-schema-el-zahnrad svg {
  width: 14px;
  height: 14px;
}

.fm-schema-bearbeiten .fm-schema-auswahl {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.fm-schema-bearbeiten .fm-schema-griff {
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--fm-info);
  border: none;
  pointer-events: auto;
}

.fm-schema-bearbeiten .fm-schema-griff[data-griff="ol"] {
  left: -7px;
  top: -7px;
  cursor: nwse-resize;
}

.fm-schema-bearbeiten .fm-schema-griff[data-griff="or"] {
  right: -7px;
  top: -7px;
  cursor: nesw-resize;
}

.fm-schema-bearbeiten .fm-schema-griff[data-griff="ul"] {
  left: -7px;
  bottom: -7px;
  cursor: nesw-resize;
}

.fm-schema-bearbeiten .fm-schema-griff[data-griff="ur"] {
  right: -7px;
  bottom: -7px;
  cursor: nwse-resize;
}

.fm-schema-bearbeiten .fm-schema-dreher {
  position: absolute;
  left: 50%;
  top: -40px;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  border: none;
  background: var(--fm-info);
  pointer-events: auto;
  cursor: pointer;
}

.fm-schema-bearbeiten .fm-schema-dreher::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 18px;
  width: 2px;
  height: 22px;
  margin-left: -1px;
  background: var(--fm-info);
}

@media (max-width: 767px) {
  .fm-schema-bearbeiten .fm-schema-auswahl {
    display: none;
  }
}

#fm-update-modal .fm-modal-karte {
  height: 640px;
  display: flex;
  flex-direction: column;
}

#fm-update-modal .fm-modal-karte > * {
  flex: none;
}
#fm-update-modal .fm-update-log {
  flex: 1 1 auto;
}
.fm-update-modal-schritt {
  margin: 0 0 8px;
  color: var(--fm-text-muted);
}
.fm-update-modal-meldung .fm-banner {
  margin: 0 0 8px;
  text-align: left;
}
.fm-update-log-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 6px;
  font-weight: 600;
  text-align: left;
}
.fm-update-log {
  min-height: 120px;
  margin: 0;
  padding: 8px 10px;
  overflow: auto;
  text-align: left;
  font-family: var(--fm-mono);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--fm-bg);
  color: var(--fm-text);
  border: 1px solid var(--fm-border);
  border-radius: 6px;
}
.fm-update [hidden] { display: none; }

.fm-update-dreht svg { animation: fm-update-drehen 0.7s linear infinite; }
@keyframes fm-update-drehen { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .fm-update-dreht svg { animation: none; opacity: 0.5; }
}

.fm-alarm-meldung { margin: 0 0 12px; text-align: left; }
.fm-alarm-meldung[hidden] { display: none; }
.fm-alarm-grenze[hidden] { display: none; }
.fm-alarm-neu { display: inline-flex; align-items: center; gap: 6px; }
.fm-alarm-neu svg { width: 16px; height: 16px; }

.fm-alarm-sev { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.fm-alarm-punkt { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; background: var(--fm-border); }
.fm-alarm-punkt-niedrig  { background: var(--fm-accent); }
.fm-alarm-punkt-mittel   { background: var(--fm-warn-solid); }
.fm-alarm-punkt-hoch     { background: var(--fm-alarm-hoch); }
.fm-alarm-punkt-kritisch { background: var(--fm-danger); }

.fm-alarm-zustand-ausgeloest { display: inline-flex; align-items: center; gap: 6px; color: var(--fm-danger); font-weight: 600; white-space: nowrap; }
.fm-alarm-zustand-ausgeloest svg { width: 16px; height: 16px; }
.fm-alarm-zustand-prueft { color: var(--fm-warn); white-space: nowrap; }
.fm-alarm-zustand-ok { color: var(--fm-text-muted); white-space: nowrap; }

.fm-alarm-aktionen { display: inline-flex; gap: 2px; }

#dashboards-tabelle .fm-btn-icon-aktion + .fm-btn-icon-aktion,
#schemata-tabelle .fm-btn-icon-aktion + .fm-btn-icon-aktion { margin-left: 2px; }
#alarme-tabelle .fm-btn-icon-aktion { width: 30px; height: 30px; }
#alarme-tabelle .fm-btn-icon-aktion svg { width: 18px; height: 18px; }
#alarme-tabelle td { vertical-align: middle; }

#fm-alarm-regel-modal .fm-modal-karte { height: 720px; }

.fm-alarm-kopf { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px 14px; align-items: end; text-align: left; }
.fm-alarm-feld-oben { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fm-alarm-feld-oben > span { font-size: 12.5px; font-weight: 600; color: var(--fm-text-muted); }
.fm-alarm-feld-oben input { width: 100%; max-width: none; }
.fm-alarm-aktiv-feld { display: flex; align-items: center; gap: 8px; padding-bottom: 6px; }

.fm-pop-kette { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 16px 0 14px; }
.fm-pop-glied {
  position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 88px; padding: 12px 14px;
  border: 1px solid var(--fm-border); border-radius: var(--fm-radius); background: var(--fm-card-bg);
  color: var(--fm-text); font: inherit; text-align: left;
}
.fm-pop-glied + .fm-pop-glied::before {
  content: ""; position: absolute; left: -19px; top: 50%; width: 18px; border-top: 1.5px solid var(--fm-border);
}
.fm-pop-glied + .fm-pop-glied::after {
  content: ""; position: absolute; left: -4px; top: calc(50% - 3.5px); width: 7px; height: 7px; border-radius: 50%;
  background: var(--fm-card-bg); border: 1.5px solid var(--fm-text-muted);
}
.fm-pop-glied-titel { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.fm-pop-glied-titel svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--fm-text-muted); }
.fm-pop-glied-text { color: var(--fm-text-muted); font-size: 13px; overflow-wrap: anywhere; }
.fm-pop-glied-aktiv { border-color: var(--fm-accent); box-shadow: 0 0 0 1px var(--fm-accent); }
.fm-pop-glied-aktiv .fm-pop-glied-titel svg { color: var(--fm-accent); }
.fm-pop-glied-offen { border-style: dashed; border-color: var(--fm-warn-solid); }
.fm-pop-glied-offen .fm-pop-glied-text { color: var(--fm-warn); }

.fm-alarm-bereich[hidden],
.fm-alarm-modal-karte .fm-form-label[hidden],
.fm-alarm-modal-karte .fm-form-help[hidden],
.fm-alarm-modal-karte select[hidden],
.fm-alarm-modal-karte input[hidden] { display: none; }
.fm-alarm-bereich { text-align: left; }

.fm-alarm-ausloesen { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 360px; min-width: 0; }
.fm-alarm-ausloesen .fm-alarm-operator,
.fm-alarm-ausloesen .fm-alarm-level,
.fm-alarm-ausloesen .fm-alarm-schwelle { flex: 1 1 0; width: auto; min-width: 0; max-width: none; }
.fm-alarm-schwelle { font-variant-numeric: tabular-nums; }
.fm-alarm-einheit { flex: 0 0 auto; color: var(--fm-text-muted); white-space: nowrap; }
.fm-alarm-einheit:empty { display: none; }

.fm-alarm-empf-zeile { align-items: flex-start; }
.fm-alarm-empf-liste { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.fm-alarm-empf {
  display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 10px;
  border: 1px solid var(--fm-border); border-radius: var(--fm-radius-sm); background: var(--fm-bg);
}
.fm-alarm-empf-icon { display: inline-flex; color: var(--fm-text-muted); }
.fm-alarm-empf-icon svg { width: 16px; height: 16px; }
.fm-alarm-empf-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.fm-alarm-empf-art { font-size: 12px; color: var(--fm-text-muted); white-space: nowrap; }
.fm-alarm-vorschlag-gruppe { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.fm-nb-standort-vorschlag.fm-alarm-vorschlag-aktiv { background: var(--fm-accent-soft); }
.fm-nb-standort-vorschlaege[hidden] { display: none; }

@media (max-width: 640px) {
  #fm-alarm-regel-modal .fm-modal-karte { height: 680px; }
  .fm-alarm-kopf { grid-template-columns: 1fr; }
  .fm-alarm-aktiv-feld { padding-bottom: 0; }
  .fm-pop-kette { grid-template-columns: 1fr; gap: 14px; }
  .fm-pop-glied { min-height: 0; }
  .fm-pop-glied + .fm-pop-glied::before { left: 50%; top: -15px; width: 0; height: 14px; border-top: 0; border-left: 1.5px solid var(--fm-border); }
  .fm-pop-glied + .fm-pop-glied::after { left: calc(50% - 3.5px); top: -4px; }
  .fm-alarm-empf-art { display: none; }
}

.fm-pop { display: flex; flex-direction: column; }
.fm-pop > * { flex-shrink: 0; }
.fm-pop > .fm-modal-speichern-zeile { margin-top: auto; padding-top: 16px; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.fm-pop > .fm-modal-speichern-zeile[hidden] { display: none; }
.fm-pop > .fm-modal-speichern-zeile .fm-btn { display: inline-flex; align-items: center; gap: 6px; }
.fm-pop > .fm-modal-speichern-zeile .fm-btn svg { width: 16px; height: 16px; flex: 0 0 auto; }
.fm-pop .fm-form-label-text { flex-basis: 200px; }
.fm-pop .fm-form-label + .fm-form-help { margin-left: 210px; }
.fm-pop .fm-form-control { gap: 8px; }
.fm-pop-klein { max-width: 440px; }
.fm-pop-mittel { max-width: 720px; }
.fm-pop-breit { max-width: 820px; }
.fm-pop-untertitel { margin: -8px 0 14px; color: var(--fm-text-muted); font-size: 13px; overflow-wrap: anywhere; }
.fm-pop-pflicht { color: var(--fm-danger); }
.fm-pop-meldung { text-align: left; }
.fm-pop-meldung[hidden] { display: none; }
.fm-pop-oben { align-items: flex-start; }
.fm-pop-oben > .fm-form-label-text { padding-top: 7px; }
.fm-form-label[hidden] { display: none; }

.fm-pop-abschnitt {
  display: flex; align-items: center; gap: 8px; margin: 16px 0 10px; text-align: left;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fm-text-muted);
}
.fm-pop-abschnitt::after { content: ""; flex: 1 1 auto; border-top: 1px solid var(--fm-border); }
.fm-pop-abschnitt svg { width: 15px; height: 15px; flex: 0 0 auto; }
.fm-pop-abschnitt[hidden] { display: none; }

.fm-pop-reiter { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--fm-border); margin: 2px 0 16px; }
.fm-pop-reiter button {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; padding: 8px 12px; margin-bottom: -1px;
  border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--fm-text-muted); font: inherit;
}
.fm-pop-reiter button svg { width: 15px; height: 15px; }
.fm-pop-reiter button[aria-selected="true"] { color: var(--fm-text); font-weight: 600; border-bottom-color: var(--fm-accent); }
.fm-pop-reiter[hidden] { display: none; }

.fm-pop-reiter-inhalt { text-align: left; flex: 1 1 100%; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.fm-pop .fm-form-row { border-bottom: none; }
.fm-pop-reiter-inhalt[hidden] { display: none; }

.fm-segment { display: inline-flex; width: 100%; max-width: 360px; border: 1px solid var(--fm-border); border-radius: var(--fm-radius-sm); overflow: hidden; }
.fm-segment button {
  flex: 1 1 0; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 8px; border: 0; background: var(--fm-card-bg); color: var(--fm-text); font: inherit;
}
.fm-segment button + button { border-left: 1px solid var(--fm-border); }
.fm-segment button svg { width: 16px; height: 16px; flex: 0 0 auto; }
.fm-segment button[aria-pressed="true"] { background: var(--fm-accent-soft); color: var(--fm-accent-strong); font-weight: 600; }
.fm-segment button:disabled { opacity: 0.5; }
.fm-segment[hidden] { display: none; }

.fm-pop-kombi { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 360px; min-width: 0; }
.fm-pop-kombi > input, .fm-pop-kombi > select { flex: 1 1 0; width: auto; min-width: 0; max-width: none; }
.fm-pop-kombi[hidden] { display: none; }

.fm-wertliste { display: flex; flex-direction: column; width: 100%; max-width: 360px; margin: 0; text-align: left; }
.fm-wertliste > div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--fm-border); font-size: 13px; }
.fm-wertliste dt { color: var(--fm-text-muted); }
.fm-wertliste dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.fm-wertliste[hidden] { display: none; }

.fm-gefahrenzone { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border: 1px solid var(--fm-danger); border-radius: var(--fm-radius); text-align: left; }
.fm-gefahrenzone[hidden] { display: none; }

@media (max-width: 640px) {
  .fm-pop .fm-form-label-text { flex-basis: auto; }
  .fm-pop .fm-form-label + .fm-form-help { margin-left: 0; }
  .fm-pop-oben > .fm-form-label-text { padding-top: 0; }
  .fm-segment, .fm-pop-kombi, .fm-wertliste { max-width: none; }
}

.fm-pop-symbol { width: 44px; height: 44px; margin: -6px auto 10px; border-radius: 50%; display: grid; place-items: center; }
.fm-pop-symbol svg { width: 22px; height: 22px; }
.fm-pop-symbol-loeschen { background: var(--fm-danger-bg); color: var(--fm-danger); }
.fm-pop-symbol-warn { background: var(--fm-warn-bg); color: var(--fm-warn); }
.fm-pop-abfrage > .fm-modal-titel { margin-bottom: 8px; }

.fm-pop-abfrage > .fm-pop-symbol { order: -1; margin: 0 auto 10px; }
.fm-pop-frage { margin: 0 auto; max-width: 46ch; text-align: center; line-height: 1.5; overflow-wrap: anywhere; }
.fm-pop-folgen { list-style: none; margin: 12px auto 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-width: 100%; font-size: 13.5px; text-align: left; }
.fm-pop-folgen li { display: flex; align-items: baseline; gap: 8px; overflow-wrap: anywhere; }
.fm-pop-folgen li::before { content: ""; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--fm-danger); transform: translateY(-1px); }
.fm-pop-symbol-warn ~ .fm-pop-folgen li::before { background: var(--fm-warn-solid); }
.fm-pop-folgen[hidden] { display: none; }
.fm-pop-name { display: flex; flex-direction: column; gap: 4px; width: 100%; max-width: 360px; margin: 16px auto 0; text-align: left; }
.fm-pop-name > span { font-size: 12.5px; font-weight: 600; color: var(--fm-text-muted); overflow-wrap: anywhere; }
.fm-pop-name input { width: 100%; }
.fm-pop-name[hidden] { display: none; }
.fm-btn.fm-btn-danger-voll { background: var(--fm-danger); border-color: var(--fm-danger); color: #fff; }
.fm-btn.fm-btn-warn-voll { background: var(--fm-warn-solid); border-color: var(--fm-warn-solid); color: #1c1400; }
.fm-btn.fm-btn-danger-voll:disabled,
.fm-btn.fm-btn-warn-voll:disabled { background: var(--fm-off-bg); border-color: var(--fm-border); color: var(--fm-text-muted); }

.fm-pop-felder { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.fm-pop-feld-oben { display: flex; flex-direction: column; gap: 4px; }
.fm-pop-feld-oben > span { font-weight: 600; }
.fm-pop-feld-oben input,
.fm-pop-feld-oben select,
.fm-pop-feld-oben textarea { width: 100%; max-width: none; }
.fm-pop-feld-oben[hidden] { display: none; }

#fm-standort-modal .fm-modal-karte { height: 420px; }

.fm-pop .fm-btn.fm-btn-danger { background: var(--fm-card-bg); color: var(--fm-danger); border-color: var(--fm-danger); }
.fm-pop .fm-btn.fm-btn-danger:hover { background: var(--fm-danger-bg); }
.fm-gefahrenzone .fm-form-control { flex-wrap: wrap; }
.fm-gefahrenzone .fm-btn { display: inline-flex; align-items: center; gap: 6px; }
.fm-gefahrenzone .fm-btn svg { width: 16px; height: 16px; }

#fm-ms-modal .fm-modal-karte { height: 460px; }
#fm-ms-modal .fm-pop-abschnitt:first-child { margin-top: 0; }

#fm-nutzer-aktiviert-modal .fm-modal-karte { height: 330px; }
.fm-pop input.fm-pop-ergebnis:read-only,
.fm-pop input.fm-pop-ergebnis:read-only:hover { background: var(--fm-bg); color: var(--fm-text); }

.fm-pop-kombi > .fm-eingabe-mit-status { flex: 1 1 0; min-width: 0; max-width: none; }
.fm-pop-kombi > .fm-eingabe-mit-status input { max-width: none; }
.fm-pop-kombi > .fm-btn-icon { flex: 0 0 auto; }

.fm-pop-kombi > .fm-pop-platz { visibility: hidden; }

.fm-staerke { display: flex; align-items: center; gap: 10px; max-width: 360px; }
.fm-staerke-spur { flex: 1 1 auto; height: 6px; border-radius: 999px; background: var(--fm-off-bg); overflow: hidden; }
.fm-staerke-spur i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--fm-danger); }
.fm-staerke[data-stufe="mittel"] .fm-staerke-spur i { background: var(--fm-warn-solid); }
.fm-staerke[data-stufe="stark"] .fm-staerke-spur i { background: var(--fm-accent); }
.fm-staerke > span:last-child { white-space: nowrap; }
.fm-staerke[hidden] { display: none; }
.fm-pop-hinweis { margin-bottom: 12px; text-align: left; }
#fm-vault-einrichten .fm-modal-karte { height: 420px; }

#fm-vault-verwalten .fm-modal-karte { height: 470px; }

#fm-vault-wh[data-modus="wiederherstellen"] .fm-modal-karte { height: 470px; }
#fm-vault-wh[data-modus="neu"] .fm-modal-karte { height: 300px; }
#fm-vault-einrichten[data-schritt="code"] .fm-modal-karte,
#fm-vault-wh[data-schritt="code"] .fm-modal-karte { height: 470px; }
[data-wh-schritt] .fm-code-ergebnis .fm-code { font-size: clamp(14px, 4vw, 17px); letter-spacing: .06em; text-align: center; word-break: normal; }

#fm-code-neu-modal [data-np-schritt="pw"] .fm-form-label { flex-direction: column; align-items: stretch; gap: 4px; }
#fm-code-neu-modal [data-np-schritt="pw"] .fm-form-label-text { flex: none; font-weight: 600; padding-top: 0; }
#fm-code-neu-modal [data-np-schritt="pw"] .fm-form-control { flex: none; width: 100%; }
#fm-code-neu-modal [data-np-schritt="pw"] .fm-form-label + .fm-form-help { margin-left: 0; }
#fm-code-neu-modal .fm-pop-untertitel { text-align: center; }
#fm-code-neu-modal [data-np-schritt="pw"] .fm-pop-kombi,
#fm-code-neu-modal [data-np-schritt="pw"] .fm-staerke { max-width: none; }
#fm-code-neu-modal [data-np-schritt="pw"] .fm-eingabe-mit-status { flex: 1 1 0; min-width: 0; }
#fm-code-neu-modal [data-np-schritt="pw"] .fm-eingabe-mit-status input { width: 100%; max-width: none; }
#fm-vault-wh[data-modus="wiederherstellen"]:not([data-schritt="code"]) .fm-modal-karte { height: 400px; }
.fm-wh-haken { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.fm-wh-eingabe { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .04em; text-transform: uppercase; }

.fm-notfallblatt { display: none; }
.fm-notfallblatt { background: #fff; color: #1b1f24; max-width: 640px; margin: 0 auto; padding: 32px 36px; font-size: 14px; line-height: 1.5; }
.fm-notfallblatt h3 { margin: 18px 0 2px; font-size: 22px; }
.fm-nb-kopf { display: flex; justify-content: space-between; border-bottom: 2px solid #1b1f24; padding-bottom: 8px; font-size: 13px; }
.fm-nb-meta { color: #57606a; margin: 0 0 18px; font-size: 13px; }
.fm-nb-code { display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; border: 2px dashed #8c959f; border-radius: 6px; padding: 16px 20px; margin-bottom: 18px; }
.fm-nb-code p { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #57606a; }
.fm-nb-code pre { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: .08em; white-space: pre-wrap; word-break: break-all; }
.fm-nb-qr, .fm-nb-qr svg { width: 132px; height: 132px; flex: none; display: block; }
.fm-notfallblatt ul { padding-left: 18px; }
.fm-nb-fuss { border-top: 1px solid #d0d7de; padding-top: 10px; margin-top: 18px; font-weight: 600; }
@media print {
  html.fm-druck-notfall body > *:not(.fm-notfallblatt) { display: none !important; }
  html.fm-druck-notfall body { background: #fff; }
  html.fm-druck-notfall .fm-notfallblatt { display: block; }
}
.fm-pop .fm-form-control .fm-btn { display: inline-flex; align-items: center; gap: 6px; }
.fm-pop .fm-form-control .fm-btn svg { width: 16px; height: 16px; }

.fm-pop .fm-gefahrenzone .fm-form-label-text { flex-basis: 185px; }
@media (max-width: 640px) {
  .fm-pop .fm-gefahrenzone .fm-form-label-text { flex-basis: auto; }
}

#fm-vault-eintrag-modal .fm-modal-karte { height: 490px; }
#fm-vault-eintrag-modal .fm-pop-abschnitt:first-child { margin-top: 0; }

.fm-pop > .fm-modal-speichern-zeile .fm-btn[hidden],
.fm-pop .fm-form-control .fm-btn[hidden],
.fm-gefahrenzone .fm-btn[hidden] { display: none; }
#fm-charts-konfig-modal .fm-modal-karte { height: 380px; }

#fm-schema-element-modal .fm-pop-reiter-inhalt > .fm-form-row { padding: 0; }
#fm-schema-element-modal .fm-pop-kombi .fm-switch { flex: 0 0 auto; }

.fm-pop .fm-form-control .fm-pop-kombi > input,
.fm-pop .fm-form-control .fm-pop-kombi > select { flex: 1 1 0; width: auto; min-width: 0; max-width: none; }
#fm-schema-bild-modal .fm-pop-meldung + .fm-banner-warn { margin-bottom: 12px; }

.fm-pop-reiter button[hidden] { display: none; }
.fm-schema-el-vorschau { position: relative; }

.fm-schema-vorschau-zustand {
  position: absolute; left: 0; right: 0; bottom: 3px; margin: 0;
  font-size: 12px; color: var(--fm-text-muted); text-align: center;
}
.fm-schema-vorschau-zustand:empty { display: none; }
.fm-icon-slots button { gap: 6px; }
.fm-icon-slot-bild { width: 18px; height: 18px; flex: 0 0 auto; fill: currentColor; }
.fm-icon-slot-leer { width: 16px; height: 16px; flex: 0 0 auto; border: 1.5px dashed var(--fm-border); border-radius: 4px; }
.fm-icon-slots button > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-icon-wahl { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.fm-icon-suche { position: relative; display: block; }
.fm-icon-suche svg { position: absolute; left: 10px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--fm-text-muted); pointer-events: none; }
.fm-pop .fm-icon-suche input { width: 100%; max-width: none; padding-left: 34px; }
.fm-icon-gruppen { display: flex; flex-wrap: wrap; gap: 6px; }
.fm-icon-gruppe {
  padding: 3px 10px; border: 1px solid var(--fm-border); border-radius: 999px;
  background: var(--fm-card-bg); color: var(--fm-text-muted); font: inherit; font-size: 12.5px;
}
.fm-icon-gruppe[aria-pressed="true"] { background: var(--fm-accent-soft); color: var(--fm-accent-strong); border-color: var(--fm-accent); font-weight: 600; }

.fm-icon-raster {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; align-content: start;
  height: 224px; overflow-y: auto; padding: 8px;
  border: 1px solid var(--fm-border); border-radius: var(--fm-radius-sm); background: var(--fm-bg);
}
.fm-icon-kachel {
  display: grid; place-items: center; aspect-ratio: 1; min-height: 40px; padding: 0;
  border: 1px solid transparent; border-radius: var(--fm-radius-sm); background: var(--fm-card-bg); color: var(--fm-text);
}
.fm-icon-kachel svg { width: 24px; height: 24px; fill: currentColor; }
.fm-icon-kachel-leer svg { fill: none; stroke: var(--fm-text-muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fm-icon-kachel[aria-pressed="true"] { border-color: var(--fm-accent); background: var(--fm-accent-soft); color: var(--fm-accent-strong); box-shadow: 0 0 0 1px var(--fm-accent); }
.fm-icon-kachel:focus-visible, .fm-icon-gruppe:focus-visible { outline: 2px solid var(--fm-accent); outline-offset: 1px; }
.fm-icon-raster-leer { grid-column: 1 / -1; margin: 0; padding: 24px 8px; text-align: center; color: var(--fm-text-muted); }
.fm-icon-gewaehlt { min-height: 19px; font-size: 13px; color: var(--fm-text-muted); }
.fm-icon-farbe-schalter { display: inline-flex; align-items: center; gap: 8px; margin-left: 10px; }

#fm-charts-reihenfolge-modal .fm-modal-karte { height: 560px; }
#fm-charts-reihenfolge-modal .fm-charts-reihenfolge-liste { flex: 1 1 auto; min-height: 0; max-height: none; margin: 0; text-align: left; }
.fm-charts-reihenfolge-suche { margin-bottom: 10px; }
.fm-charts-reihenfolge-suche input { width: 100%; }
.fm-charts-reihenfolge-label small { display: block; font-size: 12px; color: var(--fm-text-muted); }
.fm-charts-reihenfolge-zeile[hidden] { display: none; }

#fm-meldung-modal .fm-modal-karte { height: 540px; }
.fm-meldung-detail > .fm-pop-symbol { order: -1; margin: -6px auto 10px; }
.fm-pop-symbol-info { background: var(--fm-info-bg); color: var(--fm-info); }
.fm-meldung-detail > .fm-modal-titel { margin-bottom: 4px; overflow-wrap: anywhere; }
.fm-meldung-chip { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--fm-off-bg); color: var(--fm-text-muted); }
.fm-meldung-chip-error { background: var(--fm-danger-bg); color: var(--fm-danger); }
.fm-meldung-chip-warn { background: var(--fm-warn-bg); color: var(--fm-warn); }
.fm-meldung-chip-info { background: var(--fm-info-bg); color: var(--fm-info); }
.fm-meldung-beschreibung { margin: 10px 0 0; padding: 10px 12px; border: 1px solid var(--fm-border); border-radius: var(--fm-radius-sm); background: var(--fm-bg); text-align: left; overflow-wrap: anywhere; }
.fm-meldung-beschreibung:empty { display: none; }
.fm-zeitleiste { list-style: none; margin: 0; padding: 0; text-align: left; }
.fm-zeitleiste li { position: relative; padding: 0 0 12px 24px; font-size: 13.5px; }
.fm-zeitleiste li::before { content: ""; position: absolute; left: 4px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--fm-accent); border: 2px solid var(--fm-accent); }
.fm-zeitleiste li::after { content: ""; position: absolute; left: 9px; top: 18px; bottom: 0; border-left: 1.5px solid var(--fm-border); }
.fm-zeitleiste li:last-child::after { display: none; }
.fm-zeitleiste li[data-modal-quittiert-zeile]:not(.an)::before { background: var(--fm-card-bg); border-color: var(--fm-text-muted); }
.fm-zeitleiste li > span:last-child { margin-left: 6px; color: var(--fm-text-muted); font-size: 12.5px; }

#fm-update-modal .fm-modal-karte { height: 560px; }
.fm-update-fz { display: flex; justify-content: space-between; gap: 12px; margin: 6px 0 12px; font-size: 13px; color: var(--fm-text-muted); text-align: left; }
.fm-schrittliste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; text-align: left; }
.fm-schrittliste li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--fm-text-muted); }
.fm-schrittliste li.fertig, .fm-schrittliste li.aktiv { color: var(--fm-text); }
.fm-schrittliste li.aktiv { font-weight: 600; }
.fm-schrittliste li.fehler { color: var(--fm-danger); font-weight: 600; }
.fm-schritt-punkt { width: 20px; height: 20px; flex: 0 0 auto; border-radius: 50%; border: 1.5px solid var(--fm-border); display: grid; place-items: center; }
.fm-schritt-punkt svg { width: 13px; height: 13px; }
.fm-schritt-haken, .fm-schritt-kreuz { display: none; }
.fm-schrittliste li.fertig .fm-schritt-punkt { background: var(--fm-accent); border-color: var(--fm-accent); color: var(--fm-accent-text); }
.fm-schrittliste li.fertig .fm-schritt-haken { display: grid; }
.fm-schrittliste li.fehler .fm-schritt-punkt { background: var(--fm-danger); border-color: var(--fm-danger); color: #fff; }
.fm-schrittliste li.fehler .fm-schritt-kreuz { display: grid; }
.fm-schrittliste li.aktiv .fm-schritt-punkt { border: 2.5px solid var(--fm-accent); border-right-color: transparent; animation: fm-dreh 1s linear infinite; }
@keyframes fm-dreh { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .fm-schrittliste li.aktiv .fm-schritt-punkt { animation: none; } }
.fm-update-protokoll { margin-top: 14px; text-align: left; }
.fm-update-protokoll summary { font-weight: 600; font-size: 13px; }
.fm-update-protokoll .fm-update-log { max-height: 180px; overflow: auto; }

#fm-schema-verlauf-modal .fm-modal-karte { height: 600px; }
#fm-schema-verlauf-modal .fm-schema-verlauf-chart { flex: 1 1 auto; height: auto; min-height: 240px; }
.fm-kennzahlen { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; text-align: left; }
.fm-kennzahl { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--fm-border); border-radius: var(--fm-radius-sm); }
.fm-kennzahl span { font-size: 11.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fm-text-muted); }
.fm-kennzahl b { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.fm-verlauf-leiste { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.fm-verlauf-leiste .fm-segment { max-width: 260px; }
.fm-verlauf-leiste-knoepfe { display: inline-flex; gap: 6px; }
@media (max-width: 640px) {
  .fm-kennzahlen { grid-template-columns: repeat(2, 1fr); }
}

#fm-projekt-custom-upload-modal .fm-modal-karte { height: 440px; }
.fm-pc-bezug { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding: 10px 12px; border: 1px solid var(--fm-border); border-radius: var(--fm-radius-sm); background: var(--fm-bg); text-align: left; }
.fm-pc-bezug[hidden] { display: none; }
.fm-pc-bezug svg { width: 22px; height: 22px; color: var(--fm-text-muted); flex: 0 0 auto; }
.fm-pc-bezug div { display: flex; flex-direction: column; min-width: 0; }
.fm-pc-bezug b { overflow-wrap: anywhere; }
.fm-pc-bezug small { color: var(--fm-text-muted); font-size: 12px; }
.fm-pc-ablage { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.fm-pc-ablage > svg { width: 26px; height: 26px; color: var(--fm-text-muted); }
.fm-pc-ablage p { margin: 0; }
.fm-pc-ablage small { color: var(--fm-text-muted); font-size: 12px; }
.fm-pc-ablage .fm-fortschritt { width: 100%; max-width: 300px; }

.fm-pc-ablage.fm-pc-laedt > p,
.fm-pc-ablage.fm-pc-laedt > .fm-btn,
.fm-pc-ablage.fm-pc-laedt > small { display: none; }
.fm-pc-name { max-width: 100%; overflow-wrap: anywhere; text-align: center; }

#fm-code-ergebnis-modal .fm-modal-karte { height: 340px; }
.fm-code-ergebnis-ok { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; color: var(--fm-accent); font-weight: 500; }
.fm-code-ergebnis-ok svg { width: 16px; height: 16px; flex: none; }
.fm-code-ergebnis { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; background: var(--fm-bg);
  border: 1px solid var(--fm-border); border-radius: var(--fm-radius-sm); }
.fm-code-ergebnis .fm-code { margin: 0; font-size: 12px; }
.fm-code-ergebnis-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--fm-text-muted); }
@media (max-width: 640px) {
  #fm-code-ergebnis-modal .fm-modal-karte { height: 420px; }
}

.fm-pop-abfrage { height: var(--fm-pop-h); }
@media (max-width: 640px) {
  .fm-pop-abfrage { height: calc(var(--fm-pop-h) + 60px); }
}

.fm-fw-knopf .fm-fw-punkt { display: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.fm-fw-knopf.fm-fw-knopf-wartet .fm-fw-punkt,
.fm-fw-knopf.fm-fw-knopf-aktiv .fm-fw-punkt { display: inline-block; animation: fm-fw-puls 1.6s ease-in-out infinite; }

.fm-geraet-links .fm-fw-knopf.fm-fw-knopf-aktiv svg { display: none; }
.fm-btn.fm-fw-knopf.fm-fw-knopf-aktiv,
.fm-btn.fm-fw-knopf.fm-fw-knopf-aktiv:hover { background: var(--fm-danger); border-color: var(--fm-danger); color: #fff; opacity: 1; }
@keyframes fm-fw-puls { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

#fm-fernwartung-modal .fm-modal-karte { height: 500px; }
.fm-fw { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.fm-fw-teil { display: flex; flex-direction: column; gap: 12px; }
.fm-fw-teil[hidden], .fm-fw-fehler[hidden], .fm-fw-master[hidden], .fm-fw .fm-banner[hidden] { display: none; }

.fm-fw .fm-banner { margin: 0; }
.fm-fw .fm-pop-kombi { max-width: none; }
.fm-fw-trenn { border: 0; border-top: 1px solid var(--fm-border); margin: 0 0 12px; }

.fm-fw-schalter { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; margin: 0; font-weight: 600; }
.fm-fw-schalter .fm-switch { flex: 0 0 auto; }
.fm-fw-schalter .fm-switch input:checked + .fm-switch-track { background: var(--fm-warn-solid); border-color: var(--fm-warn-solid); }
.fm-fw-offen-kopf[hidden] { display: none; }

.fm-fw-fehler { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: start;
  padding: 12px 36px 12px 12px; border: 1.5px solid var(--fm-danger); background: var(--fm-danger-bg); border-radius: var(--fm-radius-sm); }
.fm-fw-fehler > svg { width: 26px; height: 26px; color: var(--fm-danger); }
.fm-fw-fehler-titel { margin: 0; font-weight: 600; font-size: 15px; line-height: 1.4; color: var(--fm-danger); overflow-wrap: anywhere; }
.fm-fw-fehler-zeit { margin: 4px 0 0; font: 11px var(--fm-mono); color: var(--fm-text-muted); }
.fm-fw-fehler-zeit:empty { display: none; }
.fm-fw-fehler.fm-fw-fehler-gelb { border-color: var(--fm-warn-solid); background: var(--fm-warn-bg); }
.fm-fw-fehler.fm-fw-fehler-gelb > svg,
.fm-fw-fehler.fm-fw-fehler-gelb .fm-fw-fehler-titel { color: var(--fm-warn); }

.fm-fw-warten { align-items: center; text-align: center; padding-top: 6px; }
.fm-fw-warten-titel { margin: 0; font-weight: 600; font-size: 15px; }
.fm-fw-warten-hinweis { margin: 0; font-size: 12.5px; color: var(--fm-text-muted); max-width: 38ch; }
.fm-fw-balken { position: relative; width: 100%; height: 6px; border-radius: 3px; background: var(--fm-off-bg); overflow: hidden; }
.fm-fw-balken i { position: absolute; top: 0; bottom: 0; left: -35%; width: 35%; border-radius: 3px; background: var(--fm-accent);
  animation: fm-fw-lauf 1.4s ease-in-out infinite; }
.fm-fw-balken.fm-fw-balken-steht i { animation-play-state: paused; }
@keyframes fm-fw-lauf { from { left: -35%; } to { left: 100%; } }
.fm-fw-schritte { list-style: none; margin: 4px 0 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 8px; text-align: left; font-size: 13px; }
.fm-fw-schritte li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.fm-fw-s { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--fm-border); display: grid; place-items: center; color: transparent; }
.fm-fw-s svg { width: 12px; height: 12px; }
.fm-fw-schritt-fertig .fm-fw-s { background: var(--fm-accent); border-color: var(--fm-accent); color: var(--fm-accent-text); }
.fm-fw-schritt-laeuft .fm-fw-s { border-color: var(--fm-accent); border-top-color: transparent; animation: fm-fw-dreh 1s linear infinite; }
.fm-fw-schritt-offen { color: var(--fm-text-muted); }
.fm-fw-zeit { font: 12px var(--fm-mono); color: var(--fm-text-muted); font-variant-numeric: tabular-nums; }
@keyframes fm-fw-dreh { to { transform: rotate(360deg); } }

.fm-fw-offen-kopf { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; color: var(--fm-accent); font-weight: 600; }
.fm-fw-offen-kopf svg { width: 18px; height: 18px; }
.fm-fw-link-zeile { display: flex; gap: 8px; align-items: center; }
.fm-fw-link { flex: 1 1 auto; min-width: 0; padding: 7px 10px; border: 1px solid var(--fm-border); border-radius: var(--fm-radius-sm);
  background: var(--fm-bg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-fw-link a { color: var(--fm-info); }
.fm-fw-link-zeile > .fm-btn-icon { flex: 0 0 auto; }
.fm-fw .fm-wertliste { max-width: none; }

.fm-fw-tab-hinweis { margin: 0; text-align: center; }
.fm-fw-knopfzeile { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.fm-fs-body { margin: 0; background: var(--fm-bg); color: var(--fm-text); }
.fm-fs-mitte { display: flex; justify-content: center; padding: 40px 16px; }
.fm-fs-mitte[hidden] { display: none; }
.fm-fs-karte { width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 12px; }
.fm-fs-karte .fm-card-title { margin: 0; }
.fm-fs-karte .fm-form-help { margin: 0; }
.fm-fs-geraet { position: fixed; inset: 0; width: 100%; height: 100%; border: 0; background: var(--fm-bg); }
.fm-fs-geraet[hidden] { display: none; }
.fm-fs-pw { flex: 1 1 auto; min-width: 0; font-family: var(--fm-mono); }

@media (prefers-reduced-motion: reduce) {
  .fm-fw-balken i, .fm-fw-schritt-laeuft .fm-fw-s, .fm-fw-knopf .fm-fw-punkt { animation: none; }
  .fm-fw-balken i { left: 0; width: 100%; opacity: .5; }
}

.fm-charts-werkzeug-rechts .fm-btn,
.fm-charts-werkzeug-rechts .fm-aktion-form { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.fm-charts-werkzeug-rechts .fm-btn svg { width: 16px; height: 16px; flex: 0 0 auto; }
.fm-auftrag-ziel { display: block; font-size: 12px; color: var(--fm-text-muted); }
.fm-auftrag-fehler { color: var(--fm-danger); }
#auftraege-tabelle .fm-col-zeitpunkt { white-space: nowrap; }
.fm-auftrag-zustand-mobil { display: none; }

@media (max-width: 900px) {
  #auftraege-tabelle .fm-col-versuche { display: none; }
}
@media (max-width: 640px) {
  #auftraege-tabelle .fm-col-von,
  #auftraege-tabelle .fm-col-zustand,
  #auftraege-tabelle .fm-col-rueck { display: none; }
  #auftraege-tabelle .fm-col-zeitpunkt { white-space: normal; }
  .fm-auftrag-zustand-mobil { display: block; margin-top: 4px; }
}

.fm-backups-werkzeug .fm-charts-werkzeug-links { flex: 1 1 360px; }
.fm-backups-werkzeug .fm-form-help { margin: 0; }

.fm-stumm-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; background: var(--fm-warn-bg); color: var(--fm-warn); }
.fm-stumm-chip svg { width: 14px; height: 14px; }
#fm-stumm-modal .fm-modal-karte { height: 360px; }
#fm-auftrag-modal .fm-modal-karte { height: 470px; }
.fm-auftrag-detail .fm-modal-titel { overflow-wrap: anywhere; }
.fm-auftrag-detail .fm-wertliste dd { overflow-wrap: anywhere; }
.fm-auftrag-roh[hidden] { display: none; }

.fm-tabellen-titel { margin-bottom: 6px; }
.fm-tabellen-titel.fm-gateways-kopf { margin-top: 20px; }
.fm-via { display: block; font-size: 12.5px; color: var(--fm-text-muted); }
.fm-via.fm-via-ohne { color: var(--fm-warn); }
.fm-via.fm-via-konflikt { color: var(--fm-danger); }

.fm-code-wege { display: grid; gap: 8px; }
.fm-code-wege button { display: grid; gap: 2px; text-align: left; font: inherit; color: var(--fm-text);
  background: var(--fm-card-bg); border: 1px solid var(--fm-border); border-radius: var(--fm-radius-sm); padding: 9px 12px; }
.fm-code-wege button strong { font-size: 14px; }
.fm-code-wege button span { font-size: 12.5px; color: var(--fm-text-muted); }
.fm-code-wege button[aria-pressed="true"] { border-color: var(--fm-accent); background: var(--fm-accent-soft); }

.fm-code-wege button:disabled { opacity: 0.55; background: var(--fm-off-bg); }

@media (max-width: 640px) {
  .fm-modal-karte.fm-pop:not(.fm-pop-klein) { height: calc(100vh - 40px) !important; }

  .fm-pop .fm-form-row > .fm-form-help { flex-basis: auto; }
}

@media (max-width: 1080px) {
  .fm-head { position: relative; flex-wrap: nowrap; gap: 10px; }
  .fm-head-rolle-mobil { display: inline-flex; margin-left: auto; }
  .fm-head-menue-knopf { display: inline-flex; flex: none; }
  .fm-head-menue { display: none; }
  .fm-head-menue.fm-offen {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 60;
    padding: 12px 16px 16px;
    background: var(--fm-card-bg);
    border-bottom: 1px solid var(--fm-border);
    box-shadow: var(--fm-shadow);
  }
  .fm-head-menue .fm-nav { flex-direction: column; flex: none; }
  .fm-head-menue .fm-head-user { margin-left: 0; flex-wrap: wrap; }
  .fm-head-menue .fm-user-rolle { display: none; }
}
