/* MS Backend Core Azure
   Grunddesign nach dem Vorbild der Projektmeeting-Ansicht:
   ruhige Flaechen, rote Akzentkante, Versalien-Kleinlabels, viel Luft.
   Akzent #FF0035, Hausschrift Arial. */

/* Bruecke: die alten Merkmalsnamen zeigen auf die Merkmale der Huelle
   (shell.css). So bleiben die Bausteine unveraendert und bekommen
   trotzdem Farben, Rundungen und Dunkelmodus aus einer Hand. */
:root {
  --cc-rot: #FF0035;
  --cc-rot-dunkel: var(--accent-ink);
  --cc-rot-hauch: var(--accent-soft);
  --cc-grau-text: var(--ink-soft);

  --panel: var(--bg);
  --muted: var(--ink-soft);
  --line-zart: var(--line);
  --kopf-bg: var(--bg-soft);
  --zeile-hover: var(--grau-hover);
  --warn: #B25E00;
  --warn-bg: #FFF3E0;
  --gruen: #1B7A3D;
  --gruen-bg: #E8F5EC;
  --ok-bg: #EEF4EE;
  --skala: 1;
  --schatten-hoch: 0 2px 10px rgba(0,0,0,.09);
  --kante: 6px;
}
:root[data-theme="dark"], :root:not([data-theme="light"]) {
  --warn-bg: #3a2a10;
  --gruen-bg: #123021;
  --ok-bg: #14241a;
}


@media (prefers-color-scheme: dark) {
  :root {
    --cc-rot: #FF3355;
    --cc-rot-dunkel: #FF0035;
    --cc-rot-hauch: #2A1419;
    --bg: #0E1012;
    --panel: #16191C;
    --ink: #EDEFF1;
    --muted: #9BA3AB;
    --line: #2E3338;
    --line-zart: #23272B;
    --kopf-bg: #1B1F23;
    --zeile-hover: #1F1619;
    --warn: #E9A23B;
    --warn-bg: #2A2013;
    --gruen: #4FBF77;
    --gruen-bg: #14251A;
    --ok-bg: #16201A;
    --schatten: none;
    --schatten-hoch: 0 2px 10px rgba(0,0,0,.5);
  }
}




/* Kleinlabel, das Kernelement der Meeting-Ansicht */
h2, .label {
  font-size: 12px; margin: 0; font-weight: bold;
  text-transform: uppercase; letter-spacing: .9px;
}

/* ------------------------------------------------------------ Kopfzeile */



h1 {
  font-size: 22px; font-weight: bold; color: var(--ink);
  margin: 12px 0 20px; padding-bottom: 11px;
  border-bottom: 3px solid var(--cc-rot);
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
h1 small { font-size: 13px; color: var(--muted); font-weight: normal; }
.hint { color: var(--muted); font-size: 13px; }
.fuss { margin-top: 26px; }
.muted { color: var(--muted); }
.leer { color: var(--muted); font-size: 14px; padding: 6px 0 10px; }
.err { color: var(--cc-rot); font-size: 13px; font-weight: bold; margin: 0 0 14px; }
.nix { color: var(--line); }

/* ----------------------------------------------------------- Anmeldung */
body.anmeldung { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; }
.loginbox {
  width: 100%; max-width: 420px; padding: 0; margin: 0;
  background: var(--panel);
  border: 1px solid var(--line); border-left: var(--kante) solid var(--cc-rot);
  border-radius: var(--radius); box-shadow: var(--schatten-hoch);
  overflow: hidden;
}
.login-kopf {
  padding: 32px 34px 28px; border-bottom: 2px solid var(--line-zart);
  background: var(--kopf-bg);
}
.login-kopf .marke { height: 56px; }
.login-feld { padding: 26px 34px 28px; }
.login-feld label {
  display: block; font-size: 12px; color: var(--muted);
  margin: 0 0 6px; font-weight: bold; text-transform: uppercase; letter-spacing: .9px;
}
.login-feld label + input { margin-bottom: 18px; }
.loginbox input {
  width: 100%; padding: 11px 13px; font: 15px Arial, Helvetica, sans-serif;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg); color: var(--ink);
}
.loginbox input:focus { outline: 2px solid var(--cc-rot); outline-offset: -1px; border-color: var(--cc-rot); }
.loginbox button {
  width: 100%; margin-top: 6px; padding: 13px;
  background: var(--cc-rot); color: #fff; border: 0; border-radius: var(--radius);
  font: bold 14px Arial, Helvetica, sans-serif; cursor: pointer;
  text-transform: uppercase; letter-spacing: 1px;
}
.loginbox button:hover { background: var(--cc-rot-dunkel); }
.login-fuss {
  margin: 0; padding: 16px 34px 22px; font-size: 12px; color: var(--muted);
  border-top: 1px solid var(--line-zart); background: var(--kopf-bg);
}

/* ---------------------------------------------------------- Kennzahlen */
.kpis {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 12px; margin-bottom: 22px;
}
.kpi {
  background: var(--panel); border: 1px solid var(--line-zart);
  border-left: var(--kante) solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 3px;
  color: var(--ink); box-shadow: var(--schatten);
}
.kpi:hover { text-decoration: none; border-left-color: var(--cc-rot); box-shadow: var(--schatten-hoch); }
.kpi-zahl { font-size: 30px; font-weight: bold; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-label { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .9px; font-weight: bold; }
.kpi.k-warn { border-left-color: var(--warn); }
.kpi.k-warn .kpi-zahl { color: var(--warn); }

/* --------------------------------------------------------------- Panel */
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); gap: 16px; }
.panel {
  background: var(--panel); border: 1px solid var(--line-zart);
  border-left: var(--kante) solid var(--line);
  border-radius: var(--radius); box-shadow: var(--schatten); overflow: hidden;
  margin-bottom: 16px;
}
.panel-kopf {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 20px; background: var(--kopf-bg);
  border-bottom: 2px solid var(--line-zart);
}
.panel-kopf h2 { color: var(--ink); }
.panel-mehr { font-size: 12px; color: var(--muted); }
.panel-inhalt { padding: 6px 20px 14px; }

.zeile { padding: 12px 0; border-bottom: 1px solid var(--line-zart); }
.zeile:last-child { border-bottom: 0; }
.z-haupt { font-size: 15px; margin-bottom: 6px; }
.z-haupt a { color: var(--ink); font-weight: bold; }
.z-haupt a:hover { color: var(--cc-rot); }
.z-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.z-schritt { font-size: 13px; color: var(--muted); margin-top: 6px; }
.zeile.ist-spaet { border-left: 4px solid var(--cc-rot); padding-left: 14px; margin-left: -18px; }

/* -------------------------------------------------------------- Badges */
.badge {
  display: inline-block; font-size: 12px; line-height: 1.75;
  padding: 0 10px; border-radius: 12px;
  background: var(--line-zart); color: var(--ink);
  white-space: nowrap; max-width: 280px; overflow: hidden; text-overflow: ellipsis;
  vertical-align: middle;
}
.badge.b-hoch { background: var(--cc-rot); color: #fff; font-weight: bold; }
.badge.b-mittel { background: var(--warn-bg); color: var(--warn); font-weight: bold; }
.badge.b-niedrig { background: var(--ok-bg); color: var(--muted); }
.datum { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.datum.spaet { color: var(--cc-rot); font-weight: bold; }

/* ------------------------------------------------------------- Kacheln */
.cards, .menue {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
  gap: 10px;
}
/* Gegliedertes Startmenue: Gruppen als Spalten nebeneinander */
.menue-block {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 24px; align-items: start; margin-bottom: 30px;
}
.menue-gruppe { min-width: 0; }
.menue-gruppe > h2 {
  color: var(--muted); margin: 0 0 11px; padding-bottom: 8px;
  border-bottom: 2px solid var(--line-zart);
}
.menue {
  display: flex; flex-direction: column; gap: 8px; margin-bottom: 0;
}
/* Startmenue: groesser als die uebrigen Kacheln, es ist der Einstieg */
.menue .card { padding: 18px 20px; gap: 14px; }
.menue .card .ico { font-size: 24px; }
.menue .card .lbl { font-size: 15.5px; }
.menue .card .cnt { font-size: 16px; font-weight: bold; color: var(--ink); }
.menue .card.ist-meeting .cnt { font-size: 12.5px; font-weight: normal; color: var(--muted); }
.card {
  display: flex; align-items: center; gap: 11px;
  background: var(--panel); border: 1px solid var(--line-zart);
  border-left: var(--kante) solid var(--line);
  border-radius: var(--radius); padding: 13px 15px; color: var(--ink);
  box-shadow: var(--schatten);
}
.card:hover { border-left-color: var(--cc-rot); background: var(--zeile-hover); text-decoration: none; }
.card .ico { font-size: 17px; line-height: 1; }
.card .lbl { flex: 1; font-size: 13.5px; font-weight: bold; }
.card .cnt { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.card.ist-meeting .cnt { font-size: 12px; font-weight: normal; color: var(--muted); }

/* -------------------------------------------------------- Werkzeugleiste */
.werkzeuge { margin-bottom: 12px; }
.wz-reihe { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.wz-suche {
  flex: 1 1 260px; min-width: 210px; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); color: var(--ink); font: 14px Arial, Helvetica, sans-serif;
}
.wz-suche:focus { outline: 2px solid var(--cc-rot); outline-offset: -1px; }
.wz-filter {
  padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); color: var(--ink); font: 13px Arial, Helvetica, sans-serif;
  max-width: 210px;
}
.wz-filter.ist-aktiv { border-color: var(--cc-rot); color: var(--cc-rot); font-weight: bold; }
.wz-check { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.werkzeuge button {
  padding: 9px 18px; border: 0; border-radius: var(--radius);
  background: var(--cc-rot); color: #fff; cursor: pointer;
  font: bold 13px Arial, Helvetica, sans-serif;
}
.werkzeuge button:hover { background: var(--cc-rot-dunkel); }
.wz-reset { font-size: 13px; color: var(--muted); }

.spaltenwahl {
  background: var(--panel); border: 1px solid var(--line-zart);
  border-left: var(--kante) solid var(--line);
  border-radius: var(--radius); margin-bottom: 14px; font-size: 13px;
  box-shadow: var(--schatten);
}
.spaltenwahl summary {
  padding: 11px 18px; cursor: pointer; color: var(--muted);
  font-size: 12px; text-transform: uppercase; letter-spacing: .9px; font-weight: bold;
}
.spaltenwahl summary:hover { color: var(--cc-rot); }
.spaltenwahl[open] { border-left-color: var(--cc-rot); }
.sw-liste {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 6px 16px; padding: 8px 18px 14px; border-top: 2px solid var(--line-zart);
}
.sw-liste label { display: flex; align-items: center; gap: 7px; }
.sw-fuss { display: flex; gap: 18px; align-items: center; padding: 0 18px 14px; flex-wrap: wrap; }
.sw-fuss button {
  padding: 8px 16px; border: 0; border-radius: var(--radius);
  background: var(--cc-rot); color: #fff; cursor: pointer;
  font: bold 13px Arial, Helvetica, sans-serif;
}
.sw-fuss a { font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------- Tabellen */
.tablewrap {
  overflow: auto; max-height: calc(100vh - 250px);
  background: var(--panel);
  border: 1px solid var(--line-zart); border-left: var(--kante) solid var(--line);
  border-radius: var(--radius); box-shadow: var(--schatten);
}
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13.5px; }
th, td { text-align: left; padding: 9px 14px; white-space: nowrap; vertical-align: top; }
th {
  background: var(--kopf-bg); color: var(--ink);
  font-weight: bold; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .7px;
  border-bottom: 2px solid var(--cc-rot);
  position: sticky; top: 0; z-index: 2;
  overflow: hidden; text-overflow: ellipsis;
}
th a { color: var(--ink); }
td { border-bottom: 1px solid var(--line-zart); }
tbody tr:hover { background: var(--zeile-hover); }
tbody tr:last-child td { border-bottom: 0; }
tr.archiviert td { opacity: .45; }
td.haft, th.haft {
  position: sticky; left: 0; background: var(--panel); z-index: 1;
  border-right: 2px solid var(--line-zart); max-width: 340px;
  white-space: normal; font-weight: bold;
}
table.ist-fest td.haft, table.ist-fest th.haft { max-width: none; }
th.haft .spaltengriff::after { display: none; }
th.haft.griff-an { border-right-color: var(--cc-rot); }
th.haft { background: var(--kopf-bg); z-index: 3; }
tbody tr:hover td.haft { background: var(--zeile-hover); }
.zelle { color: var(--ink); }
td .badge + .badge { margin-left: 4px; }

.pager { display: flex; gap: 5px; flex-wrap: wrap; margin: 16px 0; font-size: 13px; }
.pager a, .pager span {
  padding: 7px 12px; border: 1px solid var(--line-zart);
  border-radius: var(--radius); background: var(--panel);
  font-variant-numeric: tabular-nums;
}
.pager a { color: var(--ink); }
.pager span { background: var(--cc-rot); color: #fff; border-color: var(--cc-rot); font-weight: bold; }
.pager .luecke { background: transparent; border: 0; color: var(--muted); }

/* ------------------------------------------------------------- Detail */
.rueck-titel {
  margin: 28px 0 12px; color: var(--ink);
  border-bottom: 2px solid var(--cc-rot); padding-bottom: 8px;
}
.detail {
  display: grid; grid-template-columns: 250px 1fr;
  background: var(--panel); border: 1px solid var(--line-zart);
  border-left: var(--kante) solid var(--line);
  border-radius: var(--radius); overflow: hidden; margin: 0 0 20px;
  box-shadow: var(--schatten);
}
.detail dt {
  padding: 11px 18px; font-size: 11.5px; font-weight: bold; color: var(--muted);
  background: var(--kopf-bg); border-bottom: 1px solid var(--line-zart);
  text-transform: uppercase; letter-spacing: .8px;
}
.detail dd {
  padding: 11px 18px; margin: 0; border-bottom: 1px solid var(--line-zart);
  overflow-wrap: anywhere; white-space: normal; font-size: 14px;
}
.detail dd .badge + .badge { margin-left: 5px; }

@media (max-width: 760px) {
  body { font-size: 14px; }
  .grid2 { grid-template-columns: 1fr; }
  .detail { grid-template-columns: 1fr; }
  .detail dt { border-bottom: 0; padding-bottom: 3px; }
  main, .topinner, .crumbwrap { padding-left: 15px; padding-right: 15px; }
  .menue { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .menue .card { padding: 14px 16px; }
  .menue .card .ico { font-size: 20px; }
  .menue .card .lbl { font-size: 14px; }
  td.haft, th.haft { position: static; }
  .tablewrap { max-height: none; }
  .login-kopf, .login-feld, .login-fuss { padding-left: 22px; padding-right: 22px; }
}
/* ==================================================== Projektmeeting
   Auf Bildschirmfreigabe ausgelegt: grosse Schrift, hoher Kontrast,
   keine Deckkraft-Tricks. --skala wird ueber den Regler gesetzt. */

body.praesentation {
  --skala: 1;
  background: var(--bg);
}
body.praesentation.skala-m { --skala: 1.18; }
body.praesentation.skala-l { --skala: 1.38; }
body.praesentation.skala-xl { --skala: 1.62; }

.pt-kopf {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 16px 28px; flex-wrap: wrap;
  background: var(--panel); border-bottom: 4px solid var(--cc-rot);
  position: sticky; top: 0; z-index: 30; box-shadow: var(--schatten);
}
.pt-kopf-links { display: flex; align-items: baseline; gap: 18px; }
.pt-titel {
  font-size: 22px; font-weight: bold; color: var(--cc-rot);
  text-transform: uppercase; letter-spacing: 1.2px;
}
.pt-datum { font-size: 16px; color: var(--ink); }
.pt-kopf-rechts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pt-zahl { font-size: 16px; color: var(--ink); font-weight: bold; font-variant-numeric: tabular-nums; }
.pt-knopf {
  padding: 9px 16px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); color: var(--ink); cursor: pointer;
  font: bold 14px Arial, Helvetica, sans-serif;
}
.pt-knopf:hover { border-color: var(--cc-rot); color: var(--cc-rot); text-decoration: none; }
.pt-regler { display: flex; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pt-regler button {
  padding: 9px 13px; border: 0; background: var(--panel); color: var(--ink);
  cursor: pointer; font: bold 14px Arial, Helvetica, sans-serif;
  border-right: 1px solid var(--line);
}
.pt-regler button:last-child { border-right: 0; }
.pt-regler button.ist-aktiv { background: var(--cc-rot); color: #fff; }

.pt-main { padding: 22px 28px 48px; }
.pt-raster {
  display: flex; flex-direction: column; gap: 16px;
  max-width: 1500px; margin: 0 auto;
}
.pt-raster.ist-fokusmodus { display: block; }
.pt-karte.ist-versteckt { display: none; }

.pt-karte {
  background: var(--panel); border: 1px solid var(--line);
  border-left: 8px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--schatten); overflow: hidden; cursor: pointer;
}
.pt-karte:hover { box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.pt-karte.prio-hoch { border-left-color: var(--cc-rot); }
.pt-karte.prio-mittel { border-left-color: var(--warn); }
.pt-karte.prio-niedrig { border-left-color: var(--muted); }

.pt-karte-kopf {
  padding: 18px 22px 15px; border-bottom: 2px solid var(--line-zart);
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.pt-kopf-text { flex: 1 1 420px; min-width: 0; }
.pt-karte-kopf .pt-status { flex: 0 0 auto; justify-content: flex-end; }
.pt-kennung { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; flex-wrap: wrap; }
.pt-nr {
  font-size: calc(14px * var(--skala)); font-weight: bold; letter-spacing: .8px;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.pt-name {
  font-size: calc(25px * var(--skala)); font-weight: bold; margin: 0 0 5px;
  text-transform: none; letter-spacing: 0; color: var(--ink); line-height: 1.22;
}
.pt-kunde { font-size: calc(17px * var(--skala)); color: var(--ink); margin-bottom: 11px; }
.pt-status { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; }
.pt-datenlage { font-size: calc(14px * var(--skala)); color: var(--muted); }

.pt-karte-inhalt {
  padding: 8px 22px 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(calc(330px * var(--skala)), 1fr));
  gap: 0 34px; align-items: start;
}
.pt-karte-inhalt .pt-schritt { grid-column: 1 / -1; }
.pt-block { margin: 16px 0; }
.pt-block h3 {
  font-size: calc(13px * var(--skala)); text-transform: uppercase; letter-spacing: .9px;
  color: var(--ink); margin: 0 0 7px; font-weight: bold;
}
.pt-block p { margin: 0; font-size: calc(18px * var(--skala)); line-height: 1.5; }
.pt-block ul { margin: 0; padding-left: calc(22px * var(--skala)); }
.pt-block li { font-size: calc(17px * var(--skala)); line-height: 1.5; margin-bottom: 6px; }
.pt-schritt {
  background: var(--cc-rot-hauch); border-left: 4px solid var(--cc-rot);
  border-radius: var(--radius); padding: 13px 18px; margin: 16px 0;
}
.pt-schritt h3 { color: var(--cc-rot); }
.pt-schritt p { font-weight: bold; }
.pt-leise li, .pt-leise p { color: var(--muted); font-size: calc(15px * var(--skala)); }

.pt-karte-fuss {
  padding: 13px 22px; border-top: 2px solid var(--line-zart);
  background: var(--kopf-bg); display: flex; gap: 18px; flex-wrap: wrap;
}
.pt-leute { font-size: calc(15px * var(--skala)); color: var(--ink); }
.pt-pm { color: var(--muted); }
.pt-pm::before { content: "PM: "; font-weight: bold; }

/* Groessere, kontraststarke Badges in der Praesentation */
body.praesentation .badge {
  font-size: calc(14px * var(--skala)); line-height: 1.9;
  padding: 0 12px; border-radius: 14px; max-width: none;
  border: 1px solid transparent;
}
body.praesentation .badge.b-hoch { background: var(--cc-rot); color: #fff; }
body.praesentation .badge.b-mittel { background: var(--warn); color: #fff; }
body.praesentation .badge.b-niedrig { background: var(--line-zart); color: var(--ink); border-color: var(--line); }
body.praesentation .badge:not(.b-hoch):not(.b-mittel):not(.b-niedrig) {
  background: var(--panel); color: var(--ink); border-color: var(--line);
}
body.praesentation .datum { font-size: calc(15px * var(--skala)); color: var(--ink); font-weight: bold; }
body.praesentation .datum.spaet { color: var(--cc-rot); }

/* Fokusmodus: nochmals eine Stufe groesser */
.pt-karte.ist-fokus {
  max-width: calc(1150px * var(--skala)); margin: 0 auto; cursor: default;
  border-left-width: 12px;
}
.pt-karte.ist-fokus .pt-name { font-size: calc(40px * var(--skala)); }
.pt-karte.ist-fokus .pt-kunde { font-size: calc(23px * var(--skala)); }
.pt-karte.ist-fokus .pt-nr { font-size: calc(17px * var(--skala)); }
.pt-karte.ist-fokus .pt-block p { font-size: calc(23px * var(--skala)); }
.pt-karte.ist-fokus .pt-block li { font-size: calc(22px * var(--skala)); margin-bottom: 9px; }
.pt-karte.ist-fokus .pt-leise li { font-size: calc(19px * var(--skala)); }
.pt-karte.ist-fokus .pt-block h3 { font-size: calc(15px * var(--skala)); }
.pt-karte.ist-fokus .badge { font-size: calc(17px * var(--skala)); padding: 2px 16px; }
.pt-karte.ist-fokus .datum { font-size: calc(19px * var(--skala)); }
.pt-karte.ist-fokus .pt-karte-kopf { padding: 30px 38px 24px; }
.pt-karte.ist-fokus .pt-karte-inhalt { padding: 14px 38px 26px; gap: 0 46px; }
.pt-karte.ist-fokus .pt-karte-fuss { padding: 18px 38px; }
.pt-karte.ist-fokus .pt-leute { font-size: calc(18px * var(--skala)); }

.pt-fokusleiste {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px;
  background: var(--panel); border: 2px solid var(--line);
  border-radius: 28px; padding: 9px 18px; box-shadow: 0 4px 18px rgba(0,0,0,.2);
  font-size: 16px; font-weight: bold; color: var(--ink); z-index: 40;
}
.pt-fokusleiste .pt-knopf { border-radius: 20px; font-size: 16px; padding: 7px 16px; }

@media (max-width: 900px) {
  .pt-raster { grid-template-columns: 1fr; }
  .pt-main { padding: 14px; }
  .pt-kopf { padding: 12px 14px; }
}

/* ---------------------------------------- Begrüßung und Teilnehmer */
.pt-willkommen, .pt-anwesenheit {
  max-width: 1500px; margin: 0 auto 16px;
  background: var(--panel); border: 1px solid var(--line);
  border-left: 8px solid var(--cc-rot); border-radius: var(--radius);
  box-shadow: var(--schatten);
}
.pt-willkommen summary {
  padding: 16px 22px; cursor: pointer; list-style: none;
  font-size: calc(21px * var(--skala)); font-weight: bold; color: var(--cc-rot);
}
.pt-willkommen summary::-webkit-details-marker { display: none; }
.pt-willkommen summary::after { content: " ▾"; color: var(--muted); font-weight: normal; }
.pt-willkommen[open] summary::after { content: " ▴"; }
.pt-willkommen-text { padding: 0 22px 20px; }
.pt-willkommen-text p { font-size: calc(18px * var(--skala)); line-height: 1.55; margin: 0 0 12px; }
.pt-willkommen-text ul { margin: 0 0 12px; padding-left: calc(24px * var(--skala)); }
.pt-willkommen-text li { font-size: calc(18px * var(--skala)); line-height: 1.55; margin-bottom: 7px; }
.pt-willkommen-text strong { color: var(--cc-rot); }

.pt-anw-kopf {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; padding: 14px 22px 10px;
}
.pt-anw-kopf h2 { font-size: calc(17px * var(--skala)); color: var(--ink); letter-spacing: .6px; }
.pt-anw-rechts { display: flex; align-items: center; gap: 10px; }
.pt-anw-stand {
  font-size: calc(16px * var(--skala)); font-weight: bold; color: var(--gruen);
  font-variant-numeric: tabular-nums;
}
.pt-anw-liste { display: flex; flex-wrap: wrap; gap: 9px; padding: 0 22px 18px; }
.pt-anw-person {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 15px 8px 11px; border: 2px solid var(--line);
  border-radius: 24px; background: var(--panel); cursor: pointer;
  font-size: calc(16px * var(--skala)); color: var(--muted);
  user-select: none;
}
.pt-anw-person:hover { border-color: var(--gruen); }
.pt-anw-person input { width: 18px; height: 18px; accent-color: var(--gruen); cursor: pointer; margin: 0; }
.pt-anw-person .pt-anw-icon { font-size: calc(16px * var(--skala)); filter: grayscale(1); opacity: .5; }
.pt-anw-person.ist-da {
  border-color: var(--gruen); background: var(--gruen-bg);
  color: var(--gruen); font-weight: bold;
}
.pt-anw-person.ist-da .pt-anw-name { color: var(--ink); }
.pt-anw-person.ist-da .pt-anw-icon { filter: none; opacity: 1; }

/* ------------------------------------------- Leute im Kartenkopf */
.pt-leute-block { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.pt-leute {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: calc(15px * var(--skala)); color: var(--ink);
}
.pt-leute-icon { font-size: calc(17px * var(--skala)); line-height: 1; }
.pt-leute-label {
  font-size: calc(12px * var(--skala)); text-transform: uppercase; letter-spacing: .7px;
  color: var(--muted); font-weight: bold; margin-right: 2px;
}
.pt-person {
  display: inline-block; padding: 2px 11px; border-radius: 13px;
  background: var(--line-zart); color: var(--ink);
  font-size: calc(15px * var(--skala)); white-space: nowrap;
}
.pt-person-pm { background: transparent; border: 1px dashed var(--line); color: var(--muted); }
.pt-leute-leer { color: var(--muted); font-style: italic; margin-top: 10px; }

.pt-karte.ist-fokus .pt-person { font-size: calc(18px * var(--skala)); padding: 3px 14px; }
.pt-karte.ist-fokus .pt-leute-label { font-size: calc(14px * var(--skala)); }

.pt-anw-gruppe { padding: 0 22px 6px; }
.pt-anw-gruppe h3 {
  font-size: calc(12px * var(--skala)); text-transform: uppercase; letter-spacing: .8px;
  color: var(--muted); font-weight: bold; margin: 8px 0 7px;
}
.pt-anw-gruppe:last-of-type { padding-bottom: 18px; }
.pt-anw-liste { padding: 0 0 4px; }
.pt-anw-abw { font-size: calc(14px * var(--skala)); color: var(--warn); font-weight: bold; }
.pt-anw-notiz { font-size: calc(13px * var(--skala)); color: var(--warn); margin-left: 4px; }
.pt-anw-person.ist-weg { border-style: dashed; opacity: .75; }
.pt-anw-person.ist-weg.ist-da { opacity: 1; }

/* Herkunftskennzeichen bei gemischter Ansicht */
.pt-herkunft {
  font-size: calc(12px * var(--skala)); text-transform: uppercase; letter-spacing: .6px;
  color: var(--muted); font-weight: bold; border: 1px solid var(--line);
  border-radius: 10px; padding: 1px 9px;
}
.pt-regler a {
  padding: 9px 14px; background: var(--panel); color: var(--ink);
  font: bold 14px Arial, Helvetica, sans-serif; border-right: 1px solid var(--line);
}
.pt-regler a:last-child { border-right: 0; }
.pt-regler a:hover { text-decoration: none; background: var(--zeile-hover); }
.pt-regler a.ist-aktiv { background: var(--cc-rot); color: #fff; }

.pt-anw-save { font-size: calc(13px * var(--skala)); color: var(--muted); min-width: 120px; }
.pt-anw-save.ist-ok { color: var(--gruen); }
.pt-anw-save.ist-fehler { color: var(--cc-rot); font-weight: bold; }

/* Teilnehmerbox einklappbar */
details.pt-anwesenheit > summary {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 15px 22px; cursor: pointer; list-style: none;
}
details.pt-anwesenheit > summary::-webkit-details-marker { display: none; }
details.pt-anwesenheit > summary::after {
  content: "▾"; color: var(--muted); margin-left: auto;
  font-size: calc(16px * var(--skala));
}
details.pt-anwesenheit[open] > summary::after { content: "▴"; }
details.pt-anwesenheit > summary:hover .pt-anw-titel { color: var(--cc-rot); }
.pt-anw-titel {
  font-size: calc(19px * var(--skala)); font-weight: bold; color: var(--ink);
}
.pt-anw-koerper { border-top: 1px solid var(--line-zart); }
.pt-anw-koerper .pt-anw-kopf { padding: 12px 22px 4px; justify-content: flex-start; }

/* Begrüßung und Teilnehmer auf der Startseite etwas kompakter */
body:not(.praesentation) .pt-willkommen,
body:not(.praesentation) .pt-anwesenheit { max-width: none; margin-bottom: 14px; }
body:not(.praesentation) .pt-willkommen summary { font-size: 16px; padding: 13px 18px; }
body:not(.praesentation) .pt-willkommen-text { padding: 0 18px 16px; }
body:not(.praesentation) .pt-willkommen-text p,
body:not(.praesentation) .pt-willkommen-text li { font-size: 14px; }
body:not(.praesentation) .pt-anw-titel { font-size: 15px; }
body:not(.praesentation) details.pt-anwesenheit > summary { padding: 12px 18px; }
body:not(.praesentation) .pt-anw-stand,
body:not(.praesentation) .pt-anw-abw { font-size: 13px; }
body:not(.praesentation) .pt-anw-person { font-size: 13px; padding: 6px 12px 6px 9px; }
body:not(.praesentation) .pt-anw-person input { width: 15px; height: 15px; }
body:not(.praesentation) .pt-anw-gruppe h3 { font-size: 11px; }
body:not(.praesentation) .pt-anw-notiz { font-size: 11px; }
body:not(.praesentation) .pt-knopf { padding: 6px 12px; font-size: 12px; }
body:not(.praesentation) .pt-anw-save { font-size: 12px; }

/* ------------------------------------------ Spaltenbreiten ziehen */
table.ist-fest { table-layout: fixed; }
table.ist-fest td, table.ist-fest th { overflow: hidden; text-overflow: ellipsis; }
table.ist-fest td.haft { white-space: nowrap; }
.spaltengriff {
  position: absolute; top: 0; right: 0; width: 9px; height: 100%;
  cursor: col-resize; user-select: none; touch-action: none;
}
.spaltengriff::after {
  content: ""; position: absolute; top: 20%; bottom: 20%; right: 4px;
  width: 1px; background: var(--line);
}
.spaltengriff:hover::after, .spaltengriff.ist-aktiv::after {
  background: var(--cc-rot); width: 2px; top: 0; bottom: 0;
}
body.zieht-spalte { cursor: col-resize; user-select: none; }
th[draggable="true"] { cursor: grab; }
th[draggable="true"] a { cursor: pointer; }
th.zieht { opacity: .4; }
th.ziel-l { box-shadow: inset 3px 0 0 var(--cc-rot); }
th.ziel-r { box-shadow: inset -3px 0 0 var(--cc-rot); }
.breiten-reset { font-size: 12px; color: var(--muted); margin-left: auto; }

/* Leitung: eingeladen, aber nicht fest eingeplant */
.pt-anw-gruppe.ist-leitung h3 span {
  text-transform: none; letter-spacing: 0; font-weight: normal;
  color: var(--muted); font-style: italic;
}
.pt-anw-person.ist-gelegentlich { border-style: dotted; }
.pt-anw-person.ist-gelegentlich.ist-da { border-style: solid; }

/* ======================================================= Eskalation */
.pt-karte.ist-eskaliert { border-color: var(--cc-rot); border-width: 2px; }
.pt-karte.esk-leitung { border-left-color: var(--cc-rot) !important; }
.pt-karte.esk-kunde   { border-left-color: var(--warn) !important; }

.pt-eskalation {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  padding: 12px 22px; background: var(--cc-rot); color: #fff;
}
.pt-eskalation.stufe-kunde  { background: var(--warn); }
.pt-eskalation.stufe-intern { background: var(--muted); }
.pt-esk-icon { font-size: calc(20px * var(--skala)); line-height: 1; }
.pt-esk-label {
  font-size: calc(14px * var(--skala)); font-weight: bold;
  text-transform: uppercase; letter-spacing: 1px;
}
.pt-esk-text { font-size: calc(16px * var(--skala)); font-weight: bold; }
.pt-esk-meta { font-size: calc(13px * var(--skala)); opacity: .9; margin-left: auto; }

.pt-karte.ist-fokus .pt-eskalation { padding: 18px 38px; }
.pt-karte.ist-fokus .pt-esk-label { font-size: calc(18px * var(--skala)); }
.pt-karte.ist-fokus .pt-esk-text { font-size: calc(24px * var(--skala)); }
.pt-karte.ist-fokus .pt-esk-icon { font-size: calc(30px * var(--skala)); }
.pt-karte.ist-fokus .pt-esk-meta { font-size: calc(16px * var(--skala)); }

.pt-esk-zaehler {
  font-size: calc(15px * var(--skala)); font-weight: bold;
  color: #fff; background: var(--cc-rot);
  padding: 5px 13px; border-radius: 14px;
}

/* ============================================================ Wortmarke
   Eingebettetes SVG: das Wortzeichen bleibt CANCOM-Rot, die Schriftzeile
   erbt ueber currentColor die Textfarbe und funktioniert so in beiden Modi. */
.brand { display: inline-flex; align-items: center; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.marke { height: 50px; width: auto; display: block; }
.brand:hover .marke { opacity: .78; }

.pt-marke { display: inline-flex; align-items: center; margin-right: 6px; color: var(--ink); }
.pt-marke:hover { text-decoration: none; }
.pt-marke .marke { height: 38px; }
.pt-marke:hover .marke { opacity: .78; }

@media (max-width: 760px) {
  .marke { height: 34px; }
  .pt-marke .marke { height: 28px; }
}

/* Im Fokusmodus zaehlt nur das Vorhaben: Begruessung und Teilnehmer
   gehoeren auf die Uebersicht, nicht auf die Einzelansicht. */
body.ist-fokus .pt-willkommen,
body.ist-fokus .pt-anwesenheit { display: none; }
body.ist-fokus .pt-main { padding-top: 26px; }

/* ---------------------------------------------------- Ticketsuche */
.ticketsuche {
  background: var(--panel); border: 1px solid var(--line-zart);
  border-left: var(--kante) solid var(--line); border-radius: var(--radius);
  padding: 10px 14px; box-shadow: var(--schatten); margin-bottom: 14px;
}
.ticketsuche:focus-within { border-left-color: var(--cc-rot); }
.ts-label {
  font-size: 12px; font-weight: bold; color: var(--muted);
  text-transform: uppercase; letter-spacing: .9px; white-space: nowrap;
}
.ticketsuche .wz-suche { font-variant-numeric: tabular-nums; }
.ts-wege { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.ts-wege .card { align-items: flex-start; padding: 18px 20px; }
.ts-wege .card .lbl { font-size: 15px; line-height: 1.4; }
.ts-wege .card small { color: var(--muted); font-weight: normal; font-size: 12px; }

/* ------------------------------------------ Wissen und Servicekatalog */
.wissen-einleitung {
  color: var(--muted); font-size: 14px; margin: 0 0 18px; max-width: 78ch;
}
.wissen-einleitung p { margin: 0 0 8px; }

.wissen-liste { display: flex; flex-direction: column; gap: 10px; }
.wissen-karte {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--panel); border: 1px solid var(--line-zart);
  border-left: var(--kante) solid var(--line); border-radius: var(--radius);
  padding: 16px 20px; color: var(--ink); box-shadow: var(--schatten);
}
.wissen-karte:hover { border-left-color: var(--cc-rot); background: var(--zeile-hover); text-decoration: none; }
.wk-ico { font-size: 20px; line-height: 1.2; }
.wk-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.wk-titel { font-weight: bold; font-size: 15.5px; }
.wissen-karte:hover .wk-titel { color: var(--cc-rot); }
.wk-vorschau { color: var(--muted); font-size: 13px; line-height: 1.5; }

/* Gespiegelter Seitentext */
.wissen-text {
  background: var(--panel); border: 1px solid var(--line-zart);
  border-left: var(--kante) solid var(--line); border-radius: var(--radius);
  padding: 30px 38px; box-shadow: var(--schatten);
  font-size: 15px; line-height: 1.65;
}
/* Fliesstext bleibt lesbar begrenzt, Code und Tabellen nutzen die volle Breite */
.wissen-text > p,
.wissen-text > ul,
.wissen-text > ol,
.wissen-text > blockquote,
.wissen-text > .w-hinweis,
.wissen-text > .w-haken { max-width: 104ch; }
.wissen-text h2 {
  font-size: 18px; text-transform: none; letter-spacing: 0;
  margin: 26px 0 10px; padding-bottom: 7px;
  border-bottom: 2px solid var(--cc-rot); color: var(--ink);
}
.wissen-text h3 { font-size: 16px; margin: 22px 0 8px; color: var(--ink); }
.wissen-text h4 { font-size: 14.5px; margin: 18px 0 6px; color: var(--muted); }
.wissen-text > :first-child { margin-top: 0; }
.wissen-text p { margin: 0 0 12px; }
.wissen-text ul, .wissen-text ol { margin: 0 0 14px; padding-left: 26px; }
.wissen-text li { margin-bottom: 6px; }
.wissen-text code {
  background: var(--kopf-bg); border: 1px solid var(--line-zart);
  border-radius: 3px; padding: 1px 6px; font-size: 13.5px;
  font-family: Consolas, "DejaVu Sans Mono", monospace;
}
.wissen-text pre {
  max-width: none;
  background: var(--kopf-bg); border: 1px solid var(--line-zart);
  border-left: 3px solid var(--muted); border-radius: var(--radius);
  padding: 14px 16px; overflow-x: auto; margin: 0 0 14px;
}
.wissen-text pre code { background: none; border: 0; padding: 0; font-size: 13px; }
.wissen-text blockquote {
  margin: 0 0 14px; padding: 4px 0 4px 16px;
  border-left: 3px solid var(--line); color: var(--muted);
}
.wissen-text hr { border: 0; border-top: 1px solid var(--line-zart); margin: 22px 0; }
.wissen-text .w-hinweis {
  display: flex; gap: 12px; background: var(--cc-rot-hauch);
  border-radius: var(--radius); padding: 14px 18px; margin: 0 0 14px;
}
.wissen-text .w-hinweis > span { font-size: 18px; line-height: 1.3; }
.wissen-text .w-hinweis p:last-child { margin-bottom: 0; }
.wissen-text .w-haken { font-variant-numeric: tabular-nums; }
.wissen-text .w-tabelle { overflow-x: auto; margin: 0 0 16px; }
.wissen-text table { font-size: 13.5px; border: 1px solid var(--line-zart); }
.wissen-text th { text-transform: none; letter-spacing: 0; }
.wissen-text details {
  border: 1px solid var(--line-zart); border-radius: var(--radius);
  padding: 10px 14px; margin: 0 0 14px;
}
.wissen-text summary { cursor: pointer; font-weight: bold; }
.wissen-text .w-bild { color: var(--muted); font-size: 13px; }

/* ------------------------------------------------- Einmalcode (TOTP) */
.who-warn {
  color: var(--cc-rot) !important; font-weight: bold;
  border: 1px solid var(--cc-rot); border-radius: 12px; padding: 3px 11px;
}
.who-warn:hover { background: var(--cc-rot); color: #fff !important; text-decoration: none; }

.code-feld {
  font-family: Consolas, "DejaVu Sans Mono", monospace;
  font-size: 26px !important; letter-spacing: 9px; text-align: center;
  padding: 13px 10px !important;
}
.meldung-ok {
  background: var(--gruen-bg); color: var(--gruen); font-weight: bold;
  border-left: var(--kante) solid var(--gruen); border-radius: var(--radius);
  padding: 13px 18px; margin: 0 0 18px; font-size: 14px;
}

.totp-raster { display: grid; grid-template-columns: auto 1fr; gap: 30px; align-items: start; }
.totp-qr {
  background: #fff; padding: 12px; border: 1px solid var(--line);
  border-radius: var(--radius); line-height: 0;
}
.totp-qr svg { width: 210px; height: 210px; display: block; }
.totp-text { min-width: 0; }
.totp-text p { margin: 0 0 12px; max-width: 70ch; }
.totp-schluessel code {
  display: inline-block; background: var(--kopf-bg); border: 1px solid var(--line-zart);
  border-radius: var(--radius); padding: 9px 14px;
  font-family: Consolas, "DejaVu Sans Mono", monospace;
  font-size: 15px; letter-spacing: 1.5px; user-select: all;
}

.klein-form { margin-top: 14px; max-width: 340px; }
.klein-form label {
  display: block; font-size: 12px; color: var(--muted); font-weight: bold;
  text-transform: uppercase; letter-spacing: .9px; margin: 0 0 6px;
}
.klein-form input {
  width: 100%; padding: 10px 12px; font: 15px Arial, Helvetica, sans-serif;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg); color: var(--ink); margin-bottom: 12px;
}
.klein-form input:focus { outline: 2px solid var(--cc-rot); outline-offset: -1px; }
.klein-form button {
  padding: 11px 20px; border: 0; border-radius: var(--radius);
  background: var(--cc-rot); color: #fff; cursor: pointer;
  font: bold 13px Arial, Helvetica, sans-serif;
  text-transform: uppercase; letter-spacing: .9px;
}
.klein-form button:hover { background: var(--cc-rot-dunkel); }
.klein-form .knopf-warn { background: var(--muted); }
.klein-form .knopf-warn:hover { background: var(--warn); }

.wh-codes {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 9px; margin: 14px 0 6px;
}
.wh-codes code {
  background: var(--kopf-bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 11px 14px; text-align: center;
  font-family: Consolas, "DejaVu Sans Mono", monospace;
  font-size: 15.5px; letter-spacing: 1.5px; user-select: all; color: var(--ink);
}

@media (max-width: 760px) {
  .totp-raster { grid-template-columns: 1fr; gap: 20px; }
  .totp-qr svg { width: 180px; height: 180px; }
}

/* ------------------------------------------------ Bearbeiten */
.knoepfe { margin: 12px 0 20px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.knopf,
.bearbeiten button {
  display: inline-block; padding: 8px 16px; border-radius: 6px; border: 0;
  background: var(--cc-rot); color: #fff; font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer;
}
.knopf:hover,
.bearbeiten button:hover { background: var(--cc-rot-dunkel); }
.knopf-leise {
  display: inline-block; padding: 8px 16px; border-radius: 6px;
  border: 1px solid var(--line); color: var(--muted); text-decoration: none;
}
.knopf-leise:hover { border-color: var(--cc-rot); color: var(--cc-rot); }

.bearbeiten { max-width: 760px; }
.bearbeiten .feld { display: grid; grid-template-columns: 220px 1fr; gap: 14px; align-items: start; margin: 0 0 14px; }
.bearbeiten .feld label { color: var(--muted); font-weight: 600; padding-top: 8px; }
.bearbeiten input[type="text"],
.bearbeiten input[type="date"],
.bearbeiten input[type="email"],
.bearbeiten input[type="tel"],
.bearbeiten input[type="url"],
.bearbeiten textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--panel); color: var(--ink); font: inherit;
}
.bearbeiten input:focus, .bearbeiten textarea:focus { outline: 2px solid var(--cc-rot-hauch); border-color: var(--cc-rot); }
.bearbeiten input[type="checkbox"] { width: 18px; height: 18px; margin-top: 10px; }
.bearbeiten textarea { resize: vertical; min-height: 96px; }

.fehler {
  padding: 10px 14px; border-radius: 6px; border-left: 4px solid var(--cc-rot);
  background: var(--cc-rot-hauch); color: var(--ink); max-width: 760px;
}

@media (max-width: 760px) {
  .bearbeiten .feld { grid-template-columns: 1fr; gap: 6px; }
  .bearbeiten .feld label { padding-top: 0; }
}
