/* GfMPO Einsatzzentrale: ruhiges Konzern-Layout, Navigation links, Inhalt in Karten */
:root {
  --bg: #f4f6f8; --flaeche: #ffffff; --flaeche2: #f8fafb; --linie: #e2e7ec; --linie2: #d3dae1;
  --text: #17212b; --text2: #44515e; --leise: #6b7885;
  --marke: #0f2129; --marke2: #17323d; --marke-text: #dbe6ea; --marke-leise: #8ea3ab;
  --akzent: #1f5f99; --akzent-hell: #e8f0f8; --akzent-text: #ffffff;
  --gut: #2e7d4a; --gut-hell: #e7f3eb; --warn: #9a6a05; --warn-hell: #fbf2dc; --rot: #b3261e; --rot-hell: #fbe9e7;
  --schatten: 0 1px 2px rgba(16, 24, 32, .05), 0 1px 3px rgba(16, 24, 32, .06);
  --schatten-gross: 0 12px 40px rgba(16, 24, 32, .18);
  --radius: 8px; --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; --mono: 'IBM Plex Mono', ui-monospace, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1418; --flaeche: #151d22; --flaeche2: #1a242a; --linie: #26323a; --linie2: #33414a;
    --text: #e4eaee; --text2: #b6c2ca; --leise: #8695a0;
    --marke: #0a1519; --marke2: #142730;
    --akzent: #6aa8e0; --akzent-hell: #1a2d3d; --akzent-text: #0b1620;
    --gut: #6cc58d; --gut-hell: #173025; --warn: #e2b14b; --warn-hell: #33290f; --rot: #ef7f76; --rot-hell: #3a1c1a;
    --schatten: 0 1px 2px rgba(0, 0, 0, .3); --schatten-gross: 0 12px 40px rgba(0, 0, 0, .5);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 400 14.5px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--akzent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
#app { min-height: 100%; }
.laden { padding: 48px; color: var(--leise); text-align: center; }
.mono { font-family: var(--mono); font-size: .92em; }
.leise { color: var(--leise); }
.versteckt { display: none !important; }

/* ── Anmeldung / Einladung ── */
.tor { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 44%) 1fr; }
.tor-marke { background: var(--marke); color: var(--marke-text); padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.tor-marke::after { content: ''; position: absolute; inset: auto -120px -160px auto; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(31, 95, 153, .35), transparent 65%); pointer-events: none; }
.tor-marke .logo { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 18px; letter-spacing: .02em; color: #fff; }
.tor-marke .logo img { width: 34px; height: 34px; }
.tor-marke h1 { font-size: 34px; line-height: 1.15; font-weight: 600; margin: 0 0 14px; color: #fff; max-width: 14ch; }
.tor-marke p { color: var(--marke-leise); max-width: 40ch; margin: 0; }
.tor-marke .fuss { font-size: 12.5px; color: var(--marke-leise); }
.balken { display: flex; gap: 4px; margin-bottom: 26px; }
.balken i { height: 4px; width: 34px; border-radius: 2px; }
.tor-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.tor-karte { width: 100%; max-width: 400px; }
.tor-karte h2 { font-size: 22px; font-weight: 600; margin: 0 0 6px; }
.tor-karte > p { color: var(--text2); margin: 0 0 24px; }
.feld { display: block; margin-bottom: 16px; }
.feld > span { display: block; font-weight: 500; font-size: 13px; margin-bottom: 6px; color: var(--text2); }
.feld input:not([type=checkbox]), .feld select, .feld textarea, .eingabe {
  width: 100%; padding: 10px 12px; border: 1px solid var(--linie2); border-radius: 6px; background: var(--flaeche); outline: none; transition: border-color .15s, box-shadow .15s; }
.feld input:not([type=checkbox]):focus, .feld select:focus, .feld textarea:focus, .eingabe:focus { border-color: var(--akzent); box-shadow: 0 0 0 3px var(--akzent-hell); }
.feld textarea { min-height: 110px; resize: vertical; }
.feld small { display: block; color: var(--leise); margin-top: 5px; font-size: 12.5px; }
.code-eingabe { font-family: var(--mono); font-size: 22px !important; letter-spacing: .35em; text-align: center; }
.haken { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 18px; color: var(--text2); font-size: 13.5px; cursor: pointer; }
.haken input { margin-top: 3px; }
.meldung { padding: 10px 12px; border-radius: 6px; margin-bottom: 16px; font-size: 13.5px; }
.meldung.fehler { background: var(--rot-hell); color: var(--rot); }
.meldung.ok { background: var(--gut-hell); color: var(--gut); }
.meldung.info { background: var(--akzent-hell); color: var(--text); }
.schritte { display: flex; gap: 8px; margin-bottom: 22px; }
.schritte span { flex: 1; height: 3px; border-radius: 2px; background: var(--linie); }
.schritte span.an { background: var(--akzent); }
.qr { display: flex; gap: 18px; align-items: center; padding: 14px; border: 1px solid var(--linie); border-radius: var(--radius); background: var(--flaeche2); margin-bottom: 16px; }
.qr .bild { width: 150px; height: 150px; flex: none; background: #fff; border-radius: 6px; padding: 6px; }
.qr .bild svg { width: 100%; height: 100%; display: block; }
.qr small { color: var(--leise); }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; padding: 14px 18px; border: 1px dashed var(--linie2); border-radius: var(--radius); font-family: var(--mono); margin-bottom: 16px; background: var(--flaeche2); }

/* ── Knöpfe ── */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 6px; border: 1px solid transparent;
  font-weight: 500; cursor: pointer; background: var(--akzent); color: var(--akzent-text); white-space: nowrap; transition: filter .15s, background .15s; }
.knopf:hover { filter: brightness(1.08); text-decoration: none; }
.knopf:disabled { opacity: .55; cursor: default; filter: none; }
.knopf.breit { width: 100%; padding: 11px 16px; }
.knopf.zweit { background: var(--flaeche); color: var(--text); border-color: var(--linie2); }
.knopf.zweit:hover { background: var(--flaeche2); filter: none; }
.knopf.still { background: transparent; color: var(--text2); border-color: transparent; padding: 7px 10px; }
.knopf.still:hover { background: var(--flaeche2); filter: none; }
.knopf.gefahr { background: var(--flaeche); color: var(--rot); border-color: var(--linie2); }
.knopf.klein { padding: 5px 10px; font-size: 13px; }
.knopf svg { width: 16px; height: 16px; }

/* ── Rahmen der App ── */
.rahmen { display: grid; grid-template-columns: 248px 1fr; min-height: 100%; }
.seite { background: var(--marke); color: var(--marke-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.seite .logo { display: flex; align-items: center; gap: 11px; padding: 20px 20px 18px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.seite .logo img { width: 30px; height: 30px; }
.seite .logo b { display: block; color: #fff; font-weight: 600; font-size: 15px; letter-spacing: .02em; }
.seite .logo small { display: block; color: var(--marke-leise); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; }
.nav { padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
.nav h4 { margin: 16px 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--marke-leise); }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; color: var(--marke-text); font-size: 14px; text-decoration: none; }
.nav a:hover { background: rgba(255, 255, 255, .06); }
.nav a.aktiv { background: var(--marke2); color: #fff; box-shadow: inset 3px 0 0 #5fa0d8; }
.nav a svg { width: 18px; height: 18px; opacity: .85; flex: none; }
.nav a .punkt { width: 9px; height: 9px; border-radius: 2px; flex: none; margin: 0 4px; }
.nav .picon.klein { margin: 0 -2px; }
.nav a .zahl { margin-left: auto; font-size: 11.5px; background: rgba(255, 255, 255, .1); border-radius: 10px; padding: 0 7px; color: var(--marke-text); }
.nav a .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seite .unten { margin-top: auto; padding: 14px 20px; font-size: 11.5px; color: var(--marke-leise); border-top: 1px solid rgba(255, 255, 255, .07); }

.haupt { min-width: 0; display: flex; flex-direction: column; }
.kopf { height: 60px; background: var(--flaeche); border-bottom: 1px solid var(--linie); display: flex; align-items: center; gap: 14px; padding: 0 28px; position: sticky; top: 0; z-index: 20; }
.kopf .pfad { color: var(--leise); font-size: 13px; display: flex; gap: 8px; align-items: center; min-width: 0; }
.kopf .pfad svg { width: 14px; height: 14px; flex: none; opacity: .6; }
.kopf .pfad b { color: var(--text); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kopf .rechts { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.menue-knopf { display: none; background: none; border: 0; padding: 6px; cursor: pointer; color: var(--text); }
.menue-knopf svg { width: 22px; height: 22px; }
.person-knopf { display: flex; align-items: center; gap: 10px; background: none; border: 1px solid transparent; border-radius: 22px; padding: 3px 10px 3px 3px; cursor: pointer; }
.person-knopf:hover { background: var(--flaeche2); border-color: var(--linie); }
.person-knopf .wer { text-align: left; line-height: 1.2; }
.person-knopf .wer b { display: block; font-weight: 500; font-size: 13.5px; }
.person-knopf .wer small { color: var(--leise); font-size: 12px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--akzent-hell); color: var(--akzent); display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; flex: none; letter-spacing: .02em; }
.avatar.klein { width: 24px; height: 24px; font-size: 10.5px; }
.avatar.leer { background: var(--flaeche2); color: var(--leise); border: 1px dashed var(--linie2); }
.ausklapp { position: absolute; right: 20px; top: 54px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: var(--schatten-gross); min-width: 220px; padding: 6px; z-index: 40; }
.ausklapp a, .ausklapp button { display: block; width: 100%; text-align: left; padding: 8px 12px; border-radius: 5px; background: none; border: 0; cursor: pointer; color: var(--text); font-size: 14px; }
.ausklapp a:hover, .ausklapp button:hover { background: var(--flaeche2); text-decoration: none; }
.ausklapp hr { border: 0; border-top: 1px solid var(--linie); margin: 6px 0; }

.inhalt { padding: 28px; max-width: 1280px; width: 100%; }
.titelzeile { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.titelzeile h1 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
.titelzeile p { margin: 4px 0 0; color: var(--text2); }
.titelzeile .aktionen { margin-left: auto; display: flex; gap: 8px; }
.projektmarke { flex: none; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 10px; vertical-align: 1px; }

/* ── Karten / Kennzahlen ── */
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: var(--schatten); }
.karte > header { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--linie); }
.karte > header h2 { margin: 0; font-size: 15px; font-weight: 600; }
.karte > header .rechts { margin-left: auto; }
.karte .leerstand { padding: 28px 18px; color: var(--leise); text-align: center; }
.kennzahlen { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.kennzahl { padding: 16px 18px; }
.kennzahl small { color: var(--leise); font-size: 12.5px; display: block; }
.kennzahl b { display: block; font-size: 28px; font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; }
.zweispaltig { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }
.stapel { display: grid; gap: 20px; }
.projektraster { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.projektkachel { padding: 16px 18px; display: block; color: inherit; border-top: 3px solid var(--farbe, var(--akzent)); transition: box-shadow .15s, transform .15s; }
.projektkachel:hover { text-decoration: none; box-shadow: var(--schatten-gross); }
.projektkachel h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.projektkachel p { margin: 0 0 12px; color: var(--leise); font-size: 13px; min-height: 2.6em; }
.projektkachel .zahlen { display: flex; gap: 16px; font-size: 13px; color: var(--text2); }
.projektkachel .zahlen b { font-weight: 600; color: var(--text); }

/* ── Aufgabenliste ── */
.reiter { display: flex; gap: 2px; border-bottom: 1px solid var(--linie); margin-bottom: 18px; overflow-x: auto; }
.reiter button { background: none; border: 0; padding: 10px 14px; cursor: pointer; color: var(--text2); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.reiter button.an { color: var(--akzent); border-bottom-color: var(--akzent); }
.reiter button .zahl { color: var(--leise); font-weight: 400; margin-left: 4px; }
.filter { display: flex; gap: 8px; padding: 12px 18px; border-bottom: 1px solid var(--linie); flex-wrap: wrap; align-items: center; }
.filter .eingabe { width: auto; padding: 7px 10px; }
.filter .suche { flex: 1; min-width: 180px; }
.tabelle { width: 100%; border-collapse: collapse; }
.tabelle th { text-align: left; font-weight: 500; font-size: 12px; color: var(--leise); text-transform: uppercase; letter-spacing: .05em; padding: 10px 14px; border-bottom: 1px solid var(--linie); background: var(--flaeche2); white-space: nowrap; }
.tabelle td { padding: 11px 14px; border-bottom: 1px solid var(--linie); vertical-align: middle; }
.tabelle tr:last-child td { border-bottom: 0; }
.tabelle tbody tr { cursor: pointer; }
.tabelle tbody tr:hover td { background: var(--flaeche2); }
.tabelle .titel { font-weight: 500; }
.tabelle .titel small { display: block; color: var(--leise); font-weight: 400; font-size: 12.5px; }
.tabelle tr.erledigt .titel { color: var(--leise); text-decoration: line-through; }
.tabelle .eng { width: 1%; white-space: nowrap; }
.pille { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 11px; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.pille::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pille.offen { background: var(--flaeche2); color: var(--text2); border: 1px solid var(--linie); }
.pille.arbeit { background: var(--akzent-hell); color: var(--akzent); }
.pille.erledigt { background: var(--gut-hell); color: var(--gut); }
.prio { font-size: 12.5px; color: var(--leise); white-space: nowrap; }
.prio.hoch { color: var(--rot); font-weight: 600; }
.datum.ueber { color: var(--rot); font-weight: 500; }
.datum.bald { color: var(--warn); font-weight: 500; }
.zeile-person { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.liste { list-style: none; margin: 0; padding: 0; }
.liste li { display: flex; gap: 12px; align-items: center; padding: 11px 18px; border-bottom: 1px solid var(--linie); }
.liste li:last-child { border-bottom: 0; }
.liste li a.titel { color: var(--text); font-weight: 500; }
.liste li .meta { color: var(--leise); font-size: 12.5px; }
.liste li .rechts { margin-left: auto; display: flex; gap: 10px; align-items: center; }

/* ── Links ── */
.linkgruppe + .linkgruppe { border-top: 1px solid var(--linie); }
.linkgruppe h3 { margin: 0; padding: 12px 18px 4px; font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--leise); font-weight: 600; }
.linkzeile { display: flex; align-items: center; gap: 12px; padding: 9px 18px; }
.linkzeile:hover { background: var(--flaeche2); }
.linkzeile .icon { width: 30px; height: 30px; border-radius: 6px; background: var(--akzent-hell); color: var(--akzent); display: flex; align-items: center; justify-content: center; flex: none; }
.linkzeile .icon svg { width: 16px; height: 16px; }
.linkzeile .was { min-width: 0; flex: 1; }
.linkzeile .was a { font-weight: 500; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.linkzeile .was small { color: var(--leise); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; }
.linkzeile .platz { width: 34px; flex: none; }
.marke-admin { font-size: 11px; padding: 1px 7px; border-radius: 10px; background: var(--warn-hell); color: var(--warn); white-space: nowrap; }

/* ── Seitenpanel (Aufgabe, Formulare) ── */
.schleier { position: fixed; inset: 0; background: rgba(10, 20, 26, .38); z-index: 50; animation: ein .15s; }
.panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--flaeche); z-index: 51; display: flex; flex-direction: column; box-shadow: var(--schatten-gross); animation: rein .2s ease-out; }
.panel > header { padding: 18px 22px; border-bottom: 1px solid var(--linie); display: flex; gap: 12px; align-items: flex-start; }
.panel > header h2 { margin: 0; font-size: 17px; font-weight: 600; flex: 1; }
.panel > header small { display: block; color: var(--leise); font-weight: 400; font-size: 12.5px; margin-top: 2px; }
.panel .koerper { padding: 20px 22px; overflow-y: auto; flex: 1; }
.panel > footer { padding: 14px 22px; border-top: 1px solid var(--linie); display: flex; gap: 8px; justify-content: flex-end; background: var(--flaeche2); }
.panel > footer .links { margin-right: auto; }
.raster2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.kommentar { display: flex; gap: 10px; margin-bottom: 14px; }
.kommentar .blase { background: var(--flaeche2); border: 1px solid var(--linie); border-radius: 8px; padding: 8px 12px; flex: 1; white-space: pre-wrap; }
.kommentar .blase small { display: block; color: var(--leise); font-size: 12px; margin-bottom: 2px; white-space: normal; }
.abschnitt-titel { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--leise); font-weight: 600; margin: 22px 0 10px; }
.text-block { white-space: pre-wrap; color: var(--text2); }
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.chip { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; border: 1px solid var(--linie2); border-radius: 10px;
  padding: 14px 10px 12px; cursor: pointer; font-size: 13px; line-height: 1.3; background: var(--flaeche); user-select: none; transition: border-color .15s, background .15s; }
.chip:hover { border-color: var(--akzent); }
.chip input { position: absolute; top: 9px; right: 9px; margin: 0; accent-color: var(--akzent); }
.chip.an { border-color: var(--akzent); background: var(--akzent-hell); box-shadow: inset 0 0 0 1px var(--akzent); }
.picon { width: 40px; height: 40px; border-radius: 10px; flex: none; object-fit: cover; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 600; font-size: 14px; letter-spacing: .02em; background: var(--farbe, #5b6b75); box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.picon.klein { width: 22px; height: 22px; border-radius: 6px; font-size: 9.5px; }
.picon.gross { width: 48px; height: 48px; border-radius: 12px; font-size: 16px; }
.projektkachel .kopfzeile { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.projektkachel .kopfzeile h3 { margin: 0; }
.projektkachel.gesperrt { opacity: .45; filter: grayscale(1); cursor: default; box-shadow: none; }
.projektkachel.gesperrt:hover { box-shadow: none; }
.nav .gesperrt .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav .gesperrt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; opacity: .38; filter: grayscale(1); font-size: 14px; cursor: default; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--marke); color: #fff; padding: 10px 18px; border-radius: 6px; z-index: 60; box-shadow: var(--schatten-gross); font-size: 14px; animation: ein .2s; }
.kopierfeld { display: flex; gap: 8px; }
.kopierfeld input { font-family: var(--mono); font-size: 12.5px; }
@keyframes ein { from { opacity: 0 } }
@keyframes rein { from { transform: translateX(30px); opacity: 0 } }

/* ── Mobil ── */
@media (max-width: 1100px) { .kennzahlen { grid-template-columns: repeat(2, 1fr); } .zweispaltig { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .tor { grid-template-columns: 1fr; }
  .tor-marke { padding: 28px 24px; min-height: 0; }
  .tor-marke h1 { font-size: 24px; margin-bottom: 6px; }
  .tor-marke .fuss, .tor-marke p { display: none; }
  .tor-marke .balken { margin-bottom: 14px; }
  .rahmen { grid-template-columns: 1fr; }
  .seite { position: fixed; left: 0; top: 0; bottom: 0; width: 272px; z-index: 45; transform: translateX(-100%); transition: transform .2s; }
  .rahmen.nav-offen .seite { transform: none; box-shadow: var(--schatten-gross); }
  .menue-knopf { display: block; }
  .kopf { padding: 0 16px; }
  .inhalt { padding: 20px 16px; }
  .person-knopf .wer { display: none; }
  .tabelle .weg-mobil { display: none; }
  .raster2 { grid-template-columns: 1fr; }
  .kennzahl b { font-size: 24px; }
}
