/* flow.boothtml.com – eine Stilvorlage für Werbeseite und Demo */
:root {
  --bg: #f5f7fb;
  --flaeche: #ffffff;
  --text: #16203a;
  --leise: #5b6684;
  --linie: #e0e5f0;
  --akzent: #4f46e5;
  --akzent2: #0ea5a4;
  --gut: #16a34a;
  --warn: #d97706;
  --schlecht: #dc2626;
  --dunkel: #0f1630;
  --radius: 14px;
  --schatten: 0 1px 2px rgba(16, 24, 48, .06), 0 6px 24px rgba(16, 24, 48, .06);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.55; -webkit-text-size-adjust: 100%; }
a { color: var(--akzent); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
button, input, select, textarea { font: inherit; color: inherit; }
.huelle { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* Knöpfe */
.knopf {
  display: inline-flex; align-items: center; gap: .45em; justify-content: center;
  border: 1px solid var(--linie); background: var(--flaeche); border-radius: 10px;
  padding: .55em 1em; cursor: pointer; text-decoration: none; color: var(--text);
  font-weight: 600; font-size: .95rem; transition: transform .08s, background .15s;
}
.knopf:hover { background: #eef1f8; }
.knopf:active { transform: translateY(1px); }
.knopf.haupt { background: var(--akzent); border-color: var(--akzent); color: #fff; }
.knopf.haupt:hover { background: #4338ca; }
.knopf.gross { padding: .8em 1.4em; font-size: 1.05rem; }
.knopf.klein { padding: .3em .65em; font-size: .85rem; }
.knopf.gefahr { color: var(--schlecht); }
.knopf:disabled { opacity: .5; cursor: default; }

/* ---------- Werbeseite ---------- */
.kopf { position: sticky; top: 0; z-index: 20; background: rgba(15, 22, 48, .92); backdrop-filter: blur(8px); }
.kopf .huelle { display: flex; align-items: center; gap: 22px; height: 60px; }
.marke { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 1.15rem; }
.marke svg { width: 28px; height: 28px; }
.kopf nav { display: flex; gap: 18px; margin-left: auto; align-items: center; }
.kopf nav a { color: #c9d1ea; text-decoration: none; font-size: .95rem; }
.kopf nav a:hover { color: #fff; }
.kopf nav .knopf { color: #fff; }

.held { background: radial-gradient(1200px 500px at 80% -10%, #3b2fb8 0%, transparent 60%), radial-gradient(900px 400px at 0% 110%, #0e7c7b 0%, transparent 60%), var(--dunkel); color: #fff; padding: 80px 0 90px; overflow: hidden; }
.held .huelle { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.held h1 { font-size: clamp(2rem, 4.4vw, 3.3rem); letter-spacing: -.02em; }
.held h1 em { font-style: normal; background: linear-gradient(90deg, #a5b4fc, #5eead4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.held p.unter { font-size: 1.15rem; color: #c9d1ea; max-width: 560px; }
.held .aktionen { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.held .knopf:not(.haupt) { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.held .knopf:not(.haupt):hover { background: rgba(255,255,255,.08); }
.marker { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #5eead4; margin-bottom: 14px; }

/* Ablauf-Grafik im Kopfbereich */
.vorschau { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: 18px; padding: 18px; }
.vorschau .vz { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.08); border-radius: 12px; padding: 12px 14px; position: relative; opacity: .55; transition: opacity .3s, background .3s; }
.vorschau .vz.an { opacity: 1; background: rgba(94, 234, 212, .16); }
.vorschau .vz + .vz { margin-top: 22px; }
.vorschau .vz + .vz::before { content: ""; position: absolute; left: 30px; top: -22px; height: 22px; border-left: 2px dashed rgba(255,255,255,.3); }
.vorschau .sym { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: rgba(255,255,255,.12); font-size: 1.1rem; flex: none; }
.vorschau small { display: block; color: #aab4d4; }

.abschnitt { padding: 80px 0; }
.abschnitt.hell { background: var(--flaeche); }
.abschnitt h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -.01em; }
.abschnitt .einl { color: var(--leise); max-width: 680px; font-size: 1.08rem; margin-bottom: 36px; }
.raster { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 22px; box-shadow: var(--schatten); }
.abschnitt.hell .karte { background: var(--bg); box-shadow: none; }
.karte h3 { font-size: 1.1rem; }
.karte p { color: var(--leise); margin: 0; }
.karte .sym { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 1.3rem; background: #eef0ff; margin-bottom: 14px; }
.karte ul { margin: .6em 0 0; padding-left: 1.1em; color: var(--leise); }

.schritte3 { counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.schritte3 .karte::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--akzent); color: #fff; font-weight: 800; margin-bottom: 12px; }

.beispiel { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: #eef0ff; color: #3730a3; border-radius: 999px; padding: .25em .75em; font-size: .85rem; font-weight: 600; }
.chip.t { background: #e6f7f6; color: #0f6f6e; }
.pfeil { color: var(--leise); }

.logos { display: flex; flex-wrap: wrap; gap: 10px; }
.logos span { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; padding: .5em .9em; font-weight: 600; font-size: .92rem; }

.cta { background: linear-gradient(120deg, #4f46e5, #0ea5a4); color: #fff; border-radius: 22px; padding: 46px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta h2 { margin: 0 0 .3em; }
.cta p { margin: 0; color: #e0e7ff; }
.cta .knopf { background: #fff; color: var(--akzent); border-color: #fff; }

.fuss { background: var(--dunkel); color: #aab4d4; padding: 28px 0; font-size: .9rem; }
.fuss .huelle { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.fuss a { color: #dfe5f7; }
.fuss .rechts { margin-left: auto; display: flex; gap: 18px; }

.hinweis-demo { background: #fff7e6; border: 1px solid #fde3a7; color: #7a4b00; border-radius: 12px; padding: 12px 16px; font-size: .95rem; }

/* ---------- Demo-App ---------- */
.app { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.seite { background: var(--dunkel); color: #c9d1ea; padding: 18px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.seite .marke { margin: 4px 8px 22px; }
.seite button.reiter { all: unset; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: .95rem; }
.seite button.reiter:hover { background: rgba(255,255,255,.06); color: #fff; }
.seite button.reiter[aria-current="true"] { background: rgba(165,180,252,.16); color: #fff; }
.seite .unten { margin-top: auto; font-size: .8rem; padding: 8px; line-height: 1.5; }
.seite .unten a { color: #dfe5f7; }
.zahl { margin-left: auto; background: rgba(255,255,255,.12); border-radius: 999px; padding: 0 .55em; font-size: .78rem; }

.inhalt { padding: 26px 30px 90px; min-width: 0; }
.ansicht > header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.ansicht > header h1 { font-size: 1.55rem; margin: 0; }
.ansicht > header .rechts { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.ansicht[hidden] { display: none !important; }

.liste { display: grid; gap: 12px; }
.zeile { display: flex; align-items: center; gap: 14px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--schatten); }
.zeile .titel { font-weight: 700; }
.zeile .klein { color: var(--leise); font-size: .88rem; }
.zeile .mitte { flex: 1; min-width: 0; }
.zeile .kette { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.zeile.klickbar { cursor: pointer; }
.zeile.klickbar:hover { border-color: #c7cdf5; }

/* Schalter */
.schalter { position: relative; width: 44px; height: 26px; flex: none; }
.schalter input { opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; position: absolute; z-index: 1; }
.schalter span { position: absolute; inset: 0; background: #cbd2e3; border-radius: 999px; transition: background .2s; }
.schalter span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.schalter input:checked + span { background: var(--gut); }
.schalter input:checked + span::after { transform: translateX(18px); }
.schalter input:focus-visible + span { outline: 2px solid var(--akzent); outline-offset: 2px; }

/* Editor */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.kettenbild { min-width: 0; display: flex; flex-direction: column; align-items: stretch; max-width: 640px; }
.knoten { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: var(--schatten); position: relative; transition: border-color .2s, box-shadow .2s; }
.knoten + .knoten, .knoten + .einfuegen, .einfuegen + .knoten { margin-top: 0; }
.verbinder { height: 26px; width: 2px; background: #c7cdf5; margin: 0 auto; }
.knoten > .kk { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; }
.knoten .sym { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 1.15rem; background: #eef0ff; flex: none; }
.knoten.ausloeser .sym { background: #e6f7f6; }
.knoten .art { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--leise); font-weight: 700; }
.knoten .name { font-weight: 700; }
.knoten .kurz { color: var(--leise); font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.knoten .mitte { flex: 1; min-width: 0; }
.knoten .werkzeuge { display: flex; gap: 4px; }
.knoten .werkzeuge button { all: unset; cursor: pointer; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: var(--leise); }
.knoten .werkzeuge button:hover { background: #eef1f8; color: var(--text); }
.knoten .felder { border-top: 1px solid var(--linie); padding: 14px; display: grid; gap: 12px; }
.knoten[data-offen="nein"] .felder { display: none; }
.knoten.laeuft { border-color: var(--akzent); box-shadow: 0 0 0 4px rgba(79,70,229,.15); }
.knoten.ok { border-color: var(--gut); }
.knoten.halt { border-color: var(--warn); }
.knoten .status { position: absolute; right: -10px; top: -10px; width: 24px; height: 24px; border-radius: 50%; display: none; place-items: center; color: #fff; font-size: .8rem; font-weight: 800; }
.knoten.ok .status { display: grid; background: var(--gut); }
.knoten.halt .status { display: grid; background: var(--warn); }
.einfuegen { align-self: center; }
.einfuegen button { width: 32px; height: 32px; border-radius: 50%; border: 1px dashed #a5b0d6; background: var(--flaeche); cursor: pointer; font-size: 1.1rem; color: var(--akzent); }
.einfuegen button:hover { background: #eef0ff; }

label.feld { display: grid; gap: 4px; font-size: .86rem; font-weight: 600; color: var(--leise); }
label.feld input, label.feld select, label.feld textarea, .eingabe {
  width: 100%; border: 1px solid var(--linie); border-radius: 9px; padding: .55em .7em; background: #fbfcff; color: var(--text); font-weight: 400; font-size: .95rem;
}
label.feld textarea { min-height: 76px; resize: vertical; }
label.feld input:focus, label.feld select:focus, label.feld textarea:focus, .eingabe:focus { outline: 2px solid rgba(79,70,229,.35); border-color: var(--akzent); }
.platzhalter { display: flex; flex-wrap: wrap; gap: 4px; }
.platzhalter button { border: 1px solid var(--linie); background: #f3f5fb; border-radius: 6px; font-size: .75rem; padding: .15em .45em; cursor: pointer; font-family: ui-monospace, monospace; }

.seitenkasten { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: var(--schatten); padding: 16px; position: sticky; top: 20px; }
.seitenkasten h3 { font-size: 1rem; }
.protokoll { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; background: #0f1630; color: #d6dcf2; border-radius: 10px; padding: 12px; max-height: 420px; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.protokoll .z { display: block; }
.protokoll .zeit { color: #7f8bb3; }
.protokoll .ok { color: #86efac; }
.protokoll .halt { color: #fcd34d; }
.protokoll .info { color: #a5b4fc; }
.leer { color: var(--leise); font-style: italic; }

/* Auswahl-Dialog */
dialog { border: none; border-radius: 18px; padding: 0; max-width: 720px; width: calc(100% - 24px); box-shadow: 0 20px 60px rgba(0,0,0,.3); color: var(--text); }
dialog::backdrop { background: rgba(15,22,48,.5); }
dialog .dk { padding: 18px 20px; border-bottom: 1px solid var(--linie); display: flex; align-items: center; }
dialog .dk h3 { margin: 0; }
dialog .dk button { margin-left: auto; }
dialog .di { padding: 16px 20px 20px; max-height: 70vh; overflow: auto; }
dialog h4 { margin: 14px 0 8px; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--leise); }
.wahl { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.wahl button { all: unset; cursor: pointer; display: flex; gap: 10px; align-items: center; border: 1px solid var(--linie); border-radius: 11px; padding: 10px; }
.wahl button:hover { border-color: var(--akzent); background: #f6f7ff; }
.wahl .sym { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: #eef0ff; flex: none; }
.wahl small { display: block; color: var(--leise); font-size: .78rem; line-height: 1.3; }

/* Telefonanlage & Analyse */
.zweispaltig { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.kasten { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: var(--schatten); padding: 18px; }
.kasten h3 { font-size: 1.05rem; }
.nebenstellen { display: grid; gap: 8px; }
.nst { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--linie); border-radius: 10px; }
.nst .punkt { width: 10px; height: 10px; border-radius: 50%; background: var(--gut); flex: none; }
.nst.besetzt .punkt { background: var(--schlecht); }
.nst.klingelt { border-color: var(--warn); background: #fff9ec; }
.nst.klingelt .punkt { background: var(--warn); animation: puls .6s infinite alternate; }
@keyframes puls { to { transform: scale(1.6); opacity: .5; } }
.nst .r { margin-left: auto; color: var(--leise); font-size: .85rem; }
.telefon { border: 1px solid var(--linie); border-radius: 18px; padding: 18px; text-align: center; background: linear-gradient(180deg, #fbfcff, #f1f3fb); }
.telefon .nummer { font-size: 1.4rem; font-weight: 800; letter-spacing: .02em; }
.telefon .wer { color: var(--leise); }
.telefon .stand { margin: 10px 0; font-weight: 700; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--schatten); }
.kpi .w { font-size: 1.6rem; font-weight: 800; }
.kpi .l { color: var(--leise); font-size: .85rem; }
.diagramm svg { width: 100%; height: auto; display: block; }
.diagramm text { font-size: 11px; fill: var(--leise); }
.legende { display: flex; gap: 14px; font-size: .85rem; color: var(--leise); margin-top: 6px; flex-wrap: wrap; }
.legende i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.balkenliste { display: grid; gap: 8px; }
.balkenliste .b { display: grid; grid-template-columns: 120px 1fr 44px; gap: 10px; align-items: center; font-size: .9rem; }
.balkenliste .spur { background: #eef1f8; border-radius: 6px; height: 10px; overflow: hidden; }
.balkenliste .spur div { height: 100%; background: var(--akzent2); border-radius: 6px; }

table.tab { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.tab th, table.tab td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--linie); vertical-align: top; }
table.tab th { color: var(--leise); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.marke-status { display: inline-block; border-radius: 999px; padding: .1em .6em; font-size: .78rem; font-weight: 700; }
.marke-status.ok { background: #dcfce7; color: #166534; }
.marke-status.halt { background: #fef3c7; color: #92400e; }
.marke-status.aus { background: #eef1f8; color: var(--leise); }
details.lauf summary { cursor: pointer; }
details.lauf ol { margin: 8px 0 0; padding-left: 1.2em; color: var(--leise); font-size: .86rem; }

.verbindungen { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.verbindung { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 14px; display: flex; gap: 12px; align-items: flex-start; }
.verbindung .sym { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: #eef0ff; flex: none; font-size: 1.15rem; }
.verbindung .klein { color: var(--leise); font-size: .84rem; }
.code { font-family: ui-monospace, monospace; background: #0f1630; color: #d6dcf2; border-radius: 10px; padding: 12px; font-size: .82rem; overflow: auto; white-space: pre; }

.toast { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: grid; gap: 8px; }
.toast div { background: var(--dunkel); color: #fff; padding: 10px 14px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.25); font-size: .9rem; max-width: 340px; animation: rein .25s; }
@keyframes rein { from { transform: translateY(10px); opacity: 0; } }

.unterleiste { display: none; }

/* ---------- Telefon / schmal ---------- */
@media (max-width: 900px) {
  .held .huelle, .zweispaltig, .editor { grid-template-columns: minmax(0, 1fr); }
  .raster, .schritte3 { grid-template-columns: 1fr 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .seitenkasten { position: static; }
}
@media (max-width: 720px) {
  .kopf nav a:not(.knopf) { display: none; }
  .raster, .schritte3 { grid-template-columns: 1fr; }
  .held { padding: 48px 0 56px; }
  .abschnitt { padding: 56px 0; }
  .cta { padding: 28px; }
  .fuss .rechts { margin-left: 0; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .seite { display: none; }
  .inhalt { padding: 16px 14px 96px; }
  .unterleiste { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--dunkel); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .unterleiste button { all: unset; flex: 1; text-align: center; color: #aab4d4; font-size: .7rem; padding: 4px 0; cursor: pointer; }
  .unterleiste button span { display: block; font-size: 1.2rem; }
  .unterleiste button[aria-current="true"] { color: #fff; }
  .balkenliste .b { grid-template-columns: 90px 1fr 36px; }
  .toast { left: 12px; right: 12px; bottom: 76px; }
  .tab-schmal thead { display: none; }
  .tab-schmal tr { display: block; border-bottom: 1px solid var(--linie); padding: 6px 0; }
  .tab-schmal td { display: block; border: none; padding: 3px 4px; }
  .tab-schmal td[data-label]::before { content: attr(data-label) ": "; color: var(--leise); font-size: .8rem; }
}

/* Preise */
.umschalter { display: inline-flex; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 22px; }
.umschalter button { border: none; background: none; padding: .5em 1em; border-radius: 9px; font-weight: 600; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.umschalter button[aria-pressed="true"] { background: var(--akzent); color: #fff; }
.umschalter button[aria-pressed="true"] .chip { background: rgba(255,255,255,.2); color: #fff; }
.pakete { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 900px; }
.paket { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 18px; padding: 26px; box-shadow: var(--schatten); position: relative; display: flex; flex-direction: column; }
.paket.empfohlen { border: 2px solid var(--akzent); }
.paket .schild { position: absolute; top: -13px; left: 24px; background: var(--akzent); color: #fff; font-size: .78rem; font-weight: 700; border-radius: 999px; padding: .25em .8em; }
.paket .fuer { color: var(--leise); margin: 0 0 14px; }
.paket .preis { font-size: 1rem; color: var(--leise); }
.paket .preis b { font-size: 2.4rem; color: var(--text); letter-spacing: -.02em; }
.paket .jahrhinweis { color: var(--leise); font-size: .88rem; margin: 2px 0 14px; min-height: 1.3em; }
.paket ul { padding-left: 1.1em; margin: 0 0 20px; flex: 1; }
.paket li { margin: 4px 0; }
.preisraster { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 26px; }
.preisraster .tab td { padding: 7px 4px; }
.preisraster .tab td:last-child { text-align: right; white-space: nowrap; }
.preisraster p.klein { font-size: .86rem; margin-top: 10px; }
@media (max-width: 900px) { .preisraster { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .pakete { grid-template-columns: 1fr; } .paket { padding: 22px; } }
