:root {
  --grund: #f5f4f0;
  --flaeche: #ffffff;
  --text: #1b2432;
  --gedaempft: #5b6472;
  --rand: #e4e1d9;
  --zeile: #f0ede6;
  --kenn: #12365e;
  --kenn-hell: #e8eef5;
  --t-kenn: #12365e;
  --t-zweig: #12365e;
  --t-personal: #1c6543;
  --t-schueler: #87560f;
  --t-plan: #463c74;
  --t-fin: #7a2f46;
  --t-erz: #14615c;
  --t-verw: #3d4a5c;
  --t-pers: #5a4a2f;
  --r: 12px;
  --schatten: 0 1px 2px rgb(16 32 54 / 6%), 0 6px 20px rgb(16 32 54 / 6%);
  --kopfhoehe: 58px;
  --hinweishoehe: 28px;
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  overflow: hidden;
  font-family: system-ui, 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--grund);
  color: var(--text);
  font-size: 14.5px;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
}
[hidden] {
  display: none !important;
}

.entwurf {
  height: var(--hinweishoehe);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  background: #fff4d6;
  color: #6b4b00;
  font-size: 12.5px;
  border-bottom: 1px solid #ecd9a0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Kopfleiste */
.kopf {
  height: var(--kopfhoehe);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 20px;
  background: var(--kenn);
  color: #fff;
}
.menueknopf {
  display: none;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 9px;
  background: rgb(255 255 255 / 12%);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}
.marke {
  font-weight: 800;
  letter-spacing: 0.12em;
  font-size: 19px;
  white-space: nowrap;
}
.marke small {
  font-weight: 400;
  letter-spacing: 0;
  opacity: 0.8;
  font-size: 13.5px;
  margin-left: 8px;
}
.suche {
  position: relative;
  flex: 1;
  max-width: 560px;
  margin: 0 auto;
}
.suche input {
  width: 100%;
  height: 38px;
  padding: 0 14px 0 34px;
  border-radius: 10px;
  border: 1px solid rgb(255 255 255 / 18%);
  background: rgb(255 255 255 / 12%);
  color: #fff;
  font: inherit;
}
.suche input::placeholder {
  color: rgb(255 255 255 / 70%);
}
.suche::before {
  content: '⌕';
  position: absolute;
  left: 12px;
  top: 8px;
  color: rgb(255 255 255 / 75%);
}
.treffer {
  position: absolute;
  top: 44px;
  left: 0;
  right: 0;
  z-index: 30;
  background: #fff;
  color: var(--text);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgb(16 32 54 / 25%);
  max-height: 360px;
  overflow-y: auto;
  padding: 6px;
}
.treffer a {
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 7px;
}
.treffer a:hover,
.treffer a.gewaehlt {
  background: var(--kenn-hell);
}
.treffer small {
  color: var(--gedaempft);
  white-space: nowrap;
}
.keintreffer {
  padding: 10px;
  font-size: 13px;
  color: var(--gedaempft);
}
/* Schriftzug CAMPUS: führt zur leeren Startseite und lädt neu */
a.marke {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
a.marke:hover,
a.marke:focus-visible {
  opacity: 0.85;
  outline-offset: 4px;
}
/* Sichtbarer Fokus für die Bedienung mit der Tastatur; in der dunklen Kopfzeile weiß */
:focus-visible {
  outline: 3px solid var(--kenn);
  outline-offset: 2px;
}
.kopf :focus-visible {
  outline-color: #fff;
}
/* Sprungmarke zum Hauptinhalt: nur bei Tastaturfokus sichtbar */
.sprungmarke {
  position: fixed;
  top: 6px;
  left: 6px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--flaeche);
  color: var(--kenn);
  font-weight: 700;
  transform: translateY(-160%);
}
.sprungmarke:focus {
  transform: none;
}
/* Bewegung unterdrücken, sofern im Betriebssystem festgelegt */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
/* Suche über sämtliche Bestände: Treffer nach Art gegliedert */
.treffer {
  max-height: min(70vh, 560px);
  overflow-y: auto;
}
.treffer .trefferart {
  padding: 8px 10px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gedaempft);
}
.treffer a span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.treffer mark {
  background: #fde7a8;
  color: inherit;
  border-radius: 2px;
}
/* Leere Startseite mit dem Zeichen von CAMPUS (gleiches Zeichen wie auf der Seite der Stellvertretung) */
.seite.seite--leer {
  display: grid;
  place-items: center;
  padding: 0;
  background: radial-gradient(circle at 50% 45%, #eef1f6 0%, #fbfbfd 62%);
  border: 1px solid #e3e6ec;
  border-radius: 10px;
}
.startseite-marke {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  opacity: 0.16;
  user-select: none;
  pointer-events: none;
}
.startseite-marke img {
  width: min(380px, 70vw);
  max-width: 100%;
  height: auto;
}
.startseite-marke span {
  font-weight: 800;
  letter-spacing: 0.3em;
  font-size: clamp(28px, 5vw, 54px);
  color: var(--kenn);
}
.kopf-rechts {
  display: flex;
  align-items: center;
  gap: 16px;
  white-space: nowrap;
}
.symbolknopf {
  position: relative;
  border: 0;
  background: none;
  color: #fff;
  font-size: 19px;
  cursor: pointer;
  padding: 4px;
}
.symbolknopf b:not(:empty) {
  position: absolute;
  top: -2px;
  right: -6px;
  background: #e97a1f;
  /* dunkle Schrift auf dem Orange: weiß erreichte nur rund 3 : 1 */
  color: var(--text);
  font-size: 10.5px;
  border-radius: 99px;
  padding: 1px 5px;
}
.avatar {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #e97a1f;
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.jahrwahl {
  height: 32px;
  border-radius: 8px;
  border: 0;
  font: inherit;
  font-size: 13px;
  padding: 0 6px;
}
.kontobereich {
  position: relative;
}
.kontomenue {
  position: absolute;
  right: 0;
  top: 44px;
  z-index: 50;
  width: 280px;
  background: #fff;
  color: var(--text);
  border-radius: 12px;
  box-shadow: 0 14px 36px rgb(16 32 54 / 28%);
  padding: 6px;
  white-space: normal;
}
.kontomenue .kontokopf {
  padding: 10px 12px;
  border-bottom: 1px solid var(--rand);
  margin-bottom: 4px;
  font-size: 13px;
}
.kontomenue .kontokopf b {
  display: block;
  font-size: 14px;
}
.kontomenue .kontokopf small {
  color: var(--gedaempft);
}
.kontomenue a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13.5px;
}
.kontomenue a:hover {
  background: var(--kenn-hell);
}

/* Aufbau */
.rahmen {
  height: calc(100% - var(--kopfhoehe) - var(--hinweishoehe));
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
}
.leiste {
  background: var(--flaeche);
  border-right: 1px solid var(--rand);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.menue {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 10px;
}
.gruppe + .gruppe {
  margin-top: 2px;
}
.hauptknopf {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.hauptknopf:hover {
  background: #f3f1ec;
}
.hauptknopf .punkt {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 12.5px;
  color: #fff;
  background: var(--ton);
  flex: none;
}
.hauptknopf .pfeil {
  margin-left: auto;
  color: var(--gedaempft);
  font-size: 12px;
  transition: transform 0.15s ease;
}
.gruppe.offen .hauptknopf {
  background: color-mix(in srgb, var(--ton) 9%, white);
  color: var(--ton);
}
.gruppe.offen .hauptknopf .pfeil {
  transform: rotate(90deg);
}
.unterliste {
  display: none;
  margin: 4px 0 8px 23px;
  padding-left: 12px;
  border-left: 2px solid color-mix(in srgb, var(--ton) 25%, white);
}
.gruppe.offen .unterliste {
  display: block;
}
.unterknopf {
  display: block;
  width: 100%;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  color: #333c49;
}
.unterknopf:hover {
  background: #f3f1ec;
}
.unterknopf.aktiv {
  background: color-mix(in srgb, var(--ton) 13%, white);
  color: var(--ton);
  font-weight: 700;
}
.angemeldet {
  padding: 12px 20px 14px;
  border-top: 1px solid var(--rand);
  font-size: 12.5px;
  color: var(--gedaempft);
}
.angemeldet b {
  display: block;
  color: var(--text);
}

/* Inhaltsbereich */
.inhaltsbereich {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.seite {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 22px 18px;
  min-height: 0;
}
.seitenkopf {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  flex: none;
}
.seitentitel {
  min-width: 0;
}
.pfad {
  font-size: 12.5px;
  color: var(--gedaempft);
}
.pfad b {
  color: var(--ton);
}
.seitenkopf h1 {
  margin: 2px 0 0;
  font-size: 22px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.aktionen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.kopfleiste {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-left: 8px;
  border-left: 1px solid var(--rand);
}
.speicherstand {
  font-size: 12px;
  color: var(--gedaempft);
  white-space: nowrap;
}
.speicherstand.offen {
  color: #b45309;
  font-weight: 700;
}
.speicherstand.fehler {
  color: #9b2c2c;
  font-weight: 700;
  white-space: normal;
}
.speicherstand.dienst {
  color: #1c5a36;
  font-weight: 700;
}
/* Dienstbetrieb: Anmeldung, Ladehinweis, Nacharbeit, Feldfehler */
.anmeldeschleier {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgb(16 32 54 / 45%);
}
.anmeldekarte {
  width: min(440px, 100%);
  display: grid;
  gap: 12px;
  padding: 22px;
  border-radius: var(--r);
  background: var(--flaeche);
  box-shadow: var(--schatten);
}
.anmeldekarte h2 {
  margin: 0;
  font-size: 19px;
}
.anmeldekarte p {
  margin: 0;
  color: var(--gedaempft);
  font-size: 13px;
}
.anmeldekarte .aktionen {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.anmeldekarte .anmeldefehler {
  color: #9b2c2c;
  font-weight: 600;
}
.ladehinweis {
  padding: 28px;
  border-radius: var(--r);
  background: var(--flaeche);
  color: var(--gedaempft);
  box-shadow: var(--schatten);
}
.nacharbeit {
  position: fixed;
  left: 50%;
  top: calc(var(--kopfhoehe) + 10px);
  z-index: 70;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: min(760px, calc(100% - 24px));
  padding: 10px 14px;
  border: 1px solid #b45309;
  border-radius: var(--r);
  background: #fff7ed;
  transform: translateX(-50%);
}
.nacharbeit span {
  flex: 1 1 260px;
}
.feldfehler {
  color: #9b2c2c !important;
  font-weight: 600;
}
.knopf {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  border: 1px solid var(--rand);
  background: var(--flaeche);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  white-space: nowrap;
  color: var(--text);
}
.knopf:hover {
  border-color: color-mix(in srgb, var(--ton, var(--kenn)) 40%, white);
}
.knopf.haupt {
  background: var(--ton, var(--kenn));
  border-color: var(--ton, var(--kenn));
  color: #fff;
}
.knopf.klein {
  height: 30px;
  padding: 0 10px;
  font-size: 12.5px;
}
.verweis {
  color: var(--kenn);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.navleiste {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.kacheln {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  flex: none;
}
.kachel {
  background: var(--flaeche);
  border-radius: var(--r);
  box-shadow: var(--schatten);
  padding: 10px 14px;
  border-top: 4px solid var(--kt, var(--ton));
  min-width: 0;
}
.kachel.verlinkt {
  cursor: pointer;
}
.kachel.verlinkt:hover {
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--kt, var(--ton)) 30%, white),
    var(--schatten);
}
.kachel span {
  display: block;
  font-size: 12.5px;
  line-height: 1.3;
  color: var(--gedaempft);
  overflow-wrap: anywhere;
}
.kachel strong {
  display: block;
  font-size: 22px;
  line-height: 1.2;
  margin: 2px 0;
  overflow-wrap: anywhere;
}
.kachel small {
  display: block;
  font-size: 12px;
  line-height: 1.3;
  color: var(--gedaempft);
  overflow-wrap: anywhere;
}
.kacheln.innen {
  padding: 12px 16px;
}
.kacheln.innen .kachel {
  box-shadow: none;
  border: 1px solid var(--rand);
  border-top-width: 4px;
}

.koerper {
  flex: 1;
  min-height: 0;
  display: grid;
  gap: 14px;
}
.raster-1 {
  grid-template-columns: minmax(0, 1fr);
}
.raster-21 {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
}
.raster-11 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.raster-12 {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
}
.stapel {
  display: grid;
  gap: 14px;
  min-height: 0;
  grid-auto-rows: minmax(0, 1fr);
}

.panel {
  background: var(--flaeche);
  border-radius: var(--r);
  box-shadow: var(--schatten);
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}
.panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--rand);
  flex: none;
}
.panel > header h2 {
  margin: 0;
  font-size: 15px;
  line-height: 1.3;
  min-width: 0;
  overflow-wrap: anywhere;
}
.panel > header small {
  color: var(--gedaempft);
  font-size: 12px;
  text-align: right;
}
.panel-inhalt {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.panel-inhalt.polster {
  padding: 14px 16px;
}
.panel > footer {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
  padding: 8px 16px;
  border-top: 1px solid var(--rand);
  font-size: 12.5px;
  color: var(--gedaempft);
}
.panel > footer b {
  color: var(--text);
}

/* Tabellen */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
th,
td {
  padding: 7px 12px;
  text-align: left;
  white-space: nowrap;
}
th.r,
td.r {
  text-align: right;
}
thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gedaempft);
  background: #faf9f6;
  border-bottom: 1px solid var(--rand);
}
tbody tr + tr td {
  border-top: 1px solid var(--zeile);
}
tbody tr.waehlbar {
  cursor: pointer;
}
tbody tr.waehlbar:hover td {
  background: #faf8f3;
}
tbody tr.gewaehlt td {
  background: color-mix(in srgb, var(--ton) 9%, white);
}
tfoot td {
  position: sticky;
  bottom: 0;
  font-weight: 700;
  background: #faf9f6;
  border-top: 2px solid var(--rand);
}
/* Gesamtprofil: eine einzige, rein anzeigende Tabelle (Schülerprofil) */
.profiltabelle th,
.profiltabelle td {
  white-space: normal;
  vertical-align: top;
}
.profiltabelle tbody > tr > th {
  width: 260px;
  color: var(--gedaempft);
  font-weight: 600;
}
.profiltabelle tr.pt-gruppe th {
  background: #faf9f6;
  color: var(--text);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-top: 2px solid var(--rand);
  border-bottom: 1px solid var(--rand);
}
.profiltabelle .pt-leer {
  color: var(--gedaempft);
}
.profiltabelle .pt-liste {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.profiltabelle .pt-posten + .pt-posten {
  border-top: 1px dotted var(--zeile);
  padding-top: 3px;
}
@media (max-width: 640px) {
  .profiltabelle tbody > tr > th {
    width: 42%;
  }
}
.etikett {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  color: var(--et, var(--ton));
  background: color-mix(in srgb, var(--et, var(--ton)) 12%, white);
  white-space: nowrap;
}
.tabfuss {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
  padding: 8px 16px;
  border-top: 1px solid var(--rand);
  font-size: 12.5px;
  color: var(--gedaempft);
}
.blaettern {
  display: flex;
  align-items: center;
  gap: 8px;
}
.suchfeld {
  height: 28px;
  border: 1px solid #cfcac0;
  border-radius: 7px;
  padding: 0 8px;
  width: 170px;
  font: inherit;
  font-size: 13px;
}
.zeilenauswahl,
.zelleneingabe {
  height: 30px;
  border: 1px solid #cfcac0;
  border-radius: 7px;
  padding: 0 6px;
  font: inherit;
  font-size: 13px;
  background: #fff;
  max-width: 240px;
}
.zelleneingabe.kurz {
  width: 80px;
}

/* Diagramme und Listen */
.diagramm {
  height: 100%;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  padding: 10px 14px;
}
.diagramm svg {
  flex: 1;
  min-height: 0;
  width: 100%;
}
.legende {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 12px;
  color: var(--gedaempft);
  flex: none;
}
.balkenliste {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px 16px;
}
.balkenliste div {
  display: grid;
  grid-template-columns: minmax(90px, 38%) 1fr auto;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.balkenliste span.name {
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.spur {
  height: 9px;
  border-radius: 99px;
  background: #efece5;
  overflow: hidden;
}
.spur i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--bt, var(--ton));
}
.balkenliste b {
  font-size: 12.5px;
  text-align: right;
  white-space: nowrap;
}
.liste {
  list-style: none;
  margin: 0;
  padding: 4px 0;
}
.liste li {
  display: flex;
  gap: 12px;
  padding: 9px 16px;
  align-items: flex-start;
}
.liste li + li {
  border-top: 1px solid var(--zeile);
}
.liste li.waehlbar {
  cursor: pointer;
}
.liste li.waehlbar:hover {
  background: #faf8f3;
}
.liste .zeit {
  flex: none;
  width: 78px;
  font-weight: 700;
  font-size: 12px;
  color: var(--ton);
  line-height: 1.3;
}
.liste .titel {
  font-size: 13.5px;
  font-weight: 600;
}
.liste .unter {
  font-size: 12px;
  color: var(--gedaempft);
}
.liste .rechts {
  margin-left: auto;
  flex: none;
  display: flex;
  gap: 6px;
  align-items: center;
}

/* Formulare */
.formular {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  padding: 16px;
}
.feld {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.feld.breit {
  grid-column: 1 / -1;
}
.feld label {
  font-size: 12.5px;
  font-weight: 600;
}
.feld small {
  color: var(--gedaempft);
  font-size: 11.5px;
}
.feld input,
.feld select,
.feld textarea {
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid #cfcac0;
  border-radius: 8px;
  background: #fff;
  font: inherit;
}
.feld textarea {
  min-height: 76px;
  resize: vertical;
}
.feld.ankreuz {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.feld.ankreuz input {
  width: auto;
  min-height: auto;
  order: -1;
}
.abschnitt {
  grid-column: 1 / -1;
  padding-top: 8px;
  border-top: 1px solid var(--rand);
  font-size: 13px;
  font-weight: 700;
  color: var(--ton);
}
.formular .aktionen {
  grid-column: 1 / -1;
  justify-content: flex-end;
}
.formular .tabellenfeld {
  grid-column: 1 / -1;
  overflow-x: auto;
  border: 1px solid var(--rand);
  border-radius: 8px;
}
.endpunkt {
  grid-column: 1 / -1;
  font:
    11.5px ui-monospace,
    Consolas,
    monospace;
  color: var(--gedaempft);
  background: #f7f6f2;
  border: 1px dashed var(--rand);
  border-radius: 7px;
  padding: 5px 8px;
  overflow-wrap: anywhere;
}
.endpunkt b {
  color: #8a4b00;
}
.ungueltig {
  border-color: #b42318 !important;
  box-shadow: 0 0 0 3px rgb(180 35 24 / 15%);
}

/* Steckbrief und Text */
.steckbrief {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.steckbrief .kopfzeile {
  display: flex;
  align-items: center;
  gap: 12px;
}
.steckbrief .kreis {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ton);
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  flex: none;
}
.steckbrief .titel {
  font-weight: 700;
  font-size: 16px;
}
.steckbrief .unter {
  color: var(--gedaempft);
  font-size: 12.5px;
}
.steckbrief dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 7px 14px;
  margin: 0;
  font-size: 13px;
}
.steckbrief dt {
  color: var(--gedaempft);
}
.steckbrief dd {
  margin: 0;
  font-weight: 600;
  min-width: 0;
  overflow-wrap: anywhere;
}
.text {
  padding: 12px 16px;
  font-size: 13.5px;
  line-height: 1.55;
}
.text p {
  margin: 0 0 10px;
}
.zweispaltig {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 8px;
}

/* Kalender, Jahresübersicht, Wochenraster */
.kalender {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  height: 100%;
  min-height: 380px;
}
.kalender .wt {
  padding: 6px 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gedaempft);
  background: #faf9f6;
  border-bottom: 1px solid var(--rand);
}
.kalender .tag {
  border-right: 1px solid var(--zeile);
  border-bottom: 1px solid var(--zeile);
  padding: 4px 6px;
  overflow: hidden;
  min-height: 0;
}
.kalender .tag[data-tat] {
  cursor: pointer;
}
.kalender .tag.fremd {
  background: #faf9f6;
  /* gedämpft statt #aaa (rund 2,2 : 1): Tage anderer Monate bleiben lesbar */
  color: var(--gedaempft);
}
.kalender .tag.heute {
  box-shadow: inset 0 0 0 2px var(--ton);
}
.kalender .tag.gewaehlt {
  background: color-mix(in srgb, var(--ton) 11%, white);
}
.kalender .tag > b {
  font-size: 12px;
}
.kalender .ereignis {
  display: block;
  margin-top: 3px;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.25;
  color: #fff;
  background: var(--et, var(--ton));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kalender .mehr {
  display: block;
  font-size: 10.5px;
  color: var(--gedaempft);
}
.jahresraster {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}
.minimonat {
  display: block;
  border: 1px solid var(--rand);
  border-radius: 9px;
  padding: 8px;
  background: #fff;
}
.minimonat:hover {
  box-shadow: var(--schatten);
}
.minimonat h3 {
  margin: 0 0 6px;
  font-size: 13px;
}
.minimonat .tage {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
  font-size: 10.5px;
  text-align: center;
}
.minimonat .tage span {
  padding: 2px 0;
  border-radius: 4px;
}
.minimonat .tage .leer {
  visibility: hidden;
}
.minimonat .tage .frei {
  background: #e3f0ee;
  color: var(--t-erz);
}
.minimonat .tage .anlass {
  background: #fbeedd;
  color: #87560f;
  font-weight: 700;
}
.minimonat .tage .heute {
  outline: 2px solid var(--ton);
}
.minimonat small {
  display: block;
  margin-top: 6px;
  color: var(--gedaempft);
  font-size: 11px;
}
.wochenraster {
  display: grid;
  min-height: 100%;
  min-width: 620px;
}
.wochenraster > div {
  border-right: 1px solid var(--zeile);
  border-bottom: 1px solid var(--zeile);
  padding: 3px 4px;
  font-size: 12px;
  min-width: 0;
  overflow: hidden;
}
.wochenraster .sk {
  background: #faf9f6;
  font-weight: 700;
  color: var(--gedaempft);
  font-size: 11px;
  line-height: 1.3;
}
.wochenraster .stunde {
  background: color-mix(in srgb, var(--ft) 13%, white);
  border-left: 3px solid var(--ft);
  border-radius: 4px;
  padding: 2px 5px;
  margin-bottom: 2px;
  line-height: 1.25;
}
.wochenraster .stunde b {
  display: block;
  font-size: 12px;
}
.wochenraster .stunde small {
  display: block;
  color: var(--gedaempft);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wochenraster .zelle.doppelt {
  background: #fcefef;
}

/* Reiter */
.reiter {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.reiterleiste {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  padding: 0 10px;
  border-bottom: 1px solid var(--rand);
  flex: none;
  background: #fcfbf8;
}
.reiterknopf {
  flex: none;
  padding: 9px 12px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--gedaempft);
  cursor: pointer;
  white-space: nowrap;
}
.reiterknopf.aktiv {
  color: var(--ton);
  border-bottom-color: var(--ton);
}
.reiterinhalt {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.zahlmarke {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: #efece5;
  color: var(--text);
  font-size: 11px;
  text-align: center;
}

/* Hinweise, Filter, Dialog, Rückmeldung */
.hinweisbox {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 12px 16px;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid;
  font-size: 13px;
}
.hinweisbox.hinweis {
  background: #eef4fb;
  border-color: #c9dcf0;
  color: #12365e;
}
.hinweisbox.warnung {
  background: #fdf5e6;
  border-color: #f0d9a8;
  color: #7a4d00;
}
.hinweisbox.fehler {
  background: #fcefef;
  border-color: #efc4c4;
  color: #8a1f1f;
}
.hinweisbox.erfolg {
  background: #edf7f0;
  border-color: #c4e3cd;
  color: #1c5a36;
}
.filterleiste {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--rand);
  background: #fcfbf8;
}
.filterleiste.kompakt {
  padding: 0;
  border: 0;
  background: none;
}
.filterleiste label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--gedaempft);
  min-width: 0;
}
.filterleiste select,
.filterleiste input:not([type='checkbox']) {
  height: 30px;
  border: 1px solid #cfcac0;
  border-radius: 7px;
  padding: 0 8px;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  background: #fff;
  max-width: 230px;
  min-width: 0;
}
.dialoghintergrund {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgb(16 24 36 / 45%);
  display: grid;
  place-items: center;
  padding: 16px;
}
.dialog {
  width: min(760px, 100%);
  max-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgb(0 0 0 / 30%);
  overflow: hidden;
}
.dialog > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--rand);
}
.dialog > header h2 {
  margin: 0;
  font-size: 17px;
}
.dialog > header button {
  border: 0;
  background: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--gedaempft);
}
.dialoginhalt {
  overflow: auto;
  min-height: 0;
}
.rueckmeldung {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 70;
  transform: translateX(-50%);
  background: #1b2432;
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  box-shadow: 0 10px 30px rgb(0 0 0 / 30%);
  max-width: calc(100vw - 32px);
}
.rueckmeldung.fehler {
  background: #8a1f1f;
}
.rueckmeldung.erfolg {
  background: #1c5a36;
}
.schleier {
  display: none;
}
.druckkopf {
  display: none;
}

@media (max-height: 720px), (max-width: 1100px) {
  .inhaltsbereich {
    overflow-y: auto;
  }
  .seite {
    height: auto;
    min-height: 100%;
  }
  .koerper {
    flex: none;
  }
  .panel {
    min-height: 300px;
    max-height: 78vh;
  }
  .stapel {
    grid-auto-rows: auto;
  }
}
@media (max-width: 1100px) {
  .raster-21,
  .raster-11,
  .raster-12 {
    grid-template-columns: minmax(0, 1fr);
  }
  .jahresraster {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  :root {
    --hinweishoehe: 0px;
  }
  .entwurf {
    display: none;
  }
  .menueknopf {
    display: grid;
    place-items: center;
  }
  .suche,
  .marke small,
  .kopf-jahr {
    display: none;
  }
  .kopf {
    gap: 8px;
    padding: 0 10px;
    justify-content: space-between;
  }
  .kopf-rechts {
    gap: 8px;
    min-width: 0;
  }
  .jahrwahl {
    width: 96px;
    max-width: 96px;
    font-size: 12px;
    padding: 0 2px;
  }
  .marke {
    font-size: 16px;
    letter-spacing: 0.08em;
  }
  .kontomenue {
    right: -6px;
    width: min(280px, calc(100vw - 20px));
  }
  .rahmen {
    grid-template-columns: minmax(0, 1fr);
  }
  .leiste {
    position: fixed;
    z-index: 40;
    top: var(--kopfhoehe);
    bottom: 0;
    left: 0;
    width: min(310px, 86vw);
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: 0 10px 30px rgb(0 0 0 / 25%);
  }
  body.menue-offen .leiste {
    transform: none;
  }
  body.menue-offen .schleier {
    display: block;
    position: fixed;
    z-index: 35;
    inset: var(--kopfhoehe) 0 0 0;
    background: rgb(0 0 0 / 30%);
  }
  .seite {
    padding: 12px 12px 16px;
  }
  .kacheln {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .formular,
  .zweispaltig {
    grid-template-columns: minmax(0, 1fr);
  }
  .jahresraster {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kalender .ereignis {
    font-size: 9.5px;
    padding: 1px 3px;
  }
  .kopfleiste {
    border-left: 0;
    padding-left: 0;
  }
  .filterleiste label {
    flex-wrap: wrap;
  }
  .filterleiste select,
  .filterleiste input:not([type='checkbox']) {
    max-width: 100%;
  }
}

/* Druck: Menü, Kopfleiste und Bedienelemente entfallen; der Druckkopf nennt Einrichtung, Seite und Zeitpunkt. */
@media print {
  @page {
    size: A4 landscape;
    margin: 12mm;
  }
  html,
  body {
    height: auto;
    overflow: visible;
    background: #fff;
  }
  .entwurf,
  .kopf,
  .leiste,
  .schleier,
  .seitenkopf .aktionen,
  .filterleiste,
  .blaettern,
  .rueckmeldung,
  .dialoghintergrund,
  .endpunkt,
  .formular .aktionen,
  .reiterleiste {
    display: none !important;
  }
  .druckkopf {
    display: block;
    padding: 0 0 8px;
    margin-bottom: 10px;
    border-bottom: 2px solid #12365e;
    font-size: 12px;
  }
  .rahmen {
    display: block;
    height: auto;
  }
  .inhaltsbereich {
    overflow: visible;
  }
  .seite {
    height: auto;
    padding: 0;
  }
  .koerper,
  .stapel {
    display: block;
  }
  .panel {
    box-shadow: none;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    max-height: none;
    overflow: visible;
    break-inside: avoid-page;
  }
  .panel-inhalt,
  .reiterinhalt {
    overflow: visible;
  }
}
