/* Gemeinsame Optik der Hausprogramme (Startseite/gestaltung/GESTALTUNG.md, Torsten 04.11.2026; Vorlage
   entwurf-teamkit.css). Grundwerte §1, Navigation §2, „← Zurück“ §3. Gleicher Block in PersonalKit und CampusKit. */
:root {
  --violett: #7b1fa8;
  --violett-dunkel: #5c1580;
  --violett-aktiv: #4a1070;
  --violett-hell: #f3e8ff;
  --nav: #4a1070;
  --flaeche: #f6f4fa;
  --rand: #e6e1ee;
  --text: #0f172a;
  --leise: #475569;
  --fokus: #a855f7;
  --violett-zart: #e9d5ff;
  --rand-knopf: #d8c7ea;
  --schatten-farbe: rgb(74 16 112 / 25%);
  --schatten: 0 1px 2px rgb(15 23 42 / 6%), 0 4px 12px rgb(15 23 42 / 6%);
}
/* Betriebsfarbe MK-Portal (Torsten 04.11.2026 „Betriebsfarbe je Programm“): Magenta, abgeleitet aus der MK-Farbe
   #e0187c. ANNAHME HK Personal & Dienstplan: Aktion #c8106b statt #e0187c, weil Weiß darauf 5,6:1 statt knapp 4,57:1
   erreicht; Abstufungen in tests/test_optik.py gemessen. Die Namen --violett… bleiben (eine Stelle, beide Betriebe). */
:root[data-betrieb="mk"] {
  --violett: #c8106b;
  --violett-dunkel: #a00d55;
  --violett-aktiv: #6e0a3c;
  --violett-hell: #fde8f3;
  --violett-zart: #fbcfe8;
  --nav: #6e0a3c;
  --fokus: #db2777;
  --rand-knopf: #f3bfd9;
  --schatten-farbe: rgb(110 10 60 / 25%);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background: var(--flaeche);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
.sym { width: 20px; height: 20px; flex: none; }
/* Kopfleiste: dunkles Violett (§1), klebt oben */
.kopf {
  background: var(--nav);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px 16px;
  padding: 12px 24px;
  flex-wrap: wrap;
  box-shadow: 0 2px 10px var(--schatten-farbe);
  position: sticky;
  top: 0;
  z-index: 20;
}
.marke { color: #fff; font-weight: 700; font-size: 20px; letter-spacing: -.01em; text-decoration: none; }
/* „← Zurück“ und der Rückweg in die aufrufende App als helle Pille wie in TeamKit */
.zurueck, .herkunft {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
  border: 1.5px solid rgb(255 255 255 / 35%);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.herkunft { padding-left: 14px; }
.zurueck:hover, .herkunft:hover { color: #fff; background: rgb(255 255 255 / 12%); }
.zurueck:active, .herkunft:active { transform: translateY(1px); }
/* Konto rechts in der Kopfzeile wie TeamKit (nur PC) */
.konto { margin-left: auto; display: flex; align-items: center; gap: 4px; min-width: 0; }
.konto .wer { color: var(--violett-hell); font-size: 14px; padding: 8px 4px; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.konto a { display: inline-flex; align-items: center; gap: 7px; color: var(--violett-hell); text-decoration: none; padding: 9px 12px;
  border-radius: 10px; font-size: 15px; font-weight: 500; white-space: nowrap; }
.konto a:hover { background: rgb(255 255 255 / 12%); color: #fff; }
.leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; flex: 1 1 auto; }
.leiste a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--violett-hell);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 9px 12px;
  border-radius: 10px;
  transition: background .12s;
}
.leiste a .sym { width: 19px; height: 19px; }
.leiste a:hover { background: rgb(255 255 255 / 12%); color: #fff; }
.leiste a.aktiv { background: rgb(255 255 255 / 16%); box-shadow: inset 0 -2px 0 var(--violett-zart); color: #fff; }
.leiste a.abmelden { margin-left: auto; }
.mehr-knopf { display: none; }
main { max-width: 880px; margin: 0 auto; padding: 28px 24px 40px; }
.fuss { text-align: center; color: var(--leise); font-size: 14px; padding: 24px 16px; }
h1 { font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; margin: 4px 0 20px; }
h2 { font-size: 18px; font-weight: 700; line-height: 1.35; margin: 0 0 12px; }
h3 { font-size: 16px; font-weight: 700; margin: 14px 0 6px; }
.karte {
  background: #fff;
  border: 1px solid var(--rand);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--schatten);
}
.mini { color: var(--leise); font-size: 14px; }
.meldung { border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-size: 16px; }
.meldung.ok { background: #dcfce7; color: #14532d; }
.meldung.fehler { background: #fee2e2; color: #7f1d1d; }
.meldung.hinweis { background: #e0f2fe; color: #0c4a6e; }
/* Links: im Fließtext unterstrichen, eigenständige Titel fett ohne Unterstreichung (§1) */
a { color: var(--violett-dunkel); text-underline-offset: 3px; }
h2 a, h3 a, li > a:only-child, a.titel { color: var(--text); font-weight: 600; text-decoration: none; }
h2 a:hover, h3 a:hover, li > a:only-child:hover, a.titel:hover { color: var(--violett); text-decoration: underline; }
/* Formulare: Beschriftung über dem Feld, Felder mind. 48 px (§1) */
label { display: block; margin-bottom: 14px; font-size: 16px; font-weight: 600; }
input, select, textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  margin-top: 6px;
  padding: 12px 14px;
  font-size: 16px;
  font-weight: 400;
  color: var(--text);
  border: 1.5px solid #d4cde0;
  border-radius: 12px;
  background: #fff;
  font-family: inherit;
}
input[type=checkbox], input[type=radio] {
  display: inline-block;
  width: 20px;
  height: 20px;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--violett);
  vertical-align: -4px;
}
input[type=file] { padding: 10px; }
.reihe { display: flex; gap: 12px; }
.reihe label { flex: 1; min-width: 0; }
/* Knöpfe: Hauptknopf gefüllt, Nebenknopf weiß mit violettem Rand, sichtbares Nachgeben (§1) */
button.knopf, a.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--violett);
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 11px 20px;
  min-height: 46px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  margin-top: 4px;
  box-shadow: 0 1px 2px var(--schatten-farbe);
  transition: background .12s, transform .06s;
}
button.knopf:hover, a.knopf:hover { background: var(--violett-dunkel); }
button.knopf:active, a.knopf:active { background: var(--violett-aktiv); transform: translateY(1px); box-shadow: inset 0 2px 4px rgb(0 0 0 / 20%); }
.knopf.zweitrangig { background: #fff; color: var(--violett-dunkel); border: 1.5px solid var(--rand-knopf); box-shadow: none; }
.knopf.zweitrangig:hover { background: var(--violett-hell); }
.knopf.zweitrangig:active { background: var(--violett-zart); }
.knopf-reihe { display: flex; gap: 10px; flex-wrap: wrap; }
.knopf-reihe .knopf { flex: 1 1 160px; }
/* Fokus nie entfernen (§1) */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
summary:focus-visible { outline: 3px solid var(--fokus); outline-offset: 2px; }
/* Handy (≤ 760 px): Leiste unten, höchstens 5 Ziele, Seltenes unter „Mehr“ (§2) */
@media (max-width: 760px) {
  .kopf { padding: 10px 16px; gap: 8px 10px; }
  .marke { font-size: 18px; }
  .zurueck { padding: 6px 12px 6px 8px; }
  .herkunft, .konto { display: none; }
  .leiste {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    background: #fff;
    border-top: 1px solid var(--rand);
    box-shadow: 0 -4px 16px rgb(15 23 42 / 8%);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    flex-wrap: nowrap;
    gap: 0;
  }
  .leiste a, .mehr-knopf {
    flex: 1 1 0;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    color: var(--leise);
    font-size: 11.5px;
    font-weight: 500;
    padding: 6px 2px;
    border-radius: 10px;
  }
  .leiste a > span, .mehr-knopf > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .leiste a .sym, .mehr-knopf .sym { width: 24px; height: 24px; }
  .leiste .vorsatz { display: none; }                 /* „Mein Dienstplan“ → „Dienstplan“ unten in der Leiste */
  .leiste a:hover { background: var(--violett-hell); color: var(--violett-dunkel); }
  .leiste a.aktiv { background: none; box-shadow: none; color: var(--violett); font-weight: 700; }
  .leiste a.abmelden { margin-left: 0; }
  .leiste a.selten { display: none; }
  .mehr-knopf { display: inline-flex; align-items: center; background: none; border: 0; font-family: inherit; cursor: pointer; }
  .leiste.offen { flex-wrap: wrap; border-radius: 16px 16px 0 0; padding-top: 10px; }
  .leiste.offen a.selten { display: flex; order: -1; flex: 1 1 33%; max-width: 33.4%; padding: 10px 2px; }
  .leiste.offen .mehr-knopf { color: var(--violett); }
  .leiste.offen::after { content: ""; flex-basis: 100%; order: -1; height: 4px; }   /* Hauptziele bleiben eine eigene Zeile */
  .leiste a > span[data-kurz] { font-size: 0; }
  .leiste a > span[data-kurz]::after { content: attr(data-kurz); font-size: 11.5px; }   /* Kurzwort nur unten */
  main { padding: 20px 16px 104px; }
  .fuss { padding-bottom: 104px; }
  h1 { font-size: 24px; }
}
@media print {
  .zurueck, .herkunft, .konto, .leiste, .mehr-knopf { display: none; }
  .kopf { position: static; box-shadow: none; }
  body.mit-leiste { padding-left: 0; }
  body.mit-leiste .kopf { margin-left: 0; }
}
table { width: 100%; border-collapse: collapse; font-size: 16px; }
td { padding: 10px 8px; border-bottom: 1px solid var(--rand); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
table.plan td.tag, td.tag { white-space: nowrap; width: 1%; padding-right: 14px; }
tr.wochenende { background: #f8fafc; }
tr.wochenende td.tag { color: var(--violett); font-weight: 600; }
tr.heute td { background: var(--violett-hell); }
.karte.mitteilung { border-left: 6px solid var(--violett); }
td.nummern { text-align: right; }
.frei-person { border-bottom: 1px solid #e2e8f0; padding: 4px 0; }
.frei-person:last-child { border-bottom: 0; }
.frei-person summary {
  cursor: pointer;
  padding: 10px 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--violett-dunkel);
}
.frei-person[open] summary { color: var(--violett); }
.frei-person .tel-link { margin: 0 6px 8px 4px; }
.tel-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  white-space: nowrap;
  padding: 6px 10px;
  margin: 2px 0;
  border-radius: 8px;
  background: var(--violett-hell);
  color: var(--violett-dunkel);
  font-weight: 600;
  text-decoration: none;
}
.iban-zeile { display: flex; gap: 8px; align-items: center; }
.iban-zeile input { min-width: 0; }
.iban-de {
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 4px;
  font-weight: 700;
}
.tausch-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  background: var(--violett);
  color: #fff;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  margin-left: 6px;
}
.tausch-link:hover { background: var(--violett-dunkel); }
.tausch-eintrag {
  background: #f8fafc;
  box-shadow: none;
  border: 1px solid #e2e8f0;
  margin-bottom: 10px;
}
.stunden-reihe { display: flex; gap: 10px; flex-wrap: wrap; }
.stunden-wert {
  flex: 1 1 120px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
}
.stunden-wert span { display: block; }
.stunden-wert strong { font-size: 18px; }
.stunden-wert.ueber { background: #fef3c7; border-color: #fcd34d; }
.stunden-wert.unter { background: #e0f2fe; border-color: #7dd3fc; }
.monat-waehler {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.monat-waehler .knopf { margin-top: 0; padding: 8px 14px; }
.filter { margin-bottom: 8px; }
.anmelde-box { max-width: 380px; margin: 48px auto; }
.antrag p { margin: 4px 0; }
@media (max-width: 800px) {
  .anmelde-box { margin-top: 16px; }
}
.feld-hinweis {
  display: inline-block;
  background: #fef3c7;
  color: #92400e;
  border-radius: 6px;
  padding: 1px 8px;
  font-size: 14px;
  font-weight: 600;
  margin-left: 4px;
}

/* Tauschvorschau: beide Personen an beiden Tagen (02.11.2026) */
.tausch-vorschau { margin-bottom: 12px; }
.tausch-vorschau th { text-align: left; font-size: 14px; color: var(--leise); font-weight: 600; padding: 4px 6px; }

/* Einheitlicher Knopf „BW-Portal“ aller Apps — wörtlich aus Startseite/SSO-VERTRAG.md §6 (Torsten 03.11.2026) */
.bw-portal{display:inline-flex;align-items:center;gap:8px;padding:5px 12px 5px 5px;border-radius:999px;background:#2a1250;color:#fff!important;font:600 14px/1 Arial,Helvetica,sans-serif;text-decoration:none;white-space:nowrap}
.bw-portal:hover,.bw-portal:focus-visible{background:#3a1670;outline:none}
.bw-portal-logo{width:24px;height:24px;border-radius:7px;background:linear-gradient(135deg,#f4b942,#ff8a5c);color:#2a1250;display:grid;place-items:center;font-size:11px;font-weight:800;letter-spacing:.02em}
@media print{.bw-portal{display:none}}

/* Rechtevergabe und Konten-Einsicht (rechte.py, 03.11.2026) */
.rechte-haken { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; }
.rechte-haken .haken { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 400; }
.rechte-haken .haken.gesperrt { color: var(--leise); }

/* Konto bedienen (bedienen.py): Leiste über jeder Seite, solange ein fremdes Konto offen ist */
.bedien-leiste form { display: inline-block; margin: 8px 0 0; }
.bedien-pruefung { margin: 6px 0 10px; padding-left: 18px; }

/* PC: Bereiche als Leiste links (Symbol über Wort, aktiver Bereich mit Balken) und Kopfzeile einzeilig darüber — wie
   TeamKit (App-Leiste nach MS Teams, TeamKit 0fdadbe) [Auftrag Torsten 12.11.2026 über HK Koordination: CampusKit und
   PersonalKit auf das Facelifting von TeamKit und HouseKit bringen]. Nur CSS; das Handy (≤ 760 px) bleibt unverändert.
   Gleicher Block in PersonalKit und CampusKit. */
@media screen and (min-width: 761px) {
  :root { --kopf-hoehe: 64px; --schiene: 88px; }
  .kopf { height: var(--kopf-hoehe); flex-wrap: nowrap; padding: 0 20px; gap: 12px 16px; }
  body.mit-leiste { padding-left: var(--schiene); }
  body.mit-leiste .kopf { margin-left: calc(-1 * var(--schiene)); }
  .kopf .leiste { position: fixed; z-index: 15; top: var(--kopf-hoehe); left: 0; bottom: 0; width: var(--schiene); margin: 0;
    padding: 8px 4px; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 2px; background: #fff;
    border-right: 1px solid var(--rand); overflow-y: auto; }
  .kopf .leiste a { position: relative; flex: none; flex-direction: column; justify-content: center; gap: 3px; min-height: 58px;
    padding: 6px 2px; border-radius: 8px; color: var(--leise); font-size: 12px; font-weight: 600; line-height: 1.2;
    text-align: center; }
  .kopf .leiste a > span { max-width: 100%; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
  .kopf .leiste a .sym { width: 24px; height: 24px; }
  .kopf .leiste a:hover { background: var(--violett-hell); color: var(--text); }
  .kopf .leiste a.aktiv { background: var(--violett-hell); color: var(--violett-aktiv); box-shadow: inset 3px 0 0 var(--violett); }
  .kopf .leiste a.aktiv .sym { stroke-width: 2.2; }
  .kopf .leiste a.abmelden, .kopf .leiste a.portal, .kopf .leiste .vorsatz { display: none; }   /* stehen oben in der Kopfzeile */
}
/* Schmaler PC (761–1100 px): Name im Konto weg, „Abmelden“ nur als Symbol (Wort bleibt für Vorleser), das
   Betriebs-Abzeichen kürzt mit „…“ — die Kopfzeile bleibt einzeilig ohne seitlichen Überlauf */
@media screen and (min-width: 761px) and (max-width: 1100px) {
  .kopf { gap: 12px; }
  .betrieb-abzeichen { min-width: 0; flex-shrink: 1; }
  .konto .wer { display: none; }
  .konto a { padding: 9px 10px; }
  .konto a > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
