/* style.css - Formance Group: neutral (Dunkelgrau, Grau-Weiss). In einer
   Marke faerbt der Akzent um: Salesformance Limette, Socialformance Gold,
   Scaleformance Orange. Wix Madefor Display + JetBrains Mono.
   Schriften: CSP erlaubt nur eigene Dateien -> bis sie unter /schriften/
   liegen, greift die Systemschrift (PLAN.md, Abschnitt 2). */
:root {
  /* Formance Group: neutral. --limette ist der Akzent und wird je Marke
     umgesetzt (marke.js, themaSetzen); der Name bleibt aus v1. */
  --limette: #E8E8E4;
  --akzent-rgb: 232, 232, 228;
  --limette-dunkel: #BDBDB8;
  --limette-glas: rgba(var(--akzent-rgb), 0.10);
  --akzent-rand: rgba(var(--akzent-rgb), 0.35);
  --grund: #0C0C0D;
  --flaeche: #141415;
  --flaeche-2: #1A1A1C;
  --flaeche-3: #232326;
  --rand: #2A2A2D;
  --rand-hell: #3A3A3E;
  --text: #F2F2EF;
  --leise: #A2A2A7;
  --sehr-leise: #6F6F75;
  --fehler: #FF6B5B;
  --warnung: #F5B83D;
  --erfolg: #8FD694;
  --info: #9CC9F5;
  --radius: 12px;
  --schrift: "Wix Madefor Display", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: dark;
  font-family: var(--schrift);
  color: var(--text);
  background: var(--grund);
  font-size: 15px;
  line-height: 1.45;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--grund); }
body { background: radial-gradient(1200px 600px at 85% -10%, rgba(var(--akzent-rgb), 0.06), transparent 60%), var(--grund); background-attachment: fixed; }
a { color: var(--limette); }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; margin: 0 0 12px; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
code, .mono { font-family: var(--mono); font-size: 0.88em; }
.leise { color: var(--leise); }
.sehr-leise { color: var(--sehr-leise); }
.fehler { color: var(--fehler); }
.erfolg { color: var(--erfolg); }
.hinweis { background: var(--limette-glas); border: 1px solid rgba(var(--akzent-rgb), 0.25); border-radius: var(--radius); padding: 10px 14px; margin: 0 0 16px; }
.hinweis.warnung { background: rgba(245, 184, 61, 0.08); border-color: rgba(245, 184, 61, 0.35); }

/* ---- Formulare ---- */
label { display: block; margin: 0 0 12px; font-size: 0.85rem; color: var(--leise); }
input, select, textarea {
  display: block; width: 100%; margin-top: 5px; padding: 9px 11px; border: 1px solid var(--rand-hell); border-radius: 9px;
  background: var(--flaeche-2); color: var(--text); font: inherit; font-size: 0.95rem;
}
textarea { min-height: 90px; resize: vertical; }
input[type="checkbox"] { display: inline-block; width: 16px; height: 16px; margin: 0; accent-color: var(--limette); vertical-align: middle; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--limette); box-shadow: 0 0 0 3px var(--limette-glas); }
button, .knopf {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--limette); border-radius: 999px;
  background: var(--limette); color: #0A0B09; font: inherit; font-weight: 650; font-size: 0.9rem; cursor: pointer; text-decoration: none; white-space: nowrap;
}
button:hover, .knopf:hover { filter: brightness(1.08); }
button.leise:hover, button.ikon:hover, button.gefahr:hover { filter: none; }
button.leise, .knopf.leise { background: transparent; color: var(--text); border-color: var(--rand-hell); font-weight: 550; }
button.leise:hover { border-color: var(--limette); color: var(--limette); background: transparent; }
button.gefahr { background: transparent; color: var(--fehler); border-color: rgba(255, 107, 91, 0.4); }
button.klein { padding: 4px 10px; font-size: 0.8rem; }
button.ikon { padding: 4px 8px; border-radius: 8px; background: transparent; border-color: transparent; color: var(--leise); }
button.ikon:hover { color: var(--text); background: var(--flaeche-3); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--limette); outline-offset: 2px; }

/* ---- Anmeldung ---- */
.anmeldung { max-width: 400px; margin: 12vh auto; padding: 32px; background: var(--flaeche); border: 1px solid var(--rand); border-radius: 20px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); }
.anmeldung .logo { display: block; height: 26px; margin: 0 0 6px; }
.anmeldung .unterzeile { font-family: var(--mono); font-size: 0.75rem; color: var(--leise); letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 26px; }
.anmeldung button[type="submit"] { width: 100%; justify-content: center; padding: 11px; margin-top: 6px; }

/* ---- Rahmen ---- */
.rahmen { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.seite { background: var(--flaeche); border-right: 1px solid var(--rand); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.seite .marke { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.seite .marke img { height: 18px; }
.seite .marke small { display: block; font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.12em; color: var(--sehr-leise); text-transform: uppercase; margin-top: 2px; }
.seite a.nav { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--leise); text-decoration: none; font-size: 0.92rem; }
.seite a.nav:hover { color: var(--text); background: var(--flaeche-2); }
.seite a.nav[aria-current="page"] { color: var(--text); background: var(--flaeche-3); box-shadow: inset 2px 0 0 var(--limette); }
.seite .abschnitt { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sehr-leise); padding: 16px 10px 6px; }
.seite .punkt { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.seite .fuss { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--rand); display: flex; align-items: center; gap: 8px; }
.seite .fuss .name { flex: 1; min-width: 0; font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inhalt { padding: 26px 32px 60px; min-width: 0; }
.kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.kopf .titel { display: flex; flex-direction: column; gap: 4px; }
.kopf .ueber { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--leise); display: flex; align-items: center; gap: 8px; }
.knoepfe { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.reiter { display: flex; gap: 2px; border-bottom: 1px solid var(--rand); margin: 0 0 18px; overflow-x: auto; }
.reiter a { padding: 9px 14px; color: var(--leise); text-decoration: none; font-size: 0.9rem; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.reiter a:hover { color: var(--text); }
.reiter a[aria-current="page"] { color: var(--text); border-bottom-color: var(--limette); }

.karte { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); padding: 18px; margin: 0 0 16px; }
.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; margin-bottom: 26px; }
.projektkarte { display: block; background: var(--flaeche); border: 1px solid var(--rand); border-radius: 16px; padding: 18px; text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s; position: relative; overflow: hidden; }
.projektkarte:hover { border-color: var(--rand-hell); transform: translateY(-2px); }
.projektkarte::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--akzent, var(--limette)); }
.projektkarte h3 { margin: 6px 0 6px; font-size: 1.05rem; }
.projektkarte p { margin: 0 0 14px; color: var(--leise); font-size: 0.85rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fortschritt { height: 6px; border-radius: 99px; background: var(--flaeche-3); overflow: hidden; }
.fortschritt span { display: block; height: 100%; background: var(--limette); border-radius: 99px; }
.zahlen { display: flex; gap: 14px; margin-top: 10px; font-family: var(--mono); font-size: 0.75rem; color: var(--leise); }
.zahlen .rot { color: var(--fehler); }
.etikett { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 99px; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.04em; border: 1px solid var(--rand-hell); color: var(--leise); white-space: nowrap; }
.etikett.dringend { color: #0A0B09; background: var(--fehler); border-color: var(--fehler); }
.etikett.hoch { color: var(--warnung); border-color: rgba(245, 184, 61, 0.45); }
.etikett.niedrig { color: var(--sehr-leise); }
.etikett.rot { color: var(--fehler); border-color: rgba(255, 107, 91, 0.45); }
.etikett.limette { color: var(--limette); border-color: var(--akzent-rand); }
.avatar { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 0.66rem; font-weight: 700; color: #0A0B09; background: var(--limette); flex: none; }
.avatar.gross { width: 30px; height: 30px; font-size: 0.75rem; }

/* ---- Board ---- */
.board { display: flex; gap: 14px; overflow-x: auto; align-items: flex-start; padding-bottom: 16px; min-height: 60vh; }
.spalte { flex: 0 0 300px; background: var(--flaeche); border: 1px solid var(--rand); border-radius: 14px; display: flex; flex-direction: column; max-height: calc(100vh - 210px); }
.spalte.ziel { border-color: var(--limette); box-shadow: 0 0 0 3px var(--limette-glas); }
.spalte header { display: flex; align-items: center; gap: 8px; padding: 12px 12px 8px; }
.spalte header h3 { margin: 0; font-size: 0.9rem; flex: 1; }
.spalte header .anzahl { font-family: var(--mono); font-size: 0.72rem; color: var(--sehr-leise); }
.spalte .karten { padding: 4px 10px 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.spalte .neu { margin: 0 10px 10px; }
.spalte .neu input { margin: 0; background: transparent; border-style: dashed; }
.aufgabenkarte { background: var(--flaeche-2); border: 1px solid var(--rand); border-radius: 10px; padding: 10px 11px; cursor: pointer; user-select: none; }
.aufgabenkarte:hover { border-color: var(--rand-hell); }
.aufgabenkarte.zieht { opacity: 0.4; }
.aufgabenkarte.erledigt .titel { text-decoration: line-through; color: var(--leise); }
.aufgabenkarte .titel { font-size: 0.9rem; margin-bottom: 8px; word-break: break-word; }
.aufgabenkarte .meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.aufgabenkarte .meta .rechts { margin-left: auto; }
.aufgabenkarte .schritt { font-family: var(--mono); font-size: 0.66rem; color: var(--sehr-leise); margin-bottom: 6px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.einfuegen { height: 3px; border-radius: 2px; background: var(--limette); margin: -2px 0; }

/* ---- Tabellen ---- */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-family: var(--mono); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sehr-leise); padding: 8px 10px; border-bottom: 1px solid var(--rand); cursor: default; }
th.sortierbar { cursor: pointer; }
td { padding: 10px; border-bottom: 1px solid var(--rand); vertical-align: middle; font-size: 0.9rem; }
tr.klickbar { cursor: pointer; }
tr.klickbar:hover td { background: var(--flaeche-2); }
.zahl { text-align: right; font-variant-numeric: tabular-nums; }
.tabelle-huelle { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); overflow-x: auto; }

/* ---- Seitenpanel (Aufgabe) ---- */
.schleier { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); z-index: 40; animation: ein .15s; }
.panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100vw); background: var(--flaeche); border-left: 1px solid var(--rand); z-index: 41; overflow-y: auto; padding: 20px 24px 40px; animation: rein .18s ease-out; }
@keyframes rein { from { transform: translateX(30px); opacity: 0; } }
@keyframes ein { from { opacity: 0; } }
.panel .titelfeld { font-size: 1.3rem; font-weight: 700; border: 1px solid transparent; background: transparent; padding: 6px 8px; margin: 0 -8px 10px; }
.panel .titelfeld:hover { border-color: var(--rand); }
.felder { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.panel section { border-top: 1px solid var(--rand); padding-top: 14px; margin-top: 14px; }
.check { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.check span { flex: 1; }
.check.ok span { text-decoration: line-through; color: var(--leise); }
.kommentar { display: flex; gap: 10px; padding: 10px 0; }
.kommentar .blase { flex: 1; background: var(--flaeche-2); border: 1px solid var(--rand); border-radius: 10px; padding: 8px 12px; white-space: pre-wrap; word-break: break-word; font-size: 0.9rem; }
.kommentar .wer { font-size: 0.75rem; color: var(--leise); margin-bottom: 4px; display: flex; gap: 8px; }
.zeile { display: flex; gap: 8px; align-items: center; }
.zeile > input, .zeile > select { margin: 0; flex: 1; }
.liste-klein { list-style: none; padding: 0; margin: 0 0 8px; }
.liste-klein li { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 0.9rem; }

/* ---- Prozess-Editor ---- */
.prozess-werkzeuge { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.prozess-werkzeuge .trenner { width: 1px; height: 24px; background: var(--rand); margin: 0 4px; }
.leinwand-huelle { position: relative; background: var(--flaeche); border: 1px solid var(--rand); border-radius: 14px; overflow: auto; height: calc(100vh - 250px); min-height: 420px; }
.leinwand-huelle.verbinden { cursor: crosshair; }
svg.leinwand { display: block; }
svg.leinwand .knoten { cursor: grab; }
svg.leinwand .knoten.zieht { cursor: grabbing; }
svg.leinwand .knoten rect, svg.leinwand .knoten polygon, svg.leinwand .knoten circle { fill: var(--flaeche-2); stroke: var(--rand-hell); stroke-width: 1.5; }
svg.leinwand .knoten.start circle { fill: var(--limette); stroke: var(--limette); }
svg.leinwand .knoten.ende circle { fill: var(--flaeche-3); stroke: var(--limette); stroke-width: 3; }
svg.leinwand .knoten.entscheidung polygon { fill: #1c1f14; stroke: var(--warnung); }
svg.leinwand .knoten.gewaehlt rect, svg.leinwand .knoten.gewaehlt polygon, svg.leinwand .knoten.gewaehlt circle { stroke: var(--limette); stroke-width: 2.5; }
svg.leinwand .knoten.fertig rect { stroke: var(--limette); fill: #182010; }
svg.leinwand .knoten.teil rect { stroke: var(--warnung); }
svg.leinwand .knoten text { fill: var(--text); font-family: var(--schrift); font-size: 12.5px; pointer-events: none; }
svg.leinwand .knoten text.klein { fill: var(--leise); font-family: var(--mono); font-size: 10px; }
svg.leinwand .knoten text.dunkel { fill: #0A0B09; font-weight: 700; }
svg.leinwand .kante path { stroke: var(--sehr-leise); stroke-width: 1.6; fill: none; }
svg.leinwand .kante .treffer { stroke: transparent; stroke-width: 14; cursor: pointer; }
svg.leinwand .kante.gewaehlt path.linie { stroke: var(--limette); stroke-width: 2.4; }
svg.leinwand .kante text { fill: var(--limette); font-family: var(--mono); font-size: 11px; paint-order: stroke; stroke: var(--flaeche); stroke-width: 4px; }
svg.leinwand .gitter { fill: var(--rand); }
svg.leinwand .vorschau { stroke: var(--limette); stroke-dasharray: 5 4; stroke-width: 1.6; fill: none; }
.prozess-layout { display: grid; grid-template-columns: 1fr 320px; gap: 14px; }
.prozess-detail { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 14px; padding: 16px; height: calc(100vh - 250px); min-height: 420px; overflow-y: auto; }

/* ---- Allgemein ---- */
.leer { text-align: center; padding: 50px 20px; color: var(--leise); border: 1px dashed var(--rand-hell); border-radius: 14px; }
.codes { columns: 2; font-family: var(--mono); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--flaeche-3); border: 1px solid var(--rand-hell); border-radius: 99px; padding: 10px 18px; z-index: 60; font-size: 0.9rem; animation: ein .2s; }
.toast.fehler { border-color: var(--fehler); color: var(--text); }
.filter { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filter input, .filter select { width: auto; margin: 0; min-width: 160px; }
.gruppe-titel { display: flex; align-items: center; gap: 10px; margin: 26px 0 12px; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--leise); }
.gruppe-titel::after { content: ""; flex: 1; height: 1px; background: var(--rand); }
.dialog { position: fixed; inset: 0; display: grid; place-items: center; z-index: 50; background: rgba(0, 0, 0, 0.6); }
.dialog .karte { width: min(480px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }

@media (max-width: 860px) {
  .rahmen { grid-template-columns: 1fr; }
  .seite { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .seite .abschnitt { display: none; }
  .inhalt { padding: 16px; }
  .prozess-layout { grid-template-columns: 1fr; }
  .felder { grid-template-columns: 1fr; }
}
svg.leinwand .knoten:focus { outline: none; }
svg.leinwand .knoten:focus-visible rect, svg.leinwand .knoten:focus-visible polygon, svg.leinwand .knoten:focus-visible circle { stroke: var(--limette); }

/* ===== v2: Formance Group, Bereiche, Zusammenarbeit ===== */
.wortmarke { display: inline-flex; align-items: baseline; gap: 1px; font-size: 1.05rem; line-height: 1; letter-spacing: -0.01em; white-space: nowrap; }
.wortmarke b { font-weight: 800; color: var(--text); letter-spacing: 0.02em; }
.wortmarke i { font-style: italic; font-weight: 500; color: var(--akzent, var(--limette)); }
.wortmarke.gross { font-size: 2.1rem; }
.wortmarke-bild { height: 18px; width: auto; display: block; align-self: flex-start; object-fit: contain; }
.wortmarke-bild.gross { height: 34px; }

.seite .marke { display: block; padding: 4px 10px 18px; text-decoration: none; color: var(--text); }
.seite .marke .wortmarke { --akzent: var(--limette); }
.seite .marke small { display: block; font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.16em; color: var(--sehr-leise); text-transform: uppercase; margin-top: 6px; }
.seite .ikon-nav { width: 16px; text-align: center; color: var(--sehr-leise); font-size: .85rem; }
.seite .nav-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seite a.nav.bereich.offen { color: var(--text); }
.seite .zaehler { font-family: var(--mono); font-size: 0.68rem; background: var(--flaeche-3); color: var(--leise); border-radius: 99px; padding: 1px 7px; }
.seite .unterliste { margin: 2px 0 6px 14px; padding-left: 8px; border-left: 1px solid var(--rand); display: flex; flex-direction: column; gap: 1px; }
.seite a.nav.klein { font-size: 0.84rem; padding: 6px 10px; }
.seite .name { color: var(--text); text-decoration: none; }
.glocke { position: relative; font-size: .95rem; }
.glocke .badge { position: absolute; top: -3px; right: -4px; background: var(--limette); color: #0A0B09; font-size: .6rem; font-weight: 800; border-radius: 99px; padding: 1px 5px; font-family: var(--mono); }

.glocken-panel { position: fixed; left: 248px; bottom: 16px; width: min(420px, calc(100vw - 32px)); max-height: 70vh; overflow-y: auto; background: var(--flaeche); border: 1px solid var(--rand-hell); border-radius: 14px; z-index: 45; box-shadow: 0 20px 60px rgba(0,0,0,.6); animation: ein .15s; }
.glocken-panel header { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--rand); position: sticky; top: 0; background: var(--flaeche); }
.meldung-zeile { display: flex; gap: 10px; width: 100%; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--rand); border-radius: 0; color: var(--text); font-weight: 400; padding: 10px 14px; white-space: normal; margin: 0; }
.meldung-zeile:hover { background: var(--flaeche-2); }
.meldung-zeile.neu { background: var(--limette-glas); }
.meldung-zeile .art { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--flaeche-3); flex: none; font-size: .75rem; }
.meldung-zeile .text { display: flex; flex-direction: column; gap: 3px; font-size: .86rem; }
.meldung-zeile small { color: var(--sehr-leise); font-size: .72rem; }

.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; padding: 26px 28px; margin-bottom: 22px; border-radius: 20px; border: 1px solid var(--rand);
  background: radial-gradient(800px 300px at 100% 0%, var(--limette-glas), transparent 70%), var(--flaeche); }
.hero h1 { font-size: 2rem; margin: 4px 0 6px; }
.hero .ueber, .kopf .ueber { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--leise); }
.kopf .ueber a { color: var(--leise); text-decoration: none; }
.kopf .ueber a:hover { color: var(--text); }

.bereich-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 10px; }
.bereich-kachel { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 18px; border: 1px solid var(--rand); background: var(--flaeche); text-decoration: none; color: var(--text); position: relative; overflow: hidden; transition: transform .15s, border-color .15s; }
.bereich-kachel::after { content: ""; position: absolute; inset: auto -40% -60% auto; width: 240px; height: 240px; border-radius: 50%; background: var(--akzent); opacity: .07; filter: blur(10px); }
.bereich-kachel:hover { transform: translateY(-3px); border-color: var(--akzent); }
.bereich-kachel .kachel-kopf { display: flex; justify-content: space-between; align-items: center; }
.bereich-kachel .pfeil { color: var(--akzent); font-size: 1.1rem; }
.bereich-kachel p { margin: 0; color: var(--leise); font-size: .85rem; min-height: 2.4em; }
.kachel-zahlen { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; border-top: 1px solid var(--rand); padding-top: 12px; }
.kachel-zahlen strong { display: block; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.kachel-zahlen span { font-family: var(--mono); font-size: .62rem; text-transform: uppercase; letter-spacing: .06em; color: var(--sehr-leise); }
.kachel-zahlen .rot strong { color: var(--fehler); }

.zwei-spalten { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; }
.neuigkeiten { padding: 6px 14px; }
.neuigkeit { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--rand); font-size: .87rem; }
.neuigkeit:last-child { border-bottom: 0; }
.neuigkeit.neu > div > div:first-child { font-weight: 600; }
.mehr { display: inline-block; margin-top: 10px; font-size: .85rem; text-decoration: none; }
.projekt-link { color: var(--leise); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; }
.projekt-link .punkt, .chip .punkt { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }

.bereich-kopf .wortmarke.gross, .bereich-kopf .wortmarke-bild.gross { margin-top: 6px; }
.kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 4px 0 8px; }
.kennzahl { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 12px; padding: 12px 14px; }
.kennzahl span { display: block; font-family: var(--mono); font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; color: var(--sehr-leise); }
.kennzahl strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.raster.gedimmt { opacity: .6; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px; border: 1px solid var(--rand-hell); background: transparent; color: var(--leise); text-decoration: none; font-size: .82rem; font-weight: 500; cursor: pointer; }
.chip:hover { color: var(--text); background: transparent; border-color: var(--limette); }
.chip.an { color: #0A0B09; background: var(--limette); border-color: var(--limette); }

.kopf-rechts { min-width: 220px; display: flex; flex-direction: column; align-items: flex-end; }
.kopf-rechts .fortschritt { width: 100%; }
.mitglieder-reihe { display: flex; gap: 3px; margin-top: 10px; align-items: center; }
.anwesend { display: flex; gap: 4px; align-items: center; margin-top: 8px; font-size: .72rem; min-height: 24px; }
.anwesend .avatar { box-shadow: 0 0 0 2px var(--grund), 0 0 0 3.5px var(--limette); }

.label-chip { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 6px; font-size: .7rem; font-weight: 650;
  color: var(--lf); background: color-mix(in srgb, var(--lf) 14%, transparent); border: 1px solid color-mix(in srgb, var(--lf) 40%, transparent); }
.label-chip.klein { width: 18px; height: 6px; padding: 0; border-radius: 3px; background: var(--lf); vertical-align: middle; margin-left: 3px; }
.label-reihe { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 7px; }
.label-auswahl { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.label-chip.waehlbar { cursor: pointer; opacity: .45; margin: 0; }
.label-chip.waehlbar.an { opacity: 1; }
.label-chip.waehlbar:hover { opacity: 1; background: color-mix(in srgb, var(--lf) 22%, transparent); }
.erwaehnung { color: var(--limette); font-weight: 650; }

.spalte.fertig { background: color-mix(in srgb, var(--limette) 3%, var(--flaeche)); }
.spalte-neu { flex: none; align-self: flex-start; }
.aufgabenkarte.zieht { opacity: .35; border-style: dashed; border-color: var(--limette); }
.sortable-chosen { box-shadow: 0 10px 30px rgba(0,0,0,.5); }
tr.erledigt-zeile td { color: var(--leise); }

.kalender { display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid var(--rand); border-radius: 14px; overflow: hidden; background: var(--rand); gap: 1px; }
.kal-kopf { background: var(--flaeche); font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--sehr-leise); padding: 8px 10px; }
.kal-tag { background: var(--flaeche); min-height: 104px; padding: 6px 6px 8px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kal-tag.fremd { background: var(--grund); }
.kal-tag.fremd .kal-zahl { color: var(--sehr-leise); }
.kal-tag.heute .kal-zahl { background: var(--limette); color: #0A0B09; border-radius: 99px; padding: 0 7px; align-self: flex-start; }
.kal-zahl { font-family: var(--mono); font-size: .75rem; color: var(--leise); margin-bottom: 2px; }
.kal-aufgabe { display: block; width: 100%; text-align: left; padding: 3px 6px; margin: 0; border-radius: 6px; font-size: .72rem; font-weight: 500; background: var(--flaeche-3); color: var(--text); border: 0; border-left: 2px solid var(--limette); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kal-aufgabe:hover { background: var(--rand-hell); }
.kal-aufgabe.erledigt { opacity: .5; text-decoration: line-through; }
.kal-aufgabe.rot { border-left-color: var(--fehler); }
.zoom-wert { min-width: 58px; justify-content: center; font-family: var(--mono); }

@media (max-width: 1100px) { .zwei-spalten { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .glocken-panel { left: 16px; }
  .hero { flex-direction: column; align-items: flex-start; }
  .kachel-zahlen { grid-template-columns: repeat(2, 1fr); }
  .kal-tag { min-height: 70px; }
}
.karte-schwebt { opacity: .95 !important; transform: rotate(2deg); box-shadow: 0 16px 40px rgba(0,0,0,.6); }

/* ======================= v3: Lobby, Marken, To-do, Kunden ======================= */
.zeichen { display: block; width: auto; flex: none; }
.wortmarke-bild { height: 17px; }
.wortmarke-bild.gross { height: 40px; }
.group-marke { display: inline-flex; align-items: baseline; gap: 7px; }
.group-zusatz { font-family: var(--mono); font-size: .62rem; letter-spacing: .32em; color: var(--leise); font-weight: 600; }
.group-marke.gross .group-zusatz { font-size: 1rem; }
.anmelde-marke { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.anmelde-marke .zeichen { height: 28px; }
.anmelde-marke .logo { height: 22px; margin: 0; }

/* Seitenleiste */
.seite .marke { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 10px; row-gap: 6px; padding: 6px 10px 18px; }
.seite .marke > small { grid-column: 1 / -1; margin: 0; }
.seite.in-marke .marke { grid-template-columns: 1fr; }
.seite.in-marke .marke:has(.zeichen) { grid-template-columns: auto 1fr; }
.seite .zur-lobby { font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--sehr-leise); text-decoration: none; padding: 2px 10px 12px; }
.seite .zur-lobby:hover { color: var(--text); }
.seite a.nav.marke-link .zeichen { height: 15px; width: 18px; object-fit: contain; }
.seite a.nav.demnaechst { opacity: .62; }
.seite .bald { font-family: var(--mono); font-size: .58rem; text-transform: uppercase; letter-spacing: .08em; color: var(--sehr-leise); border: 1px solid var(--rand-hell); border-radius: 99px; padding: 0 6px; }
.seite.in-marke { background: linear-gradient(180deg, rgba(var(--akzent-rgb), 0.05), transparent 260px), var(--flaeche); }

/* Lobby */
.hero-marke { display: flex; align-items: center; gap: 14px; opacity: .9; }
.bereich-kachel .zeichen { height: 30px; }
.bereich-kachel .wortmarke-bild { height: 19px; align-self: flex-start; }
.bereich-kachel.aufbau { border-style: dashed; }
.kachel-aufbau { font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--akzent); border-top: 1px solid var(--rand); padding-top: 12px; }
.gruppe-titel { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.gruppe-titel .mehr { font-family: var(--schrift); text-transform: none; letter-spacing: 0; font-size: .8rem; color: var(--leise); text-decoration: none; }
.gruppe-titel .mehr:hover { color: var(--limette); }
.holding-liste { padding: 4px; display: flex; flex-direction: column; }
.holding-zeile { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px; color: var(--text); text-decoration: none; }
.holding-zeile:hover { background: var(--flaeche-2); }
.holding-zeile .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fortschritt.klein { width: 80px; height: 4px; margin: 0; flex: none; }
.fortschritt span { background: var(--limette); }

/* Marke: Cockpit */
.marken-kopf { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; padding: 26px 28px; margin-bottom: 18px; border-radius: 20px; border: 1px solid var(--rand);
  background: radial-gradient(700px 260px at 100% 0%, rgba(var(--akzent-rgb), 0.12), transparent 70%), var(--flaeche); }
.marken-kopf p { margin: 12px 0 0; max-width: 60ch; }
a.kennzahl { text-decoration: none; color: inherit; transition: border-color .15s; }
a.kennzahl:hover { border-color: var(--akzent-rand); }
.aufbau-hinweis { border: 1px dashed var(--akzent-rand); background: var(--limette-glas); border-radius: 16px; padding: 18px 22px; margin-bottom: 18px; }
.aufbau-hinweis p { margin: 6px 0 0; color: var(--leise); }
.mini-strecke { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; text-decoration: none; color: inherit; margin-bottom: 14px; }
.mini-phase { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 2px; position: relative; }
.mini-phase::before { content: ""; position: absolute; left: 10px; right: 10px; top: 0; height: 2px; border-radius: 2px; background: var(--phase, var(--rand-hell)); }
.mini-phase strong { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.mini-phase span { font-family: var(--mono); font-size: .6rem; text-transform: uppercase; letter-spacing: .06em; color: var(--sehr-leise); }
.phase-lead { --phase: #8A8A90; } .phase-intake { --phase: #9CC9F5; } .phase-onboarding { --phase: var(--limette); }
.phase-aktiv { --phase: #8FD694; } .phase-pausiert { --phase: #F5B83D; } .phase-beendet { --phase: #55555A; }
.etikett[class*="phase-"] { border-color: var(--phase); color: var(--text); }

/* To-do */
.todo { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 26px; align-items: start; }
.todo-listen { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 2px; }
.todo-liste { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--leise); text-decoration: none; font-size: .9rem; }
.todo-liste:hover { background: var(--flaeche-2); color: var(--text); }
.todo-liste[aria-current="page"] { background: var(--flaeche-3); color: var(--text); }
.todo-liste .ikon { width: 18px; text-align: center; color: var(--limette); }
.todo-liste .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-liste .zahl { font-family: var(--mono); font-size: .72rem; color: var(--sehr-leise); }
.todo-liste .punkt { width: 8px; height: 8px; border-radius: 50%; margin: 0 5px; flex: none; }
.todo-abschnitt { font-family: var(--mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--sehr-leise); padding: 16px 10px 6px; }
.todo-kopf { margin-bottom: 14px; }
.todo-kopf h1 { font-size: 1.9rem; display: flex; align-items: center; gap: 12px; margin-bottom: 2px; }
.todo-kopf-ikon { color: var(--limette); }
.todo-eingabe { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 14px; padding: 6px; margin-bottom: 18px; transition: border-color .15s; }
.todo-eingabe:focus-within { border-color: var(--akzent-rand); box-shadow: 0 0 0 3px var(--limette-glas); }
.todo-eingabe > input { border: 0; background: transparent; font-size: 1rem; padding: 10px 12px; margin: 0; box-shadow: none !important; }
.todo-eingabe-extras { display: none; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 8px 4px; border-top: 1px solid var(--rand); }
.todo-eingabe:focus-within .todo-eingabe-extras, .todo-eingabe:has(input[type=text]:not(:placeholder-shown)) .todo-eingabe-extras { display: flex; }
.todo-eingabe-extras input, .todo-eingabe-extras select { width: auto; margin: 0; padding: 5px 8px; font-size: .82rem; }
.todo-eingabe-extras button[type=submit] { margin-left: auto; }
.schnelldatum { display: flex; gap: 4px; }
.todo-gruppe { font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--leise); margin: 16px 2px 6px; }
.todo-gruppe.rot { color: var(--fehler); }
.todo-liste-inhalt, .kurzliste { display: flex; flex-direction: column; gap: 4px; }
.todo-zeile { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 11px; background: var(--flaeche); border: 1px solid var(--rand); cursor: pointer; transition: background .12s, opacity .25s, transform .25s; }
.todo-zeile:hover { background: var(--flaeche-2); border-color: var(--rand-hell); }
.todo-zeile.kompakt { padding: 8px 10px; }
.todo-zeile.geht { opacity: 0; transform: translateX(12px); }
.todo-zeile.erledigt .todo-titel { text-decoration: line-through; color: var(--sehr-leise); }
.todo-haken { width: 20px; height: 20px; padding: 0; border-radius: 50%; border: 1.5px solid var(--rand-hell); background: transparent; color: transparent; display: grid; place-items: center; font-size: .7rem; flex: none; }
.todo-haken:hover { border-color: var(--limette); color: var(--limette); background: transparent; filter: none; }
.todo-haken.an { background: var(--limette); border-color: var(--limette); color: #0C0C0D; }
.todo-text { flex: 1; min-width: 0; }
.todo-titel { font-size: .95rem; }
.todo-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .76rem; color: var(--sehr-leise); margin-top: 2px; align-items: center; }
.todo-meta:empty { display: none; }
.todo-projekt { display: inline-flex; align-items: center; gap: 6px; }
.todo-projekt .punkt { width: 7px; height: 7px; border-radius: 50%; }
.todo-stern { background: transparent; border: 0; color: var(--sehr-leise); font-size: 1.05rem; padding: 2px 4px; }
.todo-stern:hover { color: var(--limette); background: transparent; filter: none; }
.todo-stern.an { color: var(--limette); }
.todo-erledigt { margin-top: 22px; }
.todo-erledigt summary { cursor: pointer; font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--leise); margin-bottom: 8px; }
.todo-erledigt .todo-zeile { margin-bottom: 4px; }

/* Kunden */
.umschalter { display: inline-flex; border: 1px solid var(--rand-hell); border-radius: 99px; padding: 2px; }
.umschalter a { padding: 5px 12px; border-radius: 99px; color: var(--leise); text-decoration: none; font-size: .85rem; }
.umschalter a[aria-current="page"] { background: var(--flaeche-3); color: var(--text); }
.strecke { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; }
.strecke-spalte { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; min-height: 260px; border-top: 3px solid var(--phase); }
.strecke-spalte header { display: flex; justify-content: space-between; align-items: baseline; }
.strecke-spalte h3 { margin: 0; font-size: .95rem; }
.strecke-spalte .zahl { font-family: var(--mono); font-size: .75rem; color: var(--sehr-leise); }
.strecke-text { margin: 0; font-size: .74rem; color: var(--sehr-leise); }
.strecke-karten { display: flex; flex-direction: column; gap: 6px; min-height: 40px; flex: 1; }
.kunde-karte { background: var(--flaeche-2); border: 1px solid var(--rand); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; cursor: grab; font-size: .88rem; }
.kunde-karte:hover { border-color: var(--rand-hell); }
.kunde-karte .leise { font-size: .78rem; }
.kunde-meta { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.kunde-meta:empty { display: none; }
.strecke-neu { align-self: flex-start; }
.phasen-leiste { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 16px; }
.phase-knopf { background: transparent; color: var(--leise); border: 1px solid var(--rand-hell); font-weight: 550; padding: 5px 10px; font-size: .8rem; }
.phase-knopf.an { background: var(--limette); color: #0C0C0D; border-color: var(--limette); }
.zwei-felder { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.panel-kopf { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }

/* Prozesse */
.prozess-liste { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.prozess-zeile { display: grid; grid-template-columns: minmax(0, 2fr) auto minmax(80px, 1fr) auto; gap: 16px; align-items: center; padding: 14px 16px; border-radius: 12px;
  background: var(--flaeche); border: 1px solid var(--rand); color: var(--text); text-decoration: none; }
.prozess-zeile:hover { border-color: var(--akzent-rand); }
.prozess-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.prozess-name .leise { font-size: .8rem; }
.prozess-zeile .fortschritt { margin: 0; }

/* Demnaechst */
.demnaechst-seite { max-width: 560px; margin: 8vh auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.demnaechst-ikon { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font-size: 1.8rem; color: var(--limette); background: var(--limette-glas); border: 1px solid var(--akzent-rand); }
.demnaechst-seite .ueber { font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--leise); }
.demnaechst-seite h1 { margin: 0; }
.demnaechst-seite p { margin: 0; }

@media (max-width: 900px) {
  .todo { grid-template-columns: 1fr; }
  .todo-listen { position: static; flex-direction: row; flex-wrap: wrap; }
  .todo-abschnitt { width: 100%; }
  .mini-strecke { grid-template-columns: repeat(3, 1fr); }
  .prozess-zeile { grid-template-columns: 1fr; }
  .zwei-felder { grid-template-columns: 1fr; }
}

/* ---- Kundenportal im Kundenpanel (kundenportal.js) ---- */
.kundenportal .portal-liste { list-style: none; padding: 0; margin: 8px 0 12px; display: grid; gap: 8px; }
.kundenportal .portal-zugang { padding: 10px 12px; border: 1px solid var(--rand); border-radius: 10px; background: var(--flaeche-2); display: grid; gap: 4px; }
.kundenportal .portal-knoepfe { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.kundenportal .hinweis input { font-family: var(--mono); font-size: .8rem; }
