/* MS Backend Core Azure — CANCOM-Farbwelt, Akzent #FF0035, Arial */

:root {
  --cc-rot: #FF0035;
  --cc-rot-dunkel: #C4002A;
  --cc-rot-hauch: #FFF0F3;
  --cc-grau-text: #595959;

  --bg: #F4F5F6;
  --panel: #FFFFFF;
  --ink: #111111;
  --muted: var(--cc-grau-text);
  --line: #D8DBDE;
  --line-zart: #ECEEF0;
  --accent: var(--cc-rot);
  --kopf-bg: #FAFAFB;
  --zeile-hover: #FFF7F9;
  --warn: #B25E00;
  --warn-bg: #FFF3E0;
  --gruen: #1B7A3D;
  --gruen-bg: #E8F5EC;
  --ok-bg: #EEF4EE;
  --radius: 3px;
  --skala: 1;
  --schatten: 0 1px 2px rgba(0,0,0,.05);
}

@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;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px; line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h2 { font-size: 13px; margin: 0; font-weight: bold; text-transform: uppercase; letter-spacing: .5px; }

/* ------------------------------------------------------------ Kopfzeile */
.top {
  background: var(--panel); border-bottom: 3px solid var(--cc-rot);
  position: sticky; top: 0; z-index: 20; box-shadow: var(--schatten);
}
.topinner {
  max-width: 1400px; margin: 0 auto; padding: 13px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  font-weight: bold; font-size: 14px; letter-spacing: 1px;
  color: var(--cc-rot); text-transform: uppercase;
}
.brand:hover { text-decoration: none; }
.who { display: flex; align-items: center; gap: 18px; font-size: 12px; color: var(--muted); }
.who a { color: var(--muted); }
.who a:hover { color: var(--accent); }

.crumbwrap { max-width: 1400px; margin: 0 auto; padding: 0 24px; }
.crumbs { padding-top: 14px; font-size: 12px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a::after, .crumbs span::after { content: " \203A "; color: var(--line); }
.crumbs span:last-child::after, .crumbs a:last-child::after { content: ""; }
.crumbs span:last-child { color: var(--ink); }

main { max-width: 1400px; margin: 0 auto; padding: 18px 24px 56px; }

h1 {
  font-size: 19px; font-weight: bold; color: var(--cc-rot);
  margin: 10px 0 18px; padding-bottom: 9px;
  border-bottom: 1px solid var(--line-zart);
}
h1 small { font-size: 12px; color: var(--muted); font-weight: normal; margin-left: 8px; }
.hint { color: var(--muted); font-size: 12px; }
.fuss { margin-top: 22px; }
.muted { color: var(--muted); }
.leer { color: var(--muted); font-size: 13px; padding: 4px 0 8px; }
.err { color: var(--cc-rot); font-size: 12px; font-weight: bold; margin: 0 0 12px; }
.nix { color: var(--line); }

/* ----------------------------------------------------------- Anmeldung */
.loginbox {
  max-width: 360px; margin: 11vh auto; background: var(--panel);
  border: 1px solid var(--line); border-top: 4px solid var(--cc-rot);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--schatten);
}
.loginbox h1 { margin-top: 0; border-bottom: 0; padding-bottom: 0; }
.loginbox label { display: block; font-size: 12px; color: var(--muted); margin: 14px 0 4px; font-weight: bold; }
.loginbox input {
  width: 100%; padding: 9px 10px; font: 14px 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; }
.loginbox button {
  width: 100%; margin-top: 22px; padding: 11px;
  background: var(--cc-rot); color: #fff; border: 0; border-radius: var(--radius);
  font: bold 14px Arial, Helvetica, sans-serif; cursor: pointer;
}
.loginbox button:hover { background: var(--cc-rot-dunkel); }

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

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

.zeile { padding: 10px 0; border-bottom: 1px solid var(--line-zart); }
.zeile:last-child { border-bottom: 0; }
.z-haupt { font-size: 13.5px; margin-bottom: 4px; }
.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: 5px; align-items: center; }
.z-schritt { font-size: 12px; color: var(--muted); margin-top: 5px; }
.zeile.ist-spaet { border-left: 3px solid var(--cc-rot); padding-left: 10px; margin-left: -13px; }

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

/* ------------------------------------------------------------- Kacheln */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 8px; padding: 8px 0 4px; }
.card {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg); border: 1px solid var(--line-zart);
  border-radius: var(--radius); padding: 10px 12px; color: var(--ink);
}
.card:hover { border-color: var(--cc-rot); background: var(--zeile-hover); text-decoration: none; }
.card .ico { font-size: 15px; line-height: 1; }
.card .lbl { flex: 1; font-size: 12.5px; font-weight: bold; }
.card .cnt { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

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

.spaltenwahl {
  background: var(--panel); border: 1px solid var(--line-zart);
  border-radius: var(--radius); margin-bottom: 12px; font-size: 12px;
}
.spaltenwahl summary { padding: 8px 14px; cursor: pointer; color: var(--muted); }
.spaltenwahl summary:hover { color: var(--cc-rot); }
.sw-liste {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 4px 14px; padding: 6px 14px 12px; border-top: 1px solid var(--line-zart);
}
.sw-liste label { display: flex; align-items: center; gap: 6px; }
.sw-fuss { display: flex; gap: 16px; align-items: center; padding: 0 14px 12px; }
.sw-fuss button {
  padding: 6px 14px; border: 0; border-radius: var(--radius);
  background: var(--cc-rot); color: #fff; cursor: pointer;
  font: bold 12px Arial, Helvetica, sans-serif;
}
.sw-fuss a { font-size: 12px; color: var(--muted); }

/* ------------------------------------------------------------- Tabellen */
.tablewrap {
  overflow: auto; max-height: calc(100vh - 230px);
  background: var(--panel);
  border: 1px solid var(--line-zart); border-radius: var(--radius);
  box-shadow: var(--schatten);
}
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 12.5px; }
th, td { text-align: left; padding: 7px 12px; white-space: nowrap; vertical-align: top; }
th {
  background: var(--kopf-bg); color: var(--ink);
  font-weight: bold; font-size: 11.5px;
  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: 1px solid var(--line-zart); max-width: 320px;
  white-space: normal; font-weight: bold;
}
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: 3px; }

.pager { display: flex; gap: 4px; flex-wrap: wrap; margin: 14px 0; font-size: 12px; }
.pager a, .pager span {
  padding: 6px 11px; 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: 24px 0 10px; color: var(--cc-rot); }
.detail {
  display: grid; grid-template-columns: 230px 1fr;
  background: var(--panel); border: 1px solid var(--line-zart);
  border-radius: var(--radius); overflow: hidden; margin: 0 0 18px;
  box-shadow: var(--schatten);
}
.detail dt {
  padding: 9px 16px; font-size: 12px; font-weight: bold; color: var(--muted);
  background: var(--kopf-bg); border-bottom: 1px solid var(--line-zart);
}
.detail dd {
  padding: 9px 16px; margin: 0; border-bottom: 1px solid var(--line-zart);
  overflow-wrap: anywhere; white-space: normal;
}
.detail dd .badge + .badge { margin-left: 4px; }

@media (max-width: 760px) {
  .grid2 { grid-template-columns: 1fr; }
  .detail { grid-template-columns: 1fr; }
  .detail dt { border-bottom: 0; padding-bottom: 2px; }
  main, .topinner, .crumbwrap { padding-left: 14px; padding-right: 14px; }
  td.haft, th.haft { position: static; }
  .tablewrap { max-height: none; }
}

/* =========================================================== Menü oben */
.menue {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 8px; margin-bottom: 18px;
}
.menue .card { background: var(--panel); box-shadow: var(--schatten); }
.card.ist-meeting { border-color: var(--cc-rot); }
.card.ist-meeting .lbl { color: var(--cc-rot); }
.card.ist-meeting .cnt { font-size: 10px; text-transform: uppercase; letter-spacing: .4px; }

/* ==================================================== 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; }
.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 */
.brand { display: inline-flex; align-items: center; }
.brand-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.marke { height: 30px; width: auto; display: block; }
.marke-block { fill: var(--cc-rot); }
.marke-linie { fill: #FFFFFF; }
.marke-wort {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11.5px; font-weight: bold; letter-spacing: 1.6px;
  fill: var(--ink);
}
.marke-wort-2 { fill: var(--cc-rot); }
.brand:hover .marke-block { fill: var(--cc-rot-dunkel); }
.brand:hover { text-decoration: none; }

.pt-marke { display: inline-flex; align-items: center; margin-right: 4px; }
.pt-marke .marke { height: 34px; }
.pt-marke:hover { text-decoration: none; }

@media (max-width: 520px) {
  .marke { height: 26px; }
}
