:root {
  /* Optimizely Axiom Design System, Tokens ueber den MCP-Server
     @optiaxiom/mcp 3.0.8 abgerufen (20.08.2026). Der vollstaendige Satz liegt
     in docs/axiom-tokens.json -- die Namen unten sind die dortigen Token-Namen,
     damit nachvollziehbar bleibt, woher jeder Wert stammt.

     Die Akzentfarbe ist ein kraeftiges Limettengruen und traegt IMMER dunklen
     Text (fg.default darauf: 12,9:1). Weisser Text auf dieser Flaeche waere
     unlesbar -- das ist der Grund, warum unten ueberall --text als Schriftfarbe
     auf --accent-bg steht.

     Alle Paarungen sind nachgerechnet und erreichen mindestens 4,5:1; einzige
     Ausnahme ist fg.disabled, was bei deaktivierten Elementen so gewollt und
     von WCAG ausgenommen ist. */

  --bg: #F9FCF8;              /* bg.page */
  --panel: #FFFFFF;           /* bg.default */
  --panel-2: #EFF5EB;         /* bg.secondary */
  --line: #D8E4CB;            /* border.default */
  --line-soft: #E4F0DA;       /* border.secondary */

  --text: #202320;            /* fg.default */
  --muted: #484E46;           /* fg.secondary */
  --muted-2: #616755;         /* fg.tertiary */
  --disabled: #A1AC8D;        /* fg.disabled */

  --accent: #226B1E;          /* fg.link.default -- Akzent als SCHRIFT */
  --accent-bg: #ABFF44;       /* bg.accent -- Akzent als FLAECHE, dunkler Text */
  /* Die Schrift AUF der Akzentflaeche. In Axiom ist das --text, weil das
     Limettengruen hell ist. Als eigenes Token, damit White Labeling es
     umstellen kann: eine dunkle Markenfarbe -- Magenta, Marineblau -- braucht
     helle Schrift, und ohne diese Trennung waere jeder Knopf unlesbar.
     Der Standardwert aendert an Axiom nichts. */
  --accent-fg: var(--text);
  --accent-bg-hover: #99F141; /* bg.accent.hovered */
  --accent-subtle: #EEFFD9;   /* bg.accent.subtle */
  --pill: #D8E4CB;            /* bg.pill.default */

  --success-text: #226B1E;    /* fg.success.strong */
  /* Badge-Intents nach Axiom: subtile Flaeche plus passender Rand. */
  --bg-success-subtle: #EEFFD9;   /* bg.success.subtle */
  --border-success: #5F9B85;      /* border.success */
  --bg-warning-subtle: #FEF1C6;   /* bg.warning.subtle */
  --border-warning: #F79008;      /* border.warning */
  --bg-error-subtle: #FFDFE8;     /* bg.error.subtle */
  --bg-neutral: #F5F6F7;          /* bg.message.neutral */
  --warn-text: #B54707;       /* fg.warning.strong */
  --danger: #8F4764;          /* fg.error */
  --danger-border: #A95A77;   /* border.error */
  --info: #036988;            /* fg.information.strong */
  --focus: #197A94;           /* border.focus */

  /* Breite des Telefons. Die Vorschau-Box darunter nimmt dieselbe -- als
     zwei getrennte Zahlen liefen sie frueher oder spaeter auseinander. */
  --telefon-breite: 340px;

  /* borderRadius */
  --radius-sm: 6px;
  --radius: 8px;              /* md */
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* boxShadow */
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  /* fontFamily. Die Grotesk B und Roboto Variable sind lizenzpflichtig und
     werden hier nicht nachgeladen -- die CSP verbietet externe Quellen. Der
     Stack steht trotzdem vollstaendig da: auf Rechnern, wo die Schriften
     installiert sind, greifen sie; sonst faellt es sauber auf system-ui. */
  --font-sans: "Die Grotesk B", "DI Grotesk B", "Roboto Variable", system-ui, sans-serif;
  --font-mono: "Roboto Mono Variable", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  font-synthesis: none;
}

* { box-sizing: border-box; }

/* [hidden] setzt nur display:none aus dem Browser-Stylesheet -- jede eigene
   display-Regel ueberstimmt das. .layout ist ein Grid, der Editor blieb
   dadurch beim Ansichtswechsel sichtbar. */
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  font-size: 14px;
  line-height: 20px;
  color: var(--text);
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo {
  background: var(--accent-bg);
  color: var(--accent-fg);
  font-weight: 800;
  padding: 8px 10px;
  border-radius: var(--radius);
  letter-spacing: 1px;
}
/* Traegt die Marke ein Bild statt des Kurzzeichens, ist das Kaestchen nur
   noch Rahmen: keine Flaeche, kein Innenabstand -- ein Logo bringt seinen
   eigenen mit. */
.logo-mit-bild { background: none; padding: 0; }
.logo-bild { display: block; max-height: 32px; max-width: 120px; object-fit: contain; }
.topbar h1 { font-size: 17px; margin: 0; }
.sub { margin: 0; font-size: 12px; color: var(--muted); }
.send-status { font-size: 12px; color: var(--muted); }
.send-status.on { color: var(--success-text); }
.send-status.off { color: var(--muted); }
.send-status.warn { color: var(--warn-text); }
.send-status.expired { color: var(--danger); }

/* --- Grundgeruest: Seitenleiste links, Inhalt rechts ---------------------
   Aufbau nach dem Axiom-Sidebar-Muster (NavHeader / NavBody / NavFooter).
   Das Benutzerkonto sitzt unten, wie es NavAccountItem dort vorsieht. */

.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 232px;
  flex: none;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border-right: 1px solid var(--line);
  position: sticky;
  top: 0;
  height: 100vh;
  transition: width .14s ease;
}
.sidebar.collapsed { width: 64px; }
/* Nichts darf seitlich herausragen: der Umschaltknopf lag eingeklappt
   ausserhalb der Leiste, unter der Topbar-Ueberschrift -- einklappen ging,
   aufklappen nicht mehr. */
.sidebar { overflow: hidden; }
.sidebar.collapsed .nav-header {
  flex-direction: column;
  gap: 8px;
  padding: 12px 8px;
}
.sidebar.collapsed .sidebar-toggle { margin-left: 0; }
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-header-text,
.sidebar.collapsed .nav-group-trigger,
.sidebar.collapsed .konto-text { display: none; }
.sidebar.collapsed .nav-item { justify-content: center; }

.nav-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
}
.nav-header-text { display: flex; flex-direction: column; min-width: 0; }
.nav-header-text strong { font-size: 14px; }
.nav-header-text small { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-toggle {
  margin-left: auto;
  width: 22px; height: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  cursor: pointer;
  position: relative;
  flex: none;
}
.sidebar-toggle::before {
  content: "";
  position: absolute; inset: 4px auto 4px 6px;
  width: 2px;
  background: var(--muted);
}

.nav-body { flex: 1; overflow-y: auto; padding: 10px 8px; }
.nav-group-trigger {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  padding: 8px 10px 4px;
}
.nav-list, .nav-group-content { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.nav-item:hover { background: var(--panel-2); }
.nav-item.active { background: var(--accent-subtle); font-weight: 600; }
/* Icon links; es traegt die Markierung mit, damit der aktive Eintrag auch bei
   eingeklappter Leiste erkennbar bleibt. */
.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  flex: none;
  color: var(--muted);
}
.nav-item.active .nav-icon { color: var(--accent); }
.nav-item:hover .nav-icon { color: var(--text); }
.nav-separator { border: none; border-top: 1px solid var(--line); margin: 10px 4px; }

.nav-footer { border-top: 1px solid var(--line); padding: 8px; position: relative; }
.nav-account-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.nav-account-item:hover { background: var(--panel-2); }
.konto-text { display: flex; flex-direction: column; min-width: 0; }
.konto-text strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.konto-text small { font-size: 11px; color: var(--muted); }
.avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent-bg);
  color: var(--accent-fg);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  flex: none;
}
.avatar.klein { width: 26px; height: 26px; font-size: 11px; }
.konto-menu {
  position: absolute;
  bottom: 100%; left: 8px; right: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 4px;
  z-index: 20;
}
.konto-menu-item {
  display: block; width: 100%;
  padding: 8px 10px;
  border: none; border-radius: var(--radius-sm);
  background: transparent; color: var(--text);
  font: inherit; font-size: 13px; text-align: left; cursor: pointer;
}
.konto-menu-item:hover { background: var(--panel-2); }

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.views { padding: 18px 22px 60px; }

.topbar-actions { display: flex; align-items: center; gap: 12px; }

@media (max-width: 760px) { .sidebar { width: 64px; } .sidebar .nav-label, .sidebar .nav-header-text, .sidebar .nav-group-trigger, .sidebar .konto-text { display: none; } }


/* Inhalt der Ansichten */
.layout {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(300px, 380px);
  gap: 18px;
  padding: 18px 22px 60px;
  align-items: start;
  max-width: 1200px;
}
/* Ausgabe und Eingang stehen ganz unten ueber die volle Breite, nicht
   als dritte Spalte -- der Editor selbst bekommt dadurch mehr Platz. */
.output-col { grid-column: 1 / -1; }
@media (max-width: 1000px) { .layout { grid-template-columns: 1fr; } }

/* Verwaltungsseiten stehen einspaltig -- drei Spalten braucht dort niemand. */
.verwaltung { padding: 18px 22px 60px; max-width: 860px; }

.topbar h1 { font-size: 17px; margin: 0; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }

/* --- Verwaltungslisten --- */
.admin-liste { display: flex; flex-direction: column; gap: 8px; }
.admin-zeile {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
  padding: 10px 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.admin-zeile.inaktiv { opacity: .55; }
.admin-kopf { display: flex; align-items: center; gap: 10px; min-width: 0; }
.admin-text { display: flex; flex-direction: column; min-width: 0; }
.admin-text strong { font-size: 13px; }
.admin-text small { font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.admin-aktionen { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-aktionen .btn-ghost.danger { color: var(--danger); border-color: var(--danger-border); }
.admin-form {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
}
.admin-form h3 { margin: 0 0 12px; font-size: 13px; }

/* --- Anmeldeseite --- */
.auth-body { display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-karte {
  width: 100%; max-width: 380px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 24px;
}
.auth-marke { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.auth-marke h1 { font-size: 18px; margin: 0; }
.auth-knopf { width: 100%; margin-top: 6px; }
.auth-fehler { color: var(--danger); font-size: 13px; min-height: 18px; display: none; margin-bottom: 4px; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.card h2 { font-size: 14px; margin: 0 0 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }

/* --- Ein- und ausklappbare Kacheln --- */
.klapp-kopf {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.klapp-kopf h2 { flex: 1; }
.klapp-kopf:hover h2 { color: var(--text); }
.klapp-pfeil {
  display: flex;
  color: var(--muted);
  transition: transform .14s ease;
  flex: none;
}
/* Zugeklappt zeigt der Pfeil nach rechts. */
.card.zu .klapp-pfeil { transform: rotate(-90deg); }
.card.zu .card-body { display: none; }
.card.zu { margin-bottom: 10px; }
.klapp-zaehler {
  background: var(--pill);
  color: var(--text);
  border-radius: var(--radius-full);
  padding: 1px 8px;
  font-size: 10px;
  font-weight: 600;
  flex: none;
}
/* Ohne Ereignisse bliebe sonst eine leere Pille stehen. */
.klapp-zaehler:empty { display: none; }
/* Der Zaehler sagt, was im zugeklappten Block steckt. Offen sieht man es
   ohnehin -- dann waere er nur Doppelung. */
.card:not(.zu) .klapp-zaehler { display: none; }
.card-head-zweit { display: flex; justify-content: flex-end; margin-bottom: 6px; }
.card-head h2 { margin: 0; }
.hint { font-size: 12px; color: var(--muted); margin: 4px 0 12px; }

label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } }

input, textarea, select {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: var(--radius);
  padding: 9px 11px;
  font-size: 14px;
  font-family: inherit;
  width: 100%;
}
/* Fokusring in border.focus -- deutlich sichtbar gegen Limette und Weiss. */
input:focus, textarea:focus, select:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: transparent; }
textarea { resize: vertical; min-height: 76px; }
.counter { font-size: 11px; color: var(--muted); text-align: right; }
.counter.over { color: var(--danger); }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tab {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
}
.tab.active { background: var(--accent-bg); color: var(--accent-fg); border-color: var(--accent-bg); font-weight: 600; }

.btn, .btn-ghost, .btn-primary, .otab {
  cursor: pointer;
  font-family: inherit;
  border-radius: var(--radius);
  font-size: 13px;
}
.btn { background: var(--panel-2); border: 1px solid var(--line); color: var(--text); padding: 9px 14px; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
/* bg.accent traegt dunklen Text -- weiss waere darauf unlesbar (1,2:1). */
.btn-primary { background: var(--accent-bg); border: 1px solid var(--accent-bg); color: var(--accent-fg); font-weight: 700; padding: 9px 16px; }
.btn-primary:hover:not(:disabled) { background: var(--accent-bg-hover); border-color: var(--accent-bg-hover); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: transparent; border: 1px dashed var(--line); color: var(--muted); padding: 6px 10px; }
.btn-ghost:hover { color: var(--accent); border-color: var(--accent); }

.suggestions-list { display: flex; flex-direction: column; gap: 10px; }
.suggestion {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
}
.suggestion .row { display: grid; grid-template-columns: 150px 1fr auto; gap: 8px; align-items: center; }
.suggestion .extra { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.suggestion .extra label { margin: 0; }
/* Suggestion-Typ, der die Carousel-Regel bricht: an der Zeile selbst markieren. */
.suggestion.mismatch { border-color: var(--danger-border); }
.suggestion .row-warn {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--danger);
}
.del { background: transparent; border: none; color: var(--danger); cursor: pointer; font-size: 18px; line-height: 1; }

.cards-editor { display: flex; flex-direction: column; gap: 14px; }
.card-block { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--panel-2); }
.card-block h3 { font-size: 12px; margin: 0 0 10px; color: var(--muted); display: flex; justify-content: space-between; }

.validation { font-size: 13px; }
.validation .ok { color: var(--success-text); }


/* --- Media-Dropzone --- */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 104px;
  padding: 14px;
  margin-bottom: 8px;
  background: var(--panel-2);
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
  cursor: pointer;
  transition: border-color .12s, background .12s;
}
.dropzone:hover, .dropzone:focus-visible {
  border-color: var(--accent);
  color: var(--text);
  outline: none;
}
/* Waehrend eine Datei darueber schwebt deutlich hervorheben -- sonst ist nicht
   erkennbar, welches Feld das Ziel ist, wenn mehrere untereinander stehen. */
.dropzone.over {
  border-color: var(--accent);
  border-style: solid;
  background: var(--accent-subtle);
  color: var(--text);
}
.dropzone.busy { opacity: .6; cursor: progress; }
/* Der Knopf liegt in der Ecke der Flaeche, die selbst anklickbar ist --
   `position: relative` an der Zone, damit er sich daran ausrichtet. */
.dropzone { position: relative; }
.dz-weg {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  padding: 0;
  line-height: 1;
  font-size: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
}
.dz-weg:hover { border-color: var(--danger-border); color: var(--danger); }
.dz-weg:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.dz-icon { display: flex; }
.dz-text { font-size: 12px; line-height: 1.35; }
.dz-thumb {
  max-width: 100%;
  max-height: 120px;
  border-radius: 8px;
  object-fit: cover;
}
.dz-status { font-size: 11px; color: var(--muted); min-height: 14px; margin-top: 4px; }
.dz-status.ok { color: var(--success-text); }
.dz-status.warn { color: var(--warn-text); }
.dz-status.err { color: var(--danger); }

/* --- Bildposition der Rich Card --- */
.feld { margin-bottom: 14px; }
.feld-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.pos-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pos-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 4px 8px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
}
.pos-btn:hover:not(:disabled) { color: var(--text); border-color: var(--accent); }
.pos-btn.active {
  border-color: var(--accent);
  background: var(--accent-subtle);
  color: var(--text);
}
/* Nicht vom Format unterstuetzt -- sichtbar, aber unbenutzbar. */
.pos-btn:disabled { opacity: .35; cursor: not-allowed; }
.pos-btn:disabled::after {
  content: "nicht möglich";
  font-size: 9px;
  letter-spacing: .2px;
}

/* --- Telefon-Vorschau -----------------------------------------------------
   Nachgebaut nach Google Messages, weil RCS-Nachrichten dort ankommen. Der
   Bildschirm ist bewusst hell, auch wenn der Editor dunkel ist: die Vorschau
   soll zeigen, was der Empfaenger sieht, nicht zum Werkzeug passen. */

/* Die Vorschau klebt beim Scrollen -- aber nur innerhalb ihrer Rasterzeile.
   Klebte die Spalte selbst, liefe das Telefon in die Ausgabe-Reihe darunter.
   Deshalb faengt die Spalte die Zeilenhoehe (align-self: stretch) und nur das
   Telefon darin klebt. */
.preview-col { align-self: stretch; }
/* Telefon UND Vorschau-Knopf kleben gemeinsam. Klebte nur das Telefon,
   schoebe es sich beim Scrollen ueber den Knopf darunter. */
.preview-haft { position: sticky; top: 84px; }

.phone {
  width: var(--telefon-breite);
  max-width: 100%;
  margin: 0 auto;
  background: #1c1f2e;
  border-radius: 42px;
  padding: 10px;
  box-shadow:
    0 0 0 1px rgb(0 0 0 / 0.12),
    var(--shadow-lg);
}
.phone-screen-wrap {
  background: #fff;
  border-radius: 33px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 620px;
  position: relative;
}
/* Dynamic Island / Notch */
.phone-screen-wrap::before {
  content: "";
  position: absolute;
  top: 8px; left: 50%;
  transform: translateX(-50%);
  width: 92px; height: 26px;
  background: #0d0f18;
  border-radius: 999px;
  z-index: 3;
}

.statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 22px 6px;
  font-size: 13px;
  font-weight: 600;
  color: #1f1f1f;
  flex: none;
}
.sb-time { letter-spacing: .2px; }
.sb-icons { display: flex; align-items: center; gap: 5px; }
.sb-battery {
  width: 22px; height: 11px;
  border: 1.4px solid #1f1f1f;
  border-radius: 3px;
  position: relative;
  display: inline-block;
}
.sb-battery::after {
  content: "";
  position: absolute; right: -3.5px; top: 3px;
  width: 2px; height: 5px;
  background: #1f1f1f;
  border-radius: 0 1px 1px 0;
}
.sb-battery span {
  position: absolute; inset: 1.4px;
  width: 72%;
  background: #1f1f1f;
  border-radius: 1px;
  display: block;
}

.appbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 10px;
  border-bottom: 1px solid #e6e6e6;
  color: #1f1f1f;
  flex: none;
}
.ab-back { display: flex; color: #444; }
.ab-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #1a73e8;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 15px;
  flex: none;
  text-transform: uppercase;
}
.ab-titles { display: flex; flex-direction: column; min-width: 0; }
.pv-sender {
  font-weight: 600;
  font-size: 15px;
  color: #1f1f1f;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ab-sub {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: #5f6368;
}
.ab-verified { display: flex; color: #1a73e8; }

.phone-screen {
  background: #fff;
  padding: 14px 12px 8px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.inputbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 16px;
  border-top: 1px solid #ececec;
  flex: none;
}
.ib-field {
  flex: 1;
  background: #f1f3f4;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 13px;
  color: #80868b;
}
.ib-send {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #1a73e8;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

/* Nachrichten-Bubbles */
.bubble {
  background: #e8eaed;
  color: #1f1f1f;
  border-radius: 18px 18px 18px 5px;
  padding: 9px 13px;
  max-width: 85%;
  font-size: 14px;
  line-height: 1.42;
  word-break: break-word;
}
/* Gilt fuer alle Media, nicht nur in der Sprechblase: in der Rich Card und im
   Carousel lief das Bild sonst in seiner Eigenbreite und liess die Karte
   rechts weiss stehen. */
.media {
  width: 100%;
  display: block;
  background: #dadce0;
  object-fit: cover;
}
.bubble .media {
  border-radius: 12px;
  margin-bottom: 8px;
}
.media.SHORT { height: 96px; }
.media.MEDIUM { height: 138px; }
.media.TALL { height: 198px; }
.media-fallback {
  display: flex; align-items: center; justify-content: center;
  color: #5f6368; font-size: 12px; background: #f1f3f4;
  border: 1px dashed #c8ccd0;
}

/* Rich Card: eigene Karte, nicht als Sprechblase */
.pv-richcard {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(60,64,67,.3), 0 4px 8px rgba(60,64,67,.15);
  max-width: 88%;
  width: 88%;
}
.pv-richcard.horizontal { display: flex; align-items: stretch; }
.pv-richcard.horizontal .media { width: 40%; height: auto; min-height: 96px; margin: 0; border-radius: 0; }
.pv-richcard.horizontal.align-right { flex-direction: row-reverse; }
.pv-richcard .rc-body { padding: 11px 13px 12px; }
.pv-richcard .media { border-radius: 0; margin-bottom: 0; }
.pv-title { font-weight: 600; font-size: 14px; color: #1f1f1f; margin-bottom: 3px; }
.pv-desc { font-size: 13px; color: #5f6368; line-height: 1.4; white-space: pre-wrap; }

/* Suggestion-Chips: ausserhalb der Bubble, wie in Google Messages */
.pv-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; max-width: 92%; }
.pv-chip {
  border: 1px solid #dadce0;
  background: #fff;
  color: #1a73e8;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.pv-carousel {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  align-self: stretch;
  scrollbar-width: thin;
}
.pv-carousel .pv-card {
  flex: 0 0 auto;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(60,64,67,.3), 0 4px 8px rgba(60,64,67,.15);
}
.pv-carousel.SMALL .pv-card { width: 152px; }
.pv-carousel.MEDIUM .pv-card { width: 208px; }
.pv-carousel .pv-card .body { padding: 10px 12px 12px; }
.pv-carousel .pv-card .media { border-radius: 0; margin-bottom: 0; }

/* Zeitstempel unter der Nachricht */
.pv-meta {
  font-size: 11px;
  color: #80868b;
  padding-left: 4px;
  margin-top: -2px;
}

.empty-preview { color: #80868b; font-size: 13px; text-align: center; margin: auto; }

/* Ausgabe */
.out-tabs { display: flex; gap: 6px; }
.otab { background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); padding: 5px 10px; }
.otab.active { background: var(--accent-bg); color: var(--accent-fg); border-color: var(--accent-bg); font-weight: 600; }
.output {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  overflow: auto;
  max-height: 360px;
  font-size: 12px;
  border-radius: var(--radius);
  line-height: 1.5;
}
/* Farbe erbt bewusst von .output. Hier stand ein helles Gruen aus dem dunklen
   Thema -- auf hellem Grund war das mit rund 1,3:1 unlesbar. */
.output code { white-space: pre; font-family: var(--font-mono); color: inherit; }
.actions { display: flex; gap: 10px; margin-top: 12px; }
.send-result { margin-top: 10px; font-size: 13px; }
.send-result.ok { color: var(--success-text); }
.send-result.err { color: var(--danger); }

/* --- Eingang: Ereignisse aus den Vonage-Webhooks --- */
.events-list { display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow-y: auto; }
.event {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
}
.event.inbound { border-left-color: var(--accent); }
.event.status  { border-left-color: var(--success-text); }
.event.send    { border-left-color: #ffc078; }
.send-result div { margin-top: 2px; }
.event-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.event-kind { font-weight: 600; }
.event-badge {
  background: var(--line);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
}
.event-time { margin-left: auto; color: var(--muted); font-size: 11px; }
/* Lange Werte wie message_uuid duerfen die Spalte nicht sprengen. */
.event-detail { color: var(--muted); overflow-wrap: anywhere; }

/* --- Vorlagen ------------------------------------------------------------
   Uebersicht als Raster nach dem Axiom-Muster: Grid mit gleich breiten
   Spalten, darin Karten mit Preview, Kopf und Fuss. */

.uebersicht-kopf {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.uebersicht-titel { margin: 0 0 2px; font-size: 18px; }
.uebersicht-kopf .hint { margin: 0; }

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

/* --- Karte nach der Axiom-Anatomie ---------------------------------------
   Card > CardPreview (mit Addon-Ecken) > CardHeader (Titel als CardLink,
   Aktionen als addonAfter) > CardFooter (Nebeninformation).
   Der Footer traegt bewusst KEINE Aktionen -- die stehen im Header. */
.ax-card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .14s ease, border-color .14s ease;
}
.ax-card:hover { box-shadow: var(--shadow-md); border-color: var(--accent); }
.ax-card:focus-within { border-color: var(--focus); }

/* Das Beschneiden sitzt hier, nicht an der Karte: mit `overflow: hidden` auf
   der Karte wuerde das Aktionsmenue im Header abgeschnitten. */
.ax-card-preview {
  position: relative;
  height: 132px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
  border-radius: calc(var(--radius-lg) - 1px) calc(var(--radius-lg) - 1px) 0 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ax-card-image { width: 100%; height: 100%; object-fit: cover; display: block; }
.ax-card-auszug {
  margin: 0;
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ax-card-auszug.leer { font-style: italic; opacity: .7; }

/* addonTopLeft und Geschwister aus der Anatomie. */
.ax-card-addon {
  position: absolute;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  padding: 2px 9px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text);
}
.ax-card-addon.oben-links { top: 8px; left: 8px; }
.ax-card-addon.oben-rechts { top: 8px; right: 8px; }

.ax-card-header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 12px 8px;
  flex: 1;
}
.ax-card-header-text { min-width: 0; flex: 1; }
.ax-card-header h3 { margin: 0; font-size: 14px; font-weight: 600; }
/* CardLink: der Titel macht die Karte anklickbar. */
.ax-card-link {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.ax-card-link:hover { color: var(--accent); text-decoration: underline; }
.ax-card-desc { margin: 3px 0 0; font-size: 11px; color: var(--muted); }

.ax-card-footer {
  padding: 8px 12px 10px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 calc(var(--radius-lg) - 1px) calc(var(--radius-lg) - 1px);
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 10px;
}

/* --- Aktionsmenü (addonAfter) --- */
.ax-menue { position: relative; flex: none; }
.ax-menue-knopf {
  border: 1px solid transparent;
  background: none;
  color: var(--muted);
  border-radius: var(--radius-sm);
  padding: 0 7px;
  font-size: 16px;
  line-height: 22px;
  cursor: pointer;
}
.ax-menue-knopf:hover { border-color: var(--line); background: var(--panel-2); color: var(--text); }
.ax-menue-liste {
  position: absolute;
  right: 0;
  top: 26px;
  z-index: 30;
  min-width: 160px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 4px;
  display: flex;
  flex-direction: column;
}
.ax-menue-liste[hidden] { display: none; }
.ax-menue-eintrag {
  border: none;
  background: none;
  text-align: left;
  font: inherit;
  font-size: 13px;
  padding: 6px 9px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text);
}
.ax-menue-eintrag:hover { background: var(--accent-subtle); }
.ax-menue-eintrag.danger { color: var(--danger); }

/* --- DataTable -----------------------------------------------------------
   Anatomie: DataTable > DataTableBody (Zeilen, Zellen, DataTableAction) >
   DataTableFooter. Kopfzeile klebt, Zeilen gleich hoch, Aktionen erscheinen
   beim Ueberfahren. */
.ax-table {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
}
/* Nicht die Tabelle beschneiden -- sonst faellt das Aktionsmenue der letzten
   Zeile heraus. Die Rundung tragen Kopf und letzte Zeile selbst. */
.ax-table-head { border-radius: calc(var(--radius-lg) - 1px) calc(var(--radius-lg) - 1px) 0 0; }
.ax-tr:last-child { border-radius: 0 0 calc(var(--radius-lg) - 1px) calc(var(--radius-lg) - 1px); }
.ax-table-head,
.ax-tr {
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
}
.ax-table-head {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 38px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
}
.ax-th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--muted);
}
.ax-tr {
  min-height: 46px;
  border-bottom: 1px solid var(--line);
}
.ax-tr:last-child { border-bottom: none; }
.ax-tr:hover { background: var(--panel-2); }
.ax-tr.gedimmt { opacity: .55; }
.ax-td { font-size: 13px; min-width: 0; overflow-wrap: anywhere; }
.ax-td-stark { font-weight: 600; }
.ax-th.rechts, .ax-td.rechts { text-align: right; }

/* DataTableAction: in jeder Zeile ein Menue, immer sichtbar. Es war frueher
   bis zum Ueberfahren unsichtbar -- bei einer Knopfreihe eine gute Idee, bei
   einem einzelnen Punkte-Knopf aber nur eine versteckte Funktion. Ruhig
   bleibt die Tabelle jetzt durch die gedaempfte Farbe. */
.ax-actions {
  display: flex;
  justify-content: flex-end;
}
.ax-actions .ax-menue-knopf { color: var(--muted); }
.ax-tr:hover .ax-actions .ax-menue-knopf,
.ax-actions .ax-menue-knopf:hover,
.ax-actions .ax-menue-knopf[aria-expanded="true"] { color: var(--text); }

.ax-table-leer { padding: 20px 14px; font-size: 13px; color: var(--muted); text-align: center; }
.ax-table-foot {
  padding: 8px 14px;
  border-top: 1px solid var(--line);
  background: var(--panel-2);
  font-size: 11px;
  color: var(--muted);
}

/* Badge nach Axiom: Variante `subtle`, Intents neutral/information/
   success/warning/danger. Ohne Intent ist es neutral. */
.ax-marke {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  padding: 1px 9px;
  font-size: 11px;
  background: var(--bg-neutral);
  color: var(--text);
}
.ax-marke.success { background: var(--bg-success-subtle); border-color: var(--border-success); color: var(--success-text); }
.ax-marke.warning { background: var(--bg-warning-subtle); border-color: var(--border-warning); color: var(--warn-text); }
.ax-marke.danger  { background: var(--bg-error-subtle); border-color: var(--danger-border); color: var(--danger); }
.ax-marke.information { background: #E2F5F5; border-color: var(--info); color: var(--info); }

/* Auf schmalen Schirmen wird die Tabelle waagerecht scrollbar, statt die
   Spalten zu zerquetschen. */
@media (max-width: 720px) {
  .ax-table { overflow-x: auto; }
  .ax-table-head, .ax-tr { min-width: 640px; }
  .ax-actions { opacity: 1; }
}

.tpl-leer {
  grid-column: 1 / -1;
  padding: 40px 20px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
}
.tpl-leer p { margin: 0 0 6px; font-size: 14px; }
.tpl-leer .hint { margin: 0; }

/* Hinweis neben dem Speichern-Knopf: welche Vorlage gerade offen ist. */
.vorlage-hinweis {
  font-size: 11px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.vorlage-hinweis.aktiv { color: var(--text); font-weight: 600; }
.actions .btn:disabled { opacity: .5; cursor: not-allowed; }
.tpl-status { font-size: 12px; min-height: 16px; color: var(--muted); }
.tpl-status.ok { color: var(--success-text); }
.tpl-status.err { color: var(--danger); }


/* --- Topbar: Vorlagenkontext und Speichern --- */
.topbar-editor { display: flex; align-items: center; gap: 10px; }
/* In der Topbar darf die Statuszeile keinen Platz reservieren, sonst
   springt die Zeile, sobald eine Meldung kommt und wieder geht. */
.topbar-actions .tpl-status { min-height: 0; }

/* --- Dialog --- */
.modal {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  color: var(--text);
  padding: 0;
  width: min(420px, calc(100vw - 32px));
  box-shadow: var(--shadow-lg);
}
.modal::backdrop { background: rgba(15, 23, 42, .38); }
.modal-inhalt { padding: 20px; }
.modal-inhalt h2 { margin: 0 0 4px; font-size: 15px; }
.modal-inhalt .hint { margin-top: 0; }
.modal-aktionen { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }

/* --- Hinweise direkt am Feld --- */
.feld-hinweis {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--danger);
  font-weight: 500;
}
/* Im Label sitzt der Hinweis unter der Eingabe und darf deren Breite haben. */
label > .feld-hinweis { width: 100%; }
.rest-hinweis { font-size: 12px; color: var(--danger); }

/* Zugeklappter Block mit Hinweisen darin: ein Punkt am Kopf, sonst waere der
   Fehler unsichtbar, seit es keine Sammelliste mehr gibt. */
.card.klappbar.hat-hinweis.zu .klapp-kopf h2::after {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 8px;
  border-radius: 50%;
  background: var(--danger);
  vertical-align: middle;
}

/* --- Posteingang: Liste und Chat ---------------------------------------- */
.inbox {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(320px, 1fr);
  gap: 18px;
  padding: 18px 22px 40px;
  max-width: 1200px;
  /* Feste Hoehe, damit Liste und Verlauf je fuer sich scrollen -- sonst
     scrollt die ganze Seite und die Eingabezeile wandert weg. */
  height: calc(100vh - 76px);
}
@media (max-width: 900px) {
  .inbox { grid-template-columns: 1fr; height: auto; }
  /* Schmal zeigt sich eins von beiden. Die Klasse sitzt am Container, nicht
     am Chat: die Liste steht im Markup davor, ein Geschwisterselektor sieht
     sie also nicht. */
  .inbox:not(.chat-offen) .inbox-chat { display: none; }
  .inbox.chat-offen .inbox-liste { display: none; }
  .inbox .chat-verlauf { max-height: 60vh; }
  .chat-zurueck { display: inline-flex; }
}

.inbox-liste, .inbox-chat {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px;
}
.inbox-kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.inbox-kopf h2 { margin: 0; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
/* Der Filter steht unter der Suche, nicht daneben: in der schmalen Spalte
   des Posteingangs bliebe sonst fuer beides zu wenig Platz. */
.konv-absender {
  width: 100%;
  padding: 6px 8px;
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
}
.konv-liste { overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 4px; }

.konv-zeile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.konv-zeile:hover { background: var(--panel-2); }
.konv-zeile.aktiv { background: var(--accent-subtle); border-color: var(--accent); }
.konv-kopf { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.konv-nummer { font-weight: 600; font-size: 13px; }
.konv-zeile.ungelesen .konv-nummer { color: var(--accent); }
.konv-zeit { font-size: 11px; color: var(--muted); flex: none; }
.konv-unten { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.konv-vorschau {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.konv-badge {
  flex: none;
  background: var(--accent-bg);
  color: var(--accent-fg);
  border-radius: var(--radius-full);
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 700;
}

/* --- Chat --- */
.chat-kopf { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.chat-kopf h2 { margin: 0; font-size: 15px; }
.chat-kopf .hint { margin: 2px 0 0; }
/* Zurueck braucht nur die schmale Ansicht, wo Liste und Chat sich abloesen. */
.chat-zurueck { display: none; }

.chat-verlauf {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 4px;
}
.chat-tag {
  align-self: center;
  font-size: 11px;
  color: var(--muted);
  background: var(--panel-2);
  border-radius: var(--radius-full);
  padding: 2px 10px;
  margin: 6px 0 2px;
}

.blase {
  max-width: 78%;
  padding: 8px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.blase.ein { align-self: flex-start; background: var(--panel-2); border-bottom-left-radius: 4px; }
.blase.aus { align-self: flex-end; background: var(--accent-subtle); border-color: var(--accent); border-bottom-right-radius: 4px; }
.blase-text { font-size: 13px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.blase-text.leer { color: var(--muted); font-style: italic; }
.blase-bild { max-width: 100%; border-radius: 10px; display: block; }
.blase-media { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.blase-art {
  align-self: flex-start;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  background: var(--pill);
  border-radius: var(--radius-full);
  padding: 1px 7px;
}
.blase-fuss { display: flex; gap: 8px; font-size: 10px; color: var(--muted); }
.blase-status { font-weight: 600; }
.blase-fehler { color: var(--danger); }

.chat-eingabe { display: flex; gap: 8px; align-items: flex-end; border-top: 1px solid var(--line); padding-top: 10px; }
.chat-eingabe textarea { flex: 1; resize: vertical; min-height: 44px; }

/* Zahl am Navigationspunkt. */
.nav-badge {
  margin-left: auto;
  background: var(--accent-bg);
  color: var(--accent-fg);
  border-radius: var(--radius-full);
  padding: 0 6px;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
}
.sidebar.collapsed .nav-badge { display: none; }

/* --- Anmeldeseite: Erfolgsmeldung und Nebenwege --- */
.auth-erfolg {
  display: none;
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  background: var(--accent-subtle);
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
}
.auth-fuss { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; }
.auth-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 12px;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
}
.auth-link:hover { color: var(--text); }

.hint.warnung { color: var(--warn-text); }

/* --- Platzhalter einfügen: Auslöser am Feld --- */
.ph-feld { position: relative; display: flex; align-items: stretch; }
.ph-feld > input, .ph-feld > textarea { flex: 1; min-width: 0; margin: 0; }
/* Der Auslöser sitzt im Feld, nicht daneben -- daneben würde er die
   Feldbreite verkürzen und die Zeilen ungleich lang machen. */
.ph-knopf {
  position: absolute;
  right: 6px;
  top: 6px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  border-radius: var(--radius-sm);
  padding: 1px 6px;
  font-size: 11px;
  line-height: 1.5;
  cursor: pointer;
}
.ph-knopf:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-subtle); }
/* Der Knopf sitzt im Feld -- der Text darf nicht darunter laufen. Die
   Reserve passt zu seiner Beschriftung „«Platzhalter»"; wird die kuerzer,
   gehoert diese Zahl mit angepasst. */
.ph-feld > input { padding-right: 96px; }
.ph-feld > textarea { padding-right: 96px; }

/* Fest am Fenster ausgerichtet, nicht an der Seite: das Menue haengt bei
   offenem Modal IM Dialog (Top-Layer), und dort waere „absolute" auf dessen
   Ecke bezogen. Beim Scrollen schliesst es ohnehin. */
.ph-menue {
  position: fixed;
  z-index: 50;
  width: 280px;
  max-height: 300px;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
}
.ph-menue[hidden] { display: none; }
.ph-suche { margin: 0 0 6px; }
.ph-liste { overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 2px; }
.ph-eintrag {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  cursor: pointer;
  font: inherit;
}
.ph-eintrag:hover, .ph-eintrag:focus { background: var(--accent-subtle); }
.ph-name { font-size: 13px; color: var(--text); }
.ph-form { font-size: 11px; color: var(--muted); font-family: var(--font-mono); flex: none; }
.ph-leer { font-size: 12px; color: var(--muted); padding: 6px 8px; }

/* --- Vorschau mit echten Daten --- */
.perso-vorschau {
  /* Eigene Box, mittig unter dem Telefon und genauso breit. */
  width: var(--telefon-breite);
  max-width: 100%;
  margin: 12px auto 0;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.perso-vorschau > .btn { width: 100%; }
.perso-blaettern {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
/* Blaettern in einer Zeile, "Zurueck zu Platzhaltern" in der naechsten --
   nebeneinander wird es auf 340px zu eng. */
.perso-blaettern #persoAus { flex-basis: 100%; margin-top: 4px; }
.perso-blaettern span { font-size: 12px; font-weight: 600; min-width: 84px; text-align: center; }
.perso-blaettern .btn-ghost { padding: 4px 10px; }
.perso-blaettern .btn-ghost:disabled { opacity: .4; cursor: not-allowed; }
.perso-vorschau .hint { margin: 8px 0 0; text-align: left; }
.perso-vorschau .hint:empty { display: none; }
/* Deutlich sichtbar, dass im Telefon echte Personendaten stehen. */
.phone.mit-daten { box-shadow: 0 0 0 3px var(--accent); }


/* --- Buttons und Schnellantworten einer Card --- */
.sug-block { margin-top: 4px; }
.sug-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.sug-titel { font-size: 12px; font-weight: 600; color: var(--text); }
.sug-zahl { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sug-zahl.voll { color: var(--warn-text); font-weight: 600; }
.sug-block .hint { margin: 2px 0 8px; }
.sug-gruppen { display: flex; flex-direction: column; gap: 14px; }
.sug-block + .sug-block { border-top: 1px solid var(--line); padding-top: 12px; }
.sug-summe { font-size: 11px; color: var(--muted); margin: 0; text-align: right; }
.sug-summe.voll { color: var(--warn-text); font-weight: 600; }

/* --- Eingang: Suche und Paging --- */
.inbox-kopf { gap: 8px; }
.inbox-kopf input[type="search"] { flex: 1; min-width: 0; margin: 0; }
.inbox-kopf .btn-ghost { flex: none; padding: 6px 10px; }
.konv-paging {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  margin-top: 8px;
}
.konv-paging span { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.konv-paging .btn-ghost { padding: 3px 9px; }
.konv-paging .btn-ghost:disabled { opacity: .4; cursor: not-allowed; }

/* Textbaustein-Wähler über dem Antwortfeld. */
.chat-bausteine { padding-top: 8px; }
.chat-bausteine select { margin: 0; font-size: 12px; }

/* Absender- und Bausteinwahl über dem Antwortfeld. */
.chat-bausteine { display: flex; gap: 8px; }
.chat-bausteine select { flex: 1; min-width: 0; }
/* Ankreuzfeld in den Verwaltungsformularen. */
label.kasten { flex-direction: row; align-items: center; gap: 8px; }
label.kasten input { width: auto; margin: 0; }

/* Der API-Call braucht mehr Breite als ein Formulardialog. */
.modal.modal-breit { width: min(680px, calc(100vw - 32px)); }
.modal-breit .output { max-height: 260px; margin: 10px 0; }

/* --- Dashboard ----------------------------------------------------------- */
.dashboard { padding: 18px 22px 60px; max-width: 1200px; display: flex; flex-direction: column; gap: 16px; }

/* Betriebsbereitschaft ganz oben: was den Versand verhindert, sieht man zuerst. */
.dash-betrieb { display: flex; flex-direction: column; gap: 8px; }
.dash-ok {
  padding: 10px 14px;
  border: 1px solid var(--border-success);
  background: var(--bg-success-subtle);
  color: var(--success-text);
  border-radius: var(--radius);
  font-size: 13px;
}
.dash-warnung {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  border: 1px solid var(--line);
  background: var(--bg-neutral);
}
.dash-warnung.fehler { border-color: var(--danger-border); background: var(--bg-error-subtle); color: var(--danger); }
.dash-warnung.warnung { border-color: var(--border-warning); background: var(--bg-warning-subtle); color: var(--warn-text); }
.dash-warnung .btn-ghost { flex: none; }

/* --- KPI-Kacheln --- */
.dash-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.dash-kachel {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.dash-kachel-titel { font-size: 11px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.dash-kachel-wert { font-size: 26px; line-height: 1.15; font-weight: 700; }
.dash-kachel-unten { font-size: 11px; color: var(--muted); }
.dash-trend { font-size: 11px; font-weight: 600; }
.dash-trend.hoch { color: var(--success-text); }
.dash-trend.runter { color: var(--warn-text); }

/* --- Verlauf und neueste Konversationen --- */
.dash-unten { display: grid; grid-template-columns: minmax(320px, 1.6fr) minmax(260px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .dash-unten { grid-template-columns: 1fr; } }

.dash-verlauf { display: flex; align-items: flex-end; gap: 4px; height: 120px; }
.dash-tag { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.dash-saeulen { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
/* Eine Säule mit dem Wert 0 bleibt als Strich sichtbar -- sonst sähe ein
   stiller Tag wie fehlende Daten aus. */
.dash-saeule { width: 7px; min-height: 2px; border-radius: 2px 2px 0 0; }
.dash-saeule.gesendet { background: var(--accent-bg); }
.dash-saeule.empfangen { background: var(--info); }
.dash-tag-label { font-size: 9px; color: var(--muted); }

.dash-neueste { display: flex; flex-direction: column; gap: 2px; }
.dash-konv {
  display: flex;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  font: inherit;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.dash-konv:hover { background: var(--panel-2); }
.dash-konv-nr { font-size: 12px; font-weight: 600; flex: none; }
.dash-konv-txt { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }

/* --- Bestand --- */
.dash-bestand { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.dash-bestand-kachel {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.dash-bestand-kachel:hover { border-color: var(--accent); background: var(--accent-subtle); }
.dash-bestand-kachel strong { font-size: 20px; }
.dash-bestand-kachel span { font-size: 11px; color: var(--muted); }
.dash-trend.gleich { color: var(--muted); }
.dash-bestand-block { display: flex; flex-direction: column; gap: 4px; }
.dash-bestand-block h2 { margin: 0; }
.dash-bestand-block .hint { margin: 0 0 6px; }
.dash-legende { display: flex; gap: 14px; margin-bottom: 10px; font-size: 11px; color: var(--muted); }
.dash-legende span { display: inline-flex; align-items: center; gap: 5px; }
.dash-punkt { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.dash-punkt.gesendet { background: var(--accent-bg); }
.dash-punkt.empfangen { background: var(--info); }

/* --- Workflow Designer ---------------------------------------------------- */

/* Solange gezeichnet wird, faellt die Breitenbegrenzung der
   Verwaltungsseiten weg -- eine Zeichenflaeche in 860 px ist keine. */
/* Beim Zeichnen fuellt der Editor die Spalte bis zum unteren Rand: die
   Ansicht wird selbst zur Flex-Spalte, und die Buehne nimmt sich den Rest.
   Vorher stand dort `calc(100vh - 260px)` -- eine geratene Zahl, die nach
   jeder Aenderung an der Kopfzeile wieder falsch war.

   Damit `flex: 1` ueberhaupt etwas zu verteilen hat, braucht die Kette eine
   feste Hoehe: die Huelle hat sonst nur `min-height: 100vh` und waechst mit
   dem Inhalt -- die 2000 px hohe Zeichenflaeche zoege die Seite dann einfach
   in die Laenge. Nur im Editor, damit die uebrigen Ansichten weiter normal
   scrollen. */
.app-shell:has(> .app-main > #view-workflow.arbeitet) { height: 100vh; }
.app-shell:has(> .app-main > #view-workflow.arbeitet) > .app-main { min-height: 0; }

#view-workflow.arbeitet {
  max-width: none;
  padding: 0;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
#view-workflow.arbeitet > #flowArbeit {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Übersicht */
.flow-vorschau .ax-card-auszug { font-size: 13px; }
.flow-bereit { color: var(--success-text); font-weight: 600; }
.flow-unfertig { color: var(--warn-text); font-weight: 600; }

/* Kopfzeile der Zeichenfläche */
.flow-kopf {
  display: flex;
  align-items: center;
  /* Im schmalen Fenster rutscht die Aktionsgruppe in eine zweite Zeile,
     statt das Namensfeld auf wenige Pixel zusammenzudruecken. */
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.flow-name {
  flex: 1;
  min-width: 160px;
  max-width: 380px;
  font-size: 15px;
  font-weight: 600;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
}
.flow-name:hover { border-color: var(--line); }
.flow-name:focus { border-color: var(--focus); background: var(--panel); outline: none; }
.flow-kopf .hint { margin: 0; white-space: nowrap; }
/* Der Absender gehoert zum Flow wie sein Name -- deshalb links bei ihm und
   nicht bei den Aktionen rechts. `flex-shrink: 0`, damit die Beschriftung im
   schmalen Fenster nicht auf zwei Buchstaben zusammenfaellt. */
.flow-absender {
  /* `flex-direction: row` ausdruecklich: die allgemeine label-Regel stellt
     Beschriftung und Feld untereinander. In der Kopfzeile gehoeren sie
     nebeneinander, sonst wird sie zwei Zeilen hoch. */
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-bottom: 0;
  font-size: 12px;
  color: var(--muted);
}
.flow-absender select {
  max-width: 200px;
  padding: 5px 8px;
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
}
/* Die Aktionen sitzen rechts, auf einer Mittellinie mit dem Namensfeld.
   `margin-left: auto` statt `justify-content` an der Kopfzeile: der Name
   soll den Platz links behalten, nicht mit den Knoepfen zusammenrutschen. */
.flow-kopf-aktionen {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  min-width: 0;
}
/* Die Knoepfe behalten ihre Groesse; nachgeben muss der Hinweis daneben.
   Sonst schiebt ein Text wie „Gespeichert · Version 3" den Speichern-Knopf
   ueber den rechten Rand hinaus, sobald das Fenster schmal ist. */
.flow-kopf-aktionen .btn,
.flow-kopf-aktionen .btn-ghost,
.flow-kopf-aktionen .flow-marke { flex-shrink: 0; }
.flow-kopf-aktionen .hint {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Bühne: Elementbar links, Fläche rechts */
.flow-buehne {
  display: grid;
  grid-template-columns: 232px 1fr;
  /* Nimmt den Rest der Ansichtshoehe. Wichtig bleibt: die Hoehe kommt vom
     Fenster, nicht vom Inhalt -- die Flaeche scrollt in sich, sonst wuechse
     die Seite mit jedem Knoten weiter nach unten. */
  flex: 1;
  min-height: 420px;
}

.flow-palette {
  overflow-y: auto;
  padding: 12px;
  border-right: 1px solid var(--line);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.flow-palette-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  cursor: grab;
}
.flow-palette-item:hover { border-color: var(--accent); background: var(--accent-subtle); }
.flow-palette-item:active { cursor: grabbing; }
.flow-palette-name { font-size: 12.5px; font-weight: 600; }
.flow-palette-desc { font-size: 11px; color: var(--muted); line-height: 1.45; }

/* Die farbige Kachel trägt das Icon -- Farbe und Vordergrund kommen je
   Elementtyp aus dem JS. */
.flow-kachel {
  width: 30px; height: 30px;
  flex: none;
  border-radius: var(--radius-sm);
  background: var(--kachel);
  color: var(--kachel-fg);
  display: grid;
  place-items: center;
}

.flow-wrap {
  position: relative;
  overflow: auto;
  /* Ohne das dehnt die 3200 px breite Zeichenflaeche die Rasterspalte auf
     und damit die ganze Seite -- `1fr` allein begrenzt nicht, solange
     min-width auf `auto` steht. */
  min-width: 0;
  min-height: 0;
  background:
    radial-gradient(circle at 1px 1px, var(--line) 1.4px, transparent 0) 0 0/26px 26px,
    var(--bg);
}
.flow-canvas { position: relative; width: 3200px; height: 2000px; }
.flow-edges { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.flow-leer {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  pointer-events: none;
}

/* Knoten */
.flow-node {
  position: absolute;
  min-width: 210px;
  max-width: 264px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.flow-node.gewaehlt { box-shadow: 0 0 0 2px var(--accent), var(--shadow-sm); }
.flow-node.unfertig { border-color: var(--danger-border); }
.flow-node-kopf {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px;
  cursor: move;
  border-bottom: 1px solid var(--line-soft);
}
.flow-node-titel { font-weight: 600; font-size: 13px; flex: 1; min-width: 0; word-break: break-word; }
.flow-warn {
  flex: none;
  width: 20px; height: 20px;
  border-radius: var(--radius-full);
  background: var(--danger);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: help;
}
/* Ändern und Löschen stehen dauerhaft da -- nur beim Überfahren kräftiger.
   Erst auf Hover zu erscheinen hiess: wer nicht zufällig darüberfährt,
   findet sie nicht. */
.flow-node-aktionen { display: flex; gap: 1px; flex: none; opacity: .55; transition: opacity .12s; }
.flow-node:hover .flow-node-aktionen,
.flow-node-aktionen:focus-within { opacity: 1; }
.flow-act {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-full);
  color: var(--muted);
  display: grid;
  place-items: center;
}
.flow-act:hover { background: var(--panel-2); color: var(--text); }
.flow-act.loeschen:hover { background: var(--bg-error-subtle); color: var(--danger); }
.flow-act:disabled { opacity: .35; cursor: default; }
.flow-act:disabled:hover { background: transparent; color: var(--muted); }

.flow-typ {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--muted);
  padding: 8px 12px 2px;
  text-transform: uppercase;
  letter-spacing: .09em;
}
.flow-blase {
  margin: 3px 12px 9px;
  padding: 8px 10px;
  background: var(--panel-2);
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.flow-blase-marke {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--kachel-fg);
  background: var(--kachel);
  border-radius: var(--radius-full);
  padding: 2px 8px;
  margin-bottom: 6px;
}
.flow-notiz { font-size: 11px; color: var(--muted); padding: 0 12px 9px; line-height: 1.5; word-break: break-word; }

/* Ports und Ausgänge */
.flow-port {
  position: absolute;
  width: 14px; height: 14px;
  border-radius: var(--radius-full);
  background: var(--panel);
  border: 2px solid var(--muted-2);
  cursor: crosshair;
  z-index: 2;
}
.flow-port:hover { border-color: var(--accent); background: var(--accent-bg); }
/* Die Grifflaeche ist groesser als der Punkt -- 14 px trifft man mit der
   Maus nur mit Muehe, und ein danebengegangener Zug wirkt wie ein Fehler. */
.flow-port::before { content: ''; position: absolute; inset: -7px; border-radius: var(--radius-full); }
.flow-port.ein { left: -8px; top: 16px; }
.flow-port.aus { right: -8px; top: 7px; }
.flow-out {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 6px;
  padding: 6px 12px;
  position: relative;
  min-height: 26px;
  border-top: 1px solid var(--line-soft);
}
.flow-out-text { text-align: right; flex: 1; min-width: 0; }
.flow-out-name { font-size: 11.5px; font-weight: 500; word-break: break-word; }
.flow-out-cond { font-size: 10px; color: var(--muted); font-family: var(--font-mono); margin-top: 2px; word-break: break-word; }
.flow-chip {
  display: inline-block;
  background: var(--pill);
  border-radius: var(--radius-full);
  padding: 2px 10px;
  font-size: 10.5px;
  font-weight: 500;
}

/* Kanten */
.flow-kante { fill: none; stroke: var(--muted-2); stroke-opacity: .5; stroke-width: 2; pointer-events: none; }
.flow-kante.vorschau { stroke: var(--accent); stroke-opacity: 1; stroke-dasharray: 5 4; }
.flow-kante-treffer { stroke: transparent; stroke-width: 16; fill: none; pointer-events: stroke; cursor: pointer; }
.flow-kante-g:hover .flow-kante { stroke: var(--accent); stroke-opacity: 1; }
.flow-pfeil { fill: var(--muted-2); fill-opacity: .5; }
.flow-kante-label { fill: var(--muted); font-family: var(--font-mono); font-size: 10.5px; }
.flow-kante-label-bg { fill: var(--panel); stroke: var(--line); }
.flow-kante-weg { cursor: pointer; opacity: 0; pointer-events: auto; }
.flow-kante-g:hover .flow-kante-weg { opacity: 1; }
.flow-kante-weg circle { fill: var(--panel); stroke: var(--line); }
.flow-kante-weg text { fill: var(--text); font-size: 12px; font-weight: 700; }
.flow-kante-weg:hover circle { fill: var(--danger); stroke: var(--danger); }
.flow-kante-weg:hover text { fill: #fff; }

/* Prüfleiste unter der Fläche */
/* Offene Punkte: ein Knopf oben rechts in der Flaeche, das Popup darunter.
   Frueher stand hier eine Leiste unter der Buehne -- die nahm der Zeichnung
   dauerhaft Hoehe weg, obwohl man sie nur beim Aufraeumen liest. */
.flow-pruef-ecke {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 6;                 /* ueber den Karten, wie die Zoomleiste */
}
.flow-fehler-knopf {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.flow-fehler-knopf:hover { background: var(--panel-2); }
.flow-fehler-knopf:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.flow-fehler-zeichen {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  background: var(--bg-neutral);
  color: var(--muted);
}
.flow-fehler-knopf.hat-fehler {
  border-color: var(--danger-border);
  background: var(--bg-error-subtle);
  color: var(--danger);
}
.flow-fehler-knopf.hat-fehler .flow-fehler-zeichen { background: var(--danger); color: var(--panel); }
.flow-fehler-knopf.hat-warnung {
  border-color: var(--border-warning);
  background: var(--bg-warning-subtle);
  color: var(--warn-text);
}
.flow-fehler-knopf.hat-warnung .flow-fehler-zeichen { background: var(--warn-text); color: var(--panel); }
.flow-fehler-knopf.ist-ok { color: var(--success-text); border-color: var(--border-success); }
.flow-fehler-knopf.ist-ok .flow-fehler-zeichen { background: var(--bg-success-subtle); color: var(--success-text); }

.flow-pruefung {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 340px;
  max-width: min(340px, 60vw);
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-md);
  max-height: 260px;
  overflow-y: auto;
}
.flow-pruefung[hidden] { display: none; }

/* Dieselben Meldungen wie im Popup, nur im Modal untereinander. */
/* Ein Haken mit Text daneben -- `label` steht in diesem Projekt global auf
   `flex-direction: column`, sonst stuende der Text unter dem Kaestchen. */
.flow-haken {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  width: fit-content;
  align-self: flex-start;
  font-size: 12px;
  font-weight: 500;
}
.flow-haken input { width: auto; margin: 0; }
.flow-haken span { white-space: nowrap; }

/* Das Protokoll eines Webhook-Aufrufs im Modal. */
.flow-hook-protokoll h3 { margin: 14px 0 6px; font-size: 13px; }
.flow-hook-protokoll h3:first-child { margin-top: 4px; }
.flow-hook-protokoll pre.output {
  max-height: 220px;
  overflow: auto;
  font-size: 12px;
}
/* Das `code` darin traegt die eigentliche Umbruchregel -- ohne das schiebt
   eine lange JSON-Zeile das Modal in die Breite statt umzubrechen. */
.flow-hook-protokoll pre.output code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.flow-hook-felder { display: flex; flex-direction: column; gap: 6px; }

/* Der wartende Webhook im Simulator: eine Systemzeile mit zwei Knoepfen. */
.flow-sim-hook { text-align: left; }
.flow-sim-hook-knoepfe { display: flex; gap: 8px; margin: 8px 0 4px; }
.flow-sim-hook-knoepfe .btn, .flow-sim-hook-knoepfe .btn-ghost { font-size: 12px; padding: 4px 10px; }
.flow-sim-hook-ok { color: var(--success-text); margin-top: 4px; }
.flow-sim-hook-fehler { color: var(--danger); margin-top: 4px; }
.flow-sim-hook .hint { margin: 0; }

.flow-pruef-liste {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0 4px;
  max-height: 320px;
  overflow-y: auto;
}
.flow-meldung {
  font-size: 12px;
  padding: 7px 11px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-neutral);
}
.flow-meldung.ok { border-color: var(--border-success); background: var(--bg-success-subtle); color: var(--success-text); }
.flow-meldung.fehler { border-color: var(--danger-border); background: var(--bg-error-subtle); color: var(--danger); }
.flow-meldung.warnung { border-color: var(--border-warning); background: var(--bg-warning-subtle); color: var(--warn-text); }

/* Modal */
.flow-modal-typ { font-size: 13px; font-weight: 500; color: var(--muted); }
.flow-modal-felder { display: flex; flex-direction: column; gap: 12px; margin: 14px 0 4px; }
.flow-modal-felder h3 { margin: 8px 0 0; font-size: 13px; }
.flow-modal-felder .hint { margin: -6px 0 0; }
.flow-feld { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 500; }
.flow-feld input, .flow-feld textarea, .flow-feld select { font-weight: 400; }
.flow-unterfeld { display: flex; flex-direction: column; gap: 12px; }
.flow-ausgaenge { display: flex; flex-direction: column; gap: 8px; }
.flow-ausgang { display: flex; align-items: center; gap: 8px; }
.flow-ausgang input { flex: 1; min-width: 0; }
.flow-karten { display: flex; flex-direction: column; gap: 10px; }
.flow-karte {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}
.flow-karte-kopf { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 600; }

/* --- Simulator und Vorschau ----------------------------------------------- */

.flow-buehne.mit-sim { grid-template-columns: 232px 1fr 372px; }
@media (max-width: 1280px) { .flow-buehne.mit-sim { grid-template-columns: 232px 1fr 340px; } }

.flow-sim {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  border-left: 1px solid var(--line);
  background: var(--panel);
  padding-bottom: 12px;
}
.flow-sim-kopf {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.flow-sim-kopf .hint { margin: 0; flex: 1; font-size: 11px; }

/* Dasselbe Telefon wie im Nachrichten-Editor, nur etwas schmaler -- die
   Spalte daneben soll noch Zeichenfläche bleiben. */
.flow-phone { width: 320px; margin: 12px auto 10px; }
.flow-phone .phone-screen-wrap { height: 520px; }
.flow-phone .phone-screen { flex: 1; min-height: 0; overflow-y: auto; }

/* Die Antwort des Empfängers: eigene Blase, rechts. */
.bubble.eigen {
  align-self: flex-end;
  background: #d7f5d0;
  border-color: #c2ead9;
}
.pv-meta.eigen { align-self: flex-end; text-align: right; }

/* Chips im Simulator sind Knöpfe -- gleiche Optik, nur anklickbar. */
button.pv-chip { cursor: pointer; font: inherit; font-size: 12px; }
button.pv-chip:hover:not(:disabled) { background: #e8f0fe; }
button.pv-chip:disabled { opacity: .55; cursor: default; }

/* Die Eingabezeile des Telefons ist im Simulator echt. */
.inputbar .ib-eingabe {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 13px;
  color: #1f1f1f;
  padding: 0;
}
.inputbar .ib-eingabe:focus { outline: none; }
.inputbar button.ib-send { border: none; background: transparent; cursor: pointer; padding: 0; }
.inputbar button.ib-send:disabled { opacity: .4; cursor: default; }

.flow-sim-nachricht { display: contents; }
.flow-sim-system {
  align-self: center;
  margin: 2px auto;
  font-size: 10.5px;
  color: #5f6368;
  background: #f1f3f4;
  border-radius: var(--radius-full);
  padding: 3px 10px;
}
.flow-sim-status { padding: 4px 14px 8px; font-size: 11px; color: var(--muted); text-align: center; }
.flow-sim-fuss { display: flex; gap: 6px; padding: 0 12px 10px; }
.flow-sim-fuss button { flex: 1; font-size: 11px; }
.flow-sim-werte { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 0; border-top: 1px solid var(--line-soft); }
.flow-sim-werte:empty { display: none; }
.flow-sim-werte .hint { margin: 0; }
.flow-sim-wert { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--muted); }

/* Weg des Laufs auf der Fläche */
.flow-node.besucht { border-color: var(--border-success); }
.flow-node.aktuell { box-shadow: 0 0 0 3px var(--accent-bg), var(--shadow-sm); }

/* Vorschau im Modal */
.flow-modal-spalten { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 760px) { .flow-modal-spalten:has(.flow-modal-vorschau:not([hidden])) { grid-template-columns: 1fr 280px; } }
.flow-modal-vorschau {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: #f5f6f7;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  align-self: start;
  margin-top: 14px;
}
.flow-modal-vorschau .hint { margin: 0; }
.flow-modal-vorschau .bubble { max-width: 100%; }

.flow-marke {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--bg-neutral);
  color: var(--muted);
  white-space: nowrap;
}
.flow-marke.aktiv { border-color: var(--border-success); background: var(--bg-success-subtle); color: var(--success-text); }

/* Kleine Karte des Graphen auf der Übersichtskachel */
.flow-mini { width: 100%; height: 100%; display: block; }
.flow-mini-kante { stroke: var(--muted-2); stroke-opacity: .45; stroke-width: 1.2; }
.flow-mini-knoten { stroke: rgba(0,0,0,.12); stroke-width: .6; }
.flow-vorschau { display: flex; align-items: center; justify-content: center; padding: 6px; }

/* Der Nachrichten-Editor im Dienst eines Workflows */
.flow-nachricht-leiste {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 16px;
  margin-bottom: 4px;
  border: 1px solid var(--accent);
  background: var(--accent-subtle);
  border-radius: var(--radius-lg);
}
.fnl-text { display: flex; flex-direction: column; gap: 2px; }
.fnl-text .hint { margin: 0; }
.fnl-titel { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 500; flex: 1; min-width: 220px; max-width: 380px; }
.fnl-aktionen { display: flex; gap: 8px; margin-left: auto; }

/* Der Nachrichten-Editor, ins Modal gehängt */
.flow-editor-einbau { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: start; }
@media (max-width: 900px) { .flow-editor-einbau { grid-template-columns: 1fr; } }
.flow-editor-einbau > .card { grid-column: 1; }
.flow-editor-einbau > .phone { grid-column: 2; grid-row: 1 / span 3; margin: 0; }
/* Personalisierung hat im Flow nichts zu suchen: dort gibt es keine
   Empfängerliste, die die Platzhalter füllt. */
/* Der Platzhalter-Knopf bleibt auch im Flow -- er zeigt dort die Werte, die
   der Lauf kennt, statt der Felder einer Empfaengerliste. Ausgeblendet ist im
   Flow nur der Block Personalisierung selbst. */
body.flow-nachricht-modus #persoCard { display: none; }
/* Der Nachrichten-Editor braucht Platz: Felder und Telefon nebeneinander.
   `.modal-breit` (680 px) reicht dafür nicht -- das Telefon allein ist
   340 px breit. */
#flowModal.modal-nachricht { width: min(1180px, calc(100vw - 32px)); }
#flowModal.modal-nachricht .modal-inhalt { padding: 20px 24px; }

/* Zeitplan im Auslöser-Modal */
.flow-zeitplan-zeile { display: flex; gap: 12px; flex-wrap: wrap; }
.flow-zeitplan-zeile .flow-feld { flex: 1; min-width: 120px; }
.flow-zeitplan-satz {
  margin: 0;
  padding: 8px 12px;
  border-radius: var(--radius);
  background: var(--accent-subtle);
  border: 1px solid var(--border-success);
  color: var(--success-text);
  font-size: 13px;
  font-weight: 600;
}

/* Bedingung eines Segments: Feld · Vergleich · Wert in einer Zeile */
.flow-bedingung-zeile { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-start; }
.flow-bedingung-zeile .flow-feld { flex: 1; min-width: 150px; }
.flow-bedingung-zeile .feld-hinweis { margin-top: 4px; }
.flow-feld input.fehlerhaft { border-color: var(--danger-border); }

/* Fertige Muster zum Antippen */
.flow-muster-vorlagen { display: flex; flex-wrap: wrap; gap: 6px; }
.flow-muster-chip {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius-full);
  padding: 3px 11px;
  font-size: 11.5px;
  cursor: pointer;
  color: var(--muted);
}
.flow-muster-chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-subtle); }

/* Probe: Beispielwert eintippen, Ergebnis sofort daneben */
.flow-probe { display: flex; align-items: flex-end; gap: 10px; }
.flow-probe-label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 500; flex: 1; }
.flow-probe-ergebnis { font-size: 12px; font-weight: 600; padding-bottom: 8px; white-space: nowrap; }
.flow-probe-ergebnis.ja { color: var(--success-text); }
.flow-probe-ergebnis.nein { color: var(--danger); }

/* --- Zoom der Zeichenfläche ----------------------------------------------- */

/* Die Bühne trägt die Größe (und damit den Scrollbereich), die Fläche den
   Maßstab. Eine Transformation ändert die Layoutgröße nicht -- ohne die
   Bühne wäre beim Hineinzoomen der rechte Rand unerreichbar. */
.flow-buehne-flaeche { position: relative; }
.flow-canvas { transform-origin: 0 0; }

.flow-zoom {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: flex;
  align-items: stretch;
  gap: 1px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  /* Über den Karten, aber nicht im Weg beim Ziehen. */
  z-index: 5;
}
.flow-zoom-knopf, .flow-zoom-stufe {
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text);
  font: inherit;
  border-radius: var(--radius-full);
  padding: 4px 10px;
  line-height: 1.2;
}
.flow-zoom-knopf { font-size: 16px; width: 32px; }
.flow-zoom-stufe { font-size: 12px; font-weight: 600; min-width: 62px; font-variant-numeric: tabular-nums; }
.flow-zoom-knopf:hover, .flow-zoom-stufe:hover { background: var(--panel-2); }
.flow-zoom-knopf:disabled { color: var(--disabled); cursor: default; background: transparent; }

/* Ja/Nein-Angabe im Modal.
   `label` steht global auf `flex-direction: column` -- ohne das `row` hier
   stuende der Haken ueber dem Text, und der Text braeche in eine schmale
   Spalte um. `width: fit-content` haelt die Klickflaeche am Text statt sie
   ueber die ganze Zeile zu ziehen. */
.flow-schalter {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: fit-content;
  /* Der Elternteil streckt seine Kinder -- ohne das bliebe die Klickflaeche
     ueber die ganze Zeile stehen, obwohl nur der Text da ist. */
  align-self: flex-start;
  margin: 0;
  font-size: 12.5px;
  color: var(--text);
  cursor: pointer;
}
.flow-schalter span { white-space: nowrap; }
.flow-schalter input { flex: none; width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }

/* Werte des Laufs zum Einfügen in den Webhook */

/* --- Hilfe ---------------------------------------------------------------- */
/* Eine Schublade rechts, wie der Simulator im Workflow Designer: sie nimmt
   der Arbeitsflaeche Platz weg, statt sie zu verdecken -- man soll waehrend
   des Lesens weiterarbeiten koennen. */
.hilfe-knopf {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  flex: none;
}
.hilfe-knopf:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-subtle); }
.hilfe-knopf[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-subtle); }

.hilfe-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 92vw;
  height: 100vh;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px 20px;
  background: var(--panel);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.hilfe-panel[hidden] { display: none; }
/* Der Inhalt rueckt zur Seite, statt ueberdeckt zu werden. */
body.hilfe-offen .app-shell { padding-right: 380px; }
@media (max-width: 900px) { body.hilfe-offen .app-shell { padding-right: 0; } }

.hilfe-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hilfe-titel { margin: 0; font-size: 15px; }
.hilfe-suche { width: 100%; }
.hilfe-inhalt { overflow-y: auto; padding-right: 4px; }

.hilfe-seite + .hilfe-seite { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 16px; }
.hilfe-seite h3 { margin: 4px 0 6px; font-size: 15px; }
.hilfe-seite h4 { margin: 16px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.hilfe-seite p, .hilfe-seite li { font-size: 13px; line-height: 1.55; }
.hilfe-wozu { margin: 0 0 10px; color: var(--text); }
.hilfe-seite ol, .hilfe-seite ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.hilfe-achtung li::marker { color: var(--warn-text); }
.hilfe-bild {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 4px 0 12px;
}
.hilfe-weiter { margin: 16px 0 0; color: var(--muted); font-size: 12px; }
.hilfe-link {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
}

/* Feld-Hilfe: das kleine „i" neben einer Beschriftung. */
.feld-hilfe-knopf {
  width: 15px;
  height: 15px;
  margin-left: 6px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  background: var(--panel);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  cursor: pointer;
  vertical-align: middle;
  flex: none;
}
.feld-hilfe-knopf:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-subtle); }
.feld-hilfe-blase {
  position: fixed;
  z-index: 60;
  width: 320px;
  max-width: 92vw;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-weight: 400;
}
.feld-hilfe-blase strong { display: block; margin-bottom: 6px; font-size: 13px; }
.feld-hilfe-blase p { margin: 0; font-size: 12px; line-height: 1.55; color: var(--text); }

/* Der Elementhinweis im Workflow-Modal. */
.flow-element-hilfe {
  margin: 2px 0 10px;
  padding: 8px 11px;
  border-left: 3px solid var(--accent);
  background: var(--accent-subtle);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 12px;
  line-height: 1.5;
}
.flow-feld-kopf { display: inline-flex; align-items: center; }

/* --- Erscheinungsbild (White Labeling) ---------------------------------- */

.farb-probe { display: inline-flex; gap: 3px; }
.farb-punkt {
  width: 14px;
  height: 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
}

/* Ein Raster statt einer Spalte: 27 Farbfelder untereinander waeren eine
   Seite zum Scrollen, im Raster sind sie auf einen Blick zu ueberfliegen. */
.marke-farben {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px 16px;
  margin-bottom: 14px;
}
.marke-farbe { margin-bottom: 0; gap: 4px; }
.marke-farbe-name { font-family: var(--font-mono); font-size: 11px; color: var(--muted-2); }
.marke-farbe-eingabe { display: flex; align-items: center; gap: 6px; }
.marke-farbe-eingabe input[type="color"] {
  width: 34px;
  height: 30px;
  padding: 2px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  cursor: pointer;
}
.marke-farbe-hex { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 12px; }
.marke-farbe-weg {
  flex: none;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
}
.marke-farbe-weg:hover { color: var(--text); border-color: var(--accent); }
.marke-mehr { margin-bottom: 14px; }
.marke-mehr summary { cursor: pointer; font-size: 13px; color: var(--muted); margin-bottom: 10px; }

/* **Die Vorschau traegt ihre Farben selbst.** Die Custom Properties werden
   als Inline-Stil auf diesen Kasten gesetzt, nicht auf :root -- sonst faerbte
   die Vorschau die Verwaltungsseite mit, auf der sie steht, und wer eine
   unlesbare Farbe ausprobiert, faende den Speichern-Knopf nicht mehr. */
.marke-vorschau {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
  color: var(--text);
  margin-bottom: 14px;
}
.mv-kopf { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.mv-logo {
  background: var(--accent-bg);
  color: var(--accent-fg);
  font-weight: 800;
  padding: 8px 10px;
  border-radius: var(--radius);
  letter-spacing: 1px;
  font-size: 13px;
}
.mv-karte {
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.mv-text { margin: 0 0 6px; font-size: 14px; color: var(--text); }
.mv-muted { margin: 0 0 12px; font-size: 12px; color: var(--muted); }
.mv-knoepfe { display: flex; align-items: center; gap: 14px; }
.mv-btn {
  background: var(--accent-bg);
  border: 1px solid var(--accent-bg);
  color: var(--accent-fg);
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius);
  /* Der Knopf ist eine Probe, kein Bedienelement -- er soll aber nicht wie
     ein deaktivierter aussehen. */
  opacity: 1;
  cursor: default;
}
.mv-link { color: var(--accent); font-size: 13px; }
.marke-kontrast { margin-bottom: 14px; }
.mv-kontrast-zeile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--line-soft);
}
