/* Funnel-Zeitleiste (views/funnel-timeline.js) und Cockpit-Modus (Live · Simulator · Annahme).
   Farben wie das Funnel-Board: Indigo = Menschen (Seiten, Mails), Smaragd = Geld, Grau = Kosten, Gelb nur Hauptaktion. */

/* ---------------------------------------------------------------- Panel breiter, solange die Zeitleiste offen ist */
.fbx-main.with-panel.wide-panel { grid-template-columns: minmax(0, 1fr) min(1180px, 74vw); }
@media (max-width: 1500px) { .fbx-main.with-panel.wide-panel .fbx-panel { width: min(1180px, calc(100vw - 72px)); } }
.fbx-panel { transition: width 0.18s var(--ease); }

/* ---------------------------------------------------------------- Kopf, Widersprüche */
.tl { display: grid; gap: 12px; min-width: 0; }
.tl-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tl-sum { flex: 1 1 260px; font-size: 13.5px; line-height: 1.4; }
.tl-sum b { font-weight: 750; }
.tl-conflicts { display: grid; gap: 8px; }
.tl-conf { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; border: 1px solid #f0dd84; background: var(--yellow-soft); border-radius: 10px; padding: 9px 11px; font-size: 13px; }
.tl-conf-ico { color: #8a6d00; display: grid; place-items: center; padding-top: 1px; }
.tl-conf-ico svg { width: 16px; height: 16px; }
.tl-conf .grow { min-width: 200px; }
.tl-conf-a { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* ---------------------------------------------------------------- Achse */
.tl-axis { position: relative; display: grid; gap: 2px; min-width: 0; overflow: hidden; padding-bottom: 4px; }
.tl-ticks { position: relative; height: 26px; border-bottom: 1px solid var(--rule); margin-right: 12px; }
.tl-tick { position: absolute; bottom: 4px; transform: translateX(-50%); font-size: 10.5px; color: var(--muted-2); white-space: nowrap; font-feature-settings: var(--tnum); }
.tl-tick.major { color: var(--ink-2); font-weight: 650; }
.tl-tick:first-of-type { transform: none; }
.tl-zone { position: absolute; top: 0; bottom: 0; background: var(--people-soft); border-radius: 6px 6px 0 0; }
.tl-zone em { position: absolute; left: 6px; top: 2px; font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--people); }
.tl-lane { display: flex; align-items: stretch; border-bottom: 1px dashed var(--hair); }
.tl-lane-h { flex: none; padding: 7px 10px 6px 0; display: grid; align-content: start; gap: 1px; }
.tl-lane-h b { font-size: 12px; font-weight: 750; line-height: 1.25; }
.tl-lane-h small { font-size: 10.5px; color: var(--muted); line-height: 1.25; }
.tl-track { position: relative; flex: 1 1 auto; min-width: 0; margin-right: 12px; }
.tl-grid { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--hair); pointer-events: none; }
.lane-day0 .tl-track { background: linear-gradient(90deg, rgba(79, 70, 229, 0.035), transparent 60%); }

.tl-chip { position: absolute; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 7px 0 5px; border-radius: 7px; border: 1px solid var(--rule-2); background: #fff; font: inherit; font-size: 11.5px; font-weight: 650; color: var(--ink); cursor: pointer; white-space: nowrap; min-width: 0; box-shadow: 0 1px 2px rgba(21, 21, 26, 0.06); transition: box-shadow 0.12s, border-color 0.12s, transform 0.12s; z-index: 1; }
.tl-chip:hover, .tl-chip:focus-visible, .tl-chip.on { z-index: 3; box-shadow: 0 4px 12px -4px rgba(21, 21, 26, 0.35); border-color: var(--ink-2); outline: none; }
.tl-ico { display: grid; place-items: center; flex: none; }
.tl-ico svg { width: 13px; height: 13px; }
.tl-chip.people { border-left: 3px solid var(--people); }
.tl-chip.people .tl-ico { color: var(--people); }
.tl-chip.money { border-left: 3px solid var(--money); }
.tl-chip.money .tl-ico { color: var(--money); }
.tl-chip.cost { border-left: 3px solid var(--cost-3); color: var(--cost-1); }
.tl-chip.cross { border-left-color: var(--money); }
.tl-chip.st-missing, .tl-chip.st-optional { border-style: dashed; background: #fbfbf9; color: var(--muted); }
.tl-chip.st-missing.people, .tl-chip.st-optional.people { border-left-style: dashed; }
.tl-chip.st-optional { opacity: 0.75; }
.tl-chip.st-running, .tl-chip.st-queued { background: var(--people-soft); }
.tl-chip.st-running .tl-ico { animation: tl-pulse 1.2s ease-in-out infinite; }
.tl-chip.st-failed { border-color: var(--red); }
.tl-chip.st-paused { opacity: 0.45; }
.tl-chip.st-assumed { border-style: dotted; }
.tl-chip.ph { border-style: dashed; color: var(--muted); }
@keyframes tl-pulse { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .tl-chip.st-running .tl-ico { animation: none; } }
.tl-arrive { position: absolute; height: 3px; border-radius: 3px; background: repeating-linear-gradient(90deg, var(--cost-3) 0 5px, transparent 5px 8px); pointer-events: none; }
.tl-bar { position: absolute; height: 24px; display: flex; align-items: center; padding: 0 8px; border-radius: 7px; border: 1px solid transparent; font: inherit; font-size: 11.5px; font-weight: 650; cursor: pointer; min-width: 8px; overflow: hidden; text-align: left; }
.tl-bar.money { background: var(--money-soft); border-color: rgba(5, 150, 105, 0.35); color: #065f46; }
.tl-bar.people { background: var(--people-soft); border-color: rgba(79, 70, 229, 0.3); color: var(--people); }
.tl-bar.st-assumed { background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0 6px, transparent 6px 12px); border-style: dashed; }
.tl-bar:hover, .tl-bar:focus-visible { outline: none; box-shadow: 0 4px 12px -4px rgba(21, 21, 26, 0.35); }

.tl-tip { position: absolute; z-index: 20; width: 250px; background: var(--ink); color: #fff; border-radius: 10px; padding: 9px 11px; box-shadow: var(--shadow-lg); pointer-events: none; font-size: 12px; }
.tl-det { display: grid; gap: 3px; line-height: 1.35; }
.tl-det-t { font-size: 12.5px; font-weight: 750; word-break: break-word; }
.tl-det-s { color: rgba(255, 255, 255, 0.78); word-break: break-word; }
.tl-det-w { font-weight: 650; font-feature-settings: var(--tnum); }
.tl-det-eur { font-weight: 750; font-feature-settings: var(--tnum); }
.tl-det-eur.money { color: var(--money-2); }
.tl-det-eur.cost { color: #d4d4d8; }
.tl-det-eur small, .tl-det-s em { font-weight: 500; font-style: normal; opacity: 0.8; }
.tl-det-s em { border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 5px; padding: 0 4px; font-size: 10.5px; }
.tl-det-note { color: #fde68a; }
.tl-det-st { font-size: 11px; color: rgba(255, 255, 255, 0.7); }
.tl-det-a { font-size: 11px; color: rgba(255, 255, 255, 0.6); }

/* ---------------------------------------------------------------- Liste (Handy, „Liste“) */
.tl-list { display: grid; gap: 14px; }
.tl-day { display: grid; gap: 6px; }
.tl-day h4 { position: sticky; top: 0; z-index: 1; background: #fff; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 4px 0; margin: 0; }
.tl-day h4 small { text-transform: none; letter-spacing: 0; font-weight: 600; }
.tl-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; align-items: center; width: 100%; text-align: left; font: inherit; color: inherit; background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 7px 9px; cursor: pointer; }
.tl-row:hover, .tl-row:focus-visible { border-color: var(--ink-2); outline: none; }
.tl-row .tl-ico { width: 26px; height: 26px; border-radius: 8px; background: var(--people-soft); color: var(--people); }
.tl-row.money .tl-ico { background: var(--money-soft); color: var(--money); }
.tl-row.cost .tl-ico { background: var(--bg); color: var(--cost-1); }
.tl-row.st-missing, .tl-row.ph { border-style: dashed; }
.tl-row.st-paused { opacity: 0.5; }
.tl-row-m { display: grid; gap: 1px; min-width: 0; }
.tl-row-m b { font-size: 13px; }
.tl-row-m small { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.tl-row-m small em { font-style: normal; border: 1px solid var(--rule-2); border-radius: 5px; padding: 0 4px; font-size: 10.5px; }
.tl-row-r { display: grid; justify-items: end; gap: 1px; white-space: nowrap; }
.tl-row-r b { font-size: 12.5px; font-feature-settings: var(--tnum); }
.tl-row-r b.money { color: var(--money); }
.tl-row-r b.cost { color: var(--cost-2); }
.tl-row-r small { font-size: 11px; color: var(--muted); }
.tl-row-r small.st-missing { color: #8a6d00; }
.tl-row-m .tl-det-note { color: #8a6d00; }
.tl-flow { display: grid; gap: 6px; }
.tl-flow-h { font-size: 12.5px; font-weight: 700; }
.tl-flow-h small { font-weight: 500; color: var(--muted); }

.tl-foot { line-height: 1.5; }
.tl-leg { display: inline-flex; gap: 10px; margin-left: 6px; align-items: center; flex-wrap: wrap; }
.tl-leg i { display: inline-block; width: 14px; height: 10px; border-radius: 3px; border: 1px solid var(--ink-2); margin-right: 3px; vertical-align: -1px; }
.tl-leg i.st-missing { border-style: dashed; border-color: var(--muted); }
.tl-leg i.st-assumed { border-style: dotted; border-color: var(--money); background: var(--money-soft); }

/* ---------------------------------------------------------------- Cockpit: Annahme, Live, Simulator */
.as-tag { display: inline-flex; align-items: center; font-size: 10.5px; font-weight: 650; color: var(--muted); border: 1px solid var(--rule-2); border-radius: 6px; padding: 0 5px; line-height: 16px; white-space: nowrap; font-style: normal; vertical-align: 1px; }
.live-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; color: var(--people); background: var(--people-soft); border-radius: 6px; padding: 0 6px; line-height: 17px; white-space: nowrap; font-style: normal; vertical-align: 1px; }
.live-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--money); }
.mode-pill { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 12.5px; font-weight: 700; border-radius: 999px; padding: 4px 11px; border: 1px solid var(--rule-2); background: #fff; cursor: pointer; white-space: nowrap; }
.mode-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--money); box-shadow: 0 0 0 3px var(--money-soft); }
.mode-pill.sim { background: var(--people-soft); border-color: rgba(79, 70, 229, 0.35); color: var(--people); }
.mode-pill.sim i { background: var(--people); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18); }
.simbar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 7px 16px; background: var(--people-soft); border-bottom: 1px solid rgba(79, 70, 229, 0.25); font-size: 12.5px; color: var(--ink-2); }
.simbar b { color: var(--people); }
.simbar .sim-chg { color: var(--ink-2); }
.cp-mode { display: grid; gap: 8px; border: 1px solid var(--rule); border-radius: 12px; padding: 10px 12px; background: #fff; }
.cp-mode.live { border-color: rgba(5, 150, 105, 0.35); }
.cp-mode.sim { border-color: rgba(79, 70, 229, 0.35); background: var(--people-soft); }
.cp-mode-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.cp-mode-h b { font-weight: 750; }
.cp-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.cp-kpis > div { border: 1px solid var(--rule); border-radius: 9px; padding: 6px 8px; display: grid; gap: 1px; background: #fff; }
.cp-kpis span { font-size: 10.5px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted); }
.cp-kpis b { font-size: 14px; font-feature-settings: var(--tnum); }
.cp-connect { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); padding: 2px 2px 0; }
.cp-connect a, .cp-connect button.linkbtn { font-weight: 650; }
.cp-changes { display: grid; gap: 2px; font-size: 12px; margin: 0; padding-left: 16px; }
.cp-changes li b { font-feature-settings: var(--tnum); }
.cp-scen { display: grid; gap: 4px; }
.cp-scen-row { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.cp-scen-row .grow { min-width: 0; }
.kb-mode { display: inline-flex; align-items: center; }
.os-when-src { font-style: normal; }
/* Folgen-Editor: absoluter Zeitpunkt („Tag 12 nach dem Kauf“) und Post-Ankunft unter Tag/Stunde */
.flw-when { flex-wrap: wrap; }
.flw-abs { flex: 0 0 100%; display: block; font-size: 11px; color: var(--muted); line-height: 1.3; margin-top: 2px; white-space: normal; text-align: right; }
@media (max-width: 720px) { .flw-abs { text-align: left; } }
.live-tag.sim::before { background: var(--people); }
.bd-live { font-style: normal; font-size: 9.5px; font-weight: 800; letter-spacing: 0.02em; color: var(--people); background: var(--people-soft); border-radius: 4px; padding: 0 4px; margin-left: 3px; vertical-align: 1px; }
.fx-slider.locked input[type="range"] { opacity: 0.55; cursor: not-allowed; }
.kb-mode { border: 0; background: transparent; padding: 0; cursor: pointer; }
.sp-body.sp-mode { padding-bottom: 4px; }

/* Tag 0: Stationen auf einer Linie, Beschriftung abwechselnd oben/unten (Knopf = Beschriftung + Punkt) */
.tl-stations { height: 100px; }
.tl-line { position: absolute; top: 49px; height: 2px; background: linear-gradient(90deg, var(--people-2), var(--money-2)); border-radius: 2px; }
.tl-st { position: absolute; top: 0; height: 100px; transform: translateX(-50%); display: grid; grid-template-rows: 42px 16px 42px; justify-items: center; padding: 0; border: 0; background: transparent; font: inherit; cursor: pointer; z-index: 1; }
.tl-st:hover, .tl-st:focus-visible, .tl-st.on { z-index: 3; outline: none; }
.tl-dot { grid-row: 2; align-self: center; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--people); box-sizing: border-box; }
.tl-st.money .tl-dot { border-color: var(--money); }
.tl-st.cost .tl-dot { border-color: var(--cost-3); }
.tl-st.st-done .tl-dot { background: var(--people); }
.tl-st.money.st-done .tl-dot { background: var(--money); }
.tl-st.st-missing .tl-dot, .tl-st.st-optional .tl-dot { border-style: dashed; }
.tl-st.st-optional .tl-dot { border-color: var(--muted-2); }
.tl-st.st-running .tl-dot { background: var(--people-2); animation: tl-pulse 1.2s ease-in-out infinite; }
.tl-st.buy .tl-dot { width: 16px; height: 16px; background: var(--money); border-color: var(--money); box-shadow: 0 0 0 3px var(--money-soft); }
.tl-st-l { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; width: max-content; text-align: center; white-space: normal; overflow-wrap: normal; hyphens: auto; font-size: 10px; line-height: 1.2; font-weight: 650; color: var(--ink-2); background: #fff; border: 1px solid var(--rule); border-radius: 6px; padding: 2px 4px; }
.tl-st.up .tl-st-l { grid-row: 1; align-self: end; margin-bottom: 3px; }
.tl-st.dn .tl-st-l { grid-row: 3; align-self: start; margin-top: 3px; }
.tl-st .tl-st-l { transform: translateX(var(--shift, 0px)); }
.tl-st.people .tl-st-l { border-color: rgba(79, 70, 229, 0.3); }
.tl-st.money .tl-st-l { border-color: rgba(5, 150, 105, 0.35); }
.tl-st.st-missing .tl-st-l, .tl-st.st-optional .tl-st-l { border-style: dashed; color: var(--muted); }
.tl-st.buy .tl-st-l { font-weight: 800; color: var(--money); border-color: rgba(5, 150, 105, 0.45); }
.tl-st:hover .tl-st-l, .tl-st:focus-visible .tl-st-l, .tl-st.on .tl-st-l { border-color: var(--ink-2); box-shadow: 0 4px 12px -4px rgba(21, 21, 26, 0.3); }
.tl-chip.num { justify-content: center; padding: 0 5px; border-left-width: 1px; font-feature-settings: var(--tnum); }
.tl-chip.num.people { border-color: rgba(79, 70, 229, 0.45); color: var(--people); }
.tl-chip.num.cross { border-color: rgba(5, 150, 105, 0.5); color: var(--money); }
.tl-chip.num.st-done.people { background: var(--people); color: #fff; border-color: var(--people); }
.tl-chip.num.st-done.cross { background: var(--money); color: #fff; border-color: var(--money); }
.tl-chip.num.st-missing { background: #fff; border-style: dashed; }
.fbx.with-sim { grid-template-rows: auto auto auto minmax(0, 1fr); }
/* Regler mit Kennzeichnung: Label darf umbrechen, damit „Live · Quelle“ nicht den Namen abschneidet */
.fx-slider-l:has(.live-tag), .fx-slider-l:has(.as-tag) { white-space: normal; line-height: 1.35; }
.fx-slider-l .live-tag, .fx-slider-l .as-tag, .cfield-l .live-tag, .cfield-l .as-tag { margin-left: 2px; }
/* Cockpit-Reiter passen in die schmale Spalte */
.sp-tabs .tab { padding-left: 9px; padding-right: 9px; }

/* Warnungen des Live-Berichts im Cockpit (Connector-Fehler, veraltete Zahlen) */
.cp-warn { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.cp-warn li { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; line-height: 1.35; color: var(--ink-2); background: var(--orange-soft); border-radius: var(--r-sm); padding: 5px 8px; }
.cp-warn li svg { flex: 0 0 auto; width: 13px; height: 13px; margin-top: 1px; color: var(--orange); }
.cp-connect .cp-warn { flex: 0 0 100%; }
