/* Copyright (c) 2026 Alexandros Savvidis und Anna Bendig. Alle Rechte vorbehalten. */

/* Self-hosted Schriften (DSGVO: kein Google-CDN). Latin-Subset deckt deutsche Umlaute. */
@font-face { font-family: "Anton";   font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/anton-400.912c3c9f2621.woff2") format("woff2"); }
@font-face { font-family: "Antonio"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/antonio-600.2570dbd98e13.woff2") format("woff2"); }
@font-face { font-family: "Antonio"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/antonio-700.1d20bc103178.woff2") format("woff2"); }
@font-face { font-family: "Inter";   font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-400.da03732a27e1.woff2") format("woff2"); }
@font-face { font-family: "Inter";   font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/inter-500.51205681a1ba.woff2") format("woff2"); }
@font-face { font-family: "Inter";   font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/inter-600.2ede57db1a3a.woff2") format("woff2"); }
@font-face { font-family: "Inter";   font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/inter-700.8ca0a5155296.woff2") format("woff2"); }

:root {
  /* Der Seitenhintergrund war mit #f4f6f8 fast so hell wie die weißen Karten -
     die Kacheln hoben sich dadurch kaum ab. Gemessen am Vorbild (Hintergrund
     #ebebeb gegen Karten #fcfcfc) ist dort rund doppelt so viel Unterschied. */
  --al-bg: #edeeea;
  --al-sidebar: #163036;
  --al-sidebar-active: #20414a;
  /* Markenakzent Sales Akademie: Orange als Fläche, dunkles Orange als Textfarbe. */
  --al-accent: #FCA311;
  --al-accent-hover: #e8920c;
  --al-accent-dark: #9a5a00;
  --al-text: #163036;
  --al-muted: #667685;
  --al-border: #e1e6ea;
  --al-card: #ffffff;
  /* Aktiver Navigationspunkt und aktiver Reiter: heller Orange-Ton. */
  --al-aktiv: #fff1d6;
  /* Semantisch „Erfolg/aktiv" bleibt grün - getrennt vom Markenakzent. */
  --al-ok: #1b7f5c;
  --al-ok-dark: #145f45;
  --al-danger: #c0392b;
  --al-warning: #b8860b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  background: var(--al-bg);
  color: var(--al-text);
}

/* ---------------------------------------------------------------- Grundgerüst
   Nach dem Vorbild AZAV Pilot: Seitenleiste und Kopfzeile sind eigene weiße
   Flächen mit runden Ecken, die auf dem grauen Hintergrund liegen - statt
   randlos aneinanderzustoßen. Das trennt die Bereiche sichtbar voneinander. */
.al-layout {
  display: flex;
  gap: 10px;
  padding: 10px;
  min-height: 100vh;
  align-items: flex-start;
}

.al-sidebar {
  width: 248px;
  flex-shrink: 0;
  background: var(--al-sidebar);
  border: 1px solid #0e2227;
  border-radius: 12px;
  color: rgba(255,255,255,.85);
  padding: 18px 0 14px;
  position: sticky;
  top: 10px;
  max-height: calc(100vh - 20px);
  overflow-y: auto;
  /* Flex-Spalte, damit der Konto-Block unten mit margin-top:auto andockt. */
  display: flex;
  flex-direction: column;
}

.al-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px 16px;
  font-family: "Anton", "Antonio", sans-serif;
  font-weight: 400;
  font-size: 1.25rem;
  letter-spacing: .3px;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.12);
  margin-bottom: 10px;
}
.al-mark { font-family: inherit; }
/* Wortmarke zweifarbig wie im Entwurf: „·Live" in CI-Orange, „AZAV" bleibt weiß. */
.al-brand b { color: var(--al-accent); font-weight: 400; }
.al-brand .dot { width: 9px; height: 9px; border-radius: 50%; background: #35d08a; box-shadow: 0 0 0 3px rgba(53, 208, 138, .18); }

.al-nav { padding-bottom: 4px; }

/* Abschnitte werden durch einen Strich getrennt, nicht nur durch Fettschrift -
   bei acht bis zehn Punkten je Gruppe trägt die Schriftstärke allein nicht. */
.al-nav-section {
  margin: 14px 12px 4px;
  padding: 14px 6px 4px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255,255,255,.5);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.al-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 1px 10px;
  padding: 8px 12px;
  border-radius: 8px;
  color: rgba(255,255,255,.80);
  text-decoration: none;
  font-size: 0.92rem;
  line-height: 1.35;
  border-left: 3px solid transparent;
}
.al-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.al-nav a.active {
  background: rgba(252,163,17,.16);
  color: #fff;
  font-weight: 600;
  border-left-color: var(--al-accent);
}

/* Menü-Icons: erben die Linkfarbe über currentColor und färben sich damit im
   aktiven Zustand (weiß) von selbst mit. Nur Konturen, kein Füllen. */
.al-ico {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .82;
}
.al-nav a:hover .al-ico,
.al-nav a.active .al-ico { opacity: 1; }

/* Konto-Block unten in der Sidebar (margin-top:auto dockt ihn an die Unterkante). */
.al-konto {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 12px 2px;
  margin-left: 6px;
  margin-right: 6px;
  border-top: 1px solid rgba(255,255,255,.12);
}
.al-konto-link {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  padding: 6px 8px;
  border-radius: 8px;
  color: rgba(255,255,255,.85);
  text-decoration: none;
}
.al-konto-link:hover { background: rgba(255,255,255,.08); }
.al-konto .al-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  background: var(--al-accent);
  color: var(--al-text);
}
.al-konto-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.al-konto-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.al-konto-rolle { font-size: 0.75rem; color: rgba(255,255,255,.55); }
.al-konto-logout {
  flex: 0 0 auto;
  color: rgba(255,255,255,.6);
  text-decoration: none;
  font-size: 1.1rem;
  line-height: 1;
  padding: 6px 8px;
  border-radius: 8px;
}
.al-konto-logout:hover { color: #fff; background: rgba(255,255,255,.08); }

.al-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }

.al-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  background: var(--al-card);
  border: 1px solid var(--al-border);
  border-radius: 12px;
}

.al-topbar .who { font-size: 0.88rem; color: var(--al-muted); }

/* Benutzerbereich oben rechts: Name/Rolle gestapelt, daneben ein Avatar-Kreis
   in Dunkelblau mit den Initialen - wie im Entwurf. */
.al-user { display: flex; align-items: center; gap: 12px; }
.al-user-info { display: flex; flex-direction: column; line-height: 1.2; text-align: right; }
.al-user-name { font-size: 0.9rem; font-weight: 600; color: var(--al-text); }
.al-user-rolle { font-size: 0.76rem; color: var(--al-muted); }
.al-avatar {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--al-sidebar);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.al-abmelden {
  color: var(--al-muted);
  text-decoration: none;
  font-size: 1.15rem;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 6px;
}
.al-abmelden:hover { color: var(--al-danger); background: var(--al-bg); }

/* Das Vorbild nutzt die Fensterbreite aus; bei 1200px blieb rechts viel leer.
   Nach oben hin bleibt eine Grenze, damit Tabellen auf sehr breiten Schirmen
   nicht auseinanderlaufen. */
.al-content { padding: 18px 18px 40px; max-width: 1600px; }

h1, h2, h3 { font-family: "Antonio", "Inter", sans-serif; font-weight: 700; letter-spacing: .2px; }
h1 { font-size: 1.75rem; margin: 0 0 4px 0; }
h2 { font-size: 1.3rem; margin: 0 0 12px 0; }
.al-subtitle { color: var(--al-muted); margin-bottom: 24px; }

/* Vier feste Spalten: Acht Kacheln ergeben zwei gleich lange Reihen statt eines
   unsymmetrischen Umbruchs, der sich mit der Fensterbreite ändert. */
.al-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
/* Zwei Kacheln sollen nicht auf Viertelbreite schrumpfen. */
.al-cards-zwei { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 620px; }
@media (max-width: 980px) { .al-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .al-cards { grid-template-columns: 1fr; } }

.al-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--al-card);
  border: 1px solid var(--al-border);
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: 0 1px 2px rgba(20, 36, 51, .04);
  color: inherit;
  text-decoration: none;
  transition: border-color .12s, box-shadow .12s, transform .12s;
}
/* Jede Kachel führt irgendwohin - das soll man ihr ansehen. */
a.al-card:hover {
  border-color: var(--al-accent);
  box-shadow: 0 3px 10px rgba(20, 36, 51, .09);
  transform: translateY(-1px);
}
a.al-card:focus-visible {
  outline: 2px solid var(--al-accent);
  outline-offset: 2px;
}

.al-card .label { color: var(--al-muted); font-size: 0.82rem; }
.al-card .value { font-size: 1.7rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Zahlen, hinter denen Arbeit steckt, bleiben still, solange sie null sind. */
.al-card.handlungsbedarf { border-color: #f0c9c3; background: #fffaf9; }
.al-card.handlungsbedarf .value { color: var(--al-danger); }
a.al-card.handlungsbedarf:hover { border-color: var(--al-danger); }

.al-panel {
  background: var(--al-card);
  border: 1px solid var(--al-border);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(20, 36, 51, .04);
  padding: 20px;
  margin-bottom: 22px;
}

table.al-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.al-table th {
  text-align: left;
  color: var(--al-muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--al-border);
  padding: 8px 10px;
}
table.al-table td { padding: 10px; border-bottom: 1px solid var(--al-border); vertical-align: middle; }
table.al-table tr:hover td { background: #fafcfb; }

/* Phase 3: Übersichtstabellen scrollen horizontal IM Panel, statt auf schmalen
   Viewports die ganze Seite breitzuziehen. */
.al-panel:has(table.al-table) { overflow-x: auto; }
table.al-table { min-width: 600px; }

.al-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.al-badge.aktiv { background: #e4f5ec; color: var(--al-ok-dark); }
.al-badge.geplant { background: #eef1f4; color: var(--al-muted); }
.al-badge.beendet { background: #e9edf1; color: #445; }
.al-badge.abgebrochen, .al-badge.unentschuldigt { background: #fbe6e3; color: var(--al-danger); }
.al-badge.warn { background: #fdf1da; color: var(--al-warning); }

.al-btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--al-accent);
  color: var(--al-text) !important;
  text-decoration: none;
  font-size: 0.88rem;
  border: none;
  cursor: pointer;
}
.al-btn:hover { background: var(--al-accent-hover); }
.al-btn.secondary { background: #eef1f4; color: var(--al-text) !important; }
.al-btn.secondary:hover { background: #e1e6ea; }

/* Reiter sitzen wie im Vorbild in einer eigenen weißen Fläche, der aktive ist
   eine mintgrüne Pille statt eines Unterstrichs. */
.al-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-self: flex-start;
  background: var(--al-card);
  border: 1px solid var(--al-border);
  border-radius: 10px;
  padding: 6px;
  margin-bottom: 14px;
}
.al-tabs a {
  padding: 7px 14px;
  border-radius: 7px;
  color: #53616e;
  text-decoration: none;
  font-size: 0.9rem;
}
.al-tabs a:hover { background: #f1f4f6; color: var(--al-text); }
.al-tabs a.active { background: var(--al-aktiv); color: var(--al-accent-dark); font-weight: 600; }

/* Auch die Filterchips folgen demselben Mint. */
.al-filterbar a.active { background: var(--al-accent); color: var(--al-text); }

.al-form label { display: block; font-size: 0.85rem; color: var(--al-muted); margin: 12px 0 4px; }
.al-form input, .al-form select, .al-form textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--al-border);
  border-radius: 6px;
  font-size: 0.92rem;
}

/* Phase 3: einheitliche, gestylte Formular-Elemente - weg vom Browser-Grau.
   Filterzeilen-Controls bekommen feste Höhe/Radius; alle Selects eine eigene
   Chevron-Grafik; Fokus durchgängig mit orangem Ring. */
.al-filterbar-eng select, .al-filterbar-eng input[type="text"], .al-filterbar-eng input[type="date"],
.al-filter-zeile select, .al-filter-zeile input[type="text"], .al-filter-zeile input[type="date"] {
  height: 38px; padding: 0 10px; border: 1px solid var(--al-border); border-radius: 8px;
  background: #fff; color: var(--al-text); font: inherit; font-size: 0.9rem;
}
.al-main select {
  appearance: none; -webkit-appearance: none; padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='12'%20height='12'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23667685'%20stroke-width='2.4'%3E%3Cpath%20d='M6%209l6%206%206-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.al-main input:focus, .al-main select:focus, .al-main textarea:focus {
  outline: none; border-color: var(--al-accent); box-shadow: 0 0 0 3px rgba(252,163,17,.22);
}

/* Leerzustände bekommen ein Symbol, damit sie als solche erkennbar sind und
   nicht wie ein vergessener Satz wirken. Gilt für alle vorhandenen Stellen -
   `klein` schaltet es dort ab, wo nur eine Zeile Platz hat. */
.al-empty { color: var(--al-muted); padding: 22px 20px; text-align: center; }
.al-empty::before {
  content: "◎";
  display: block;
  font-size: 24px;
  line-height: 1;
  color: #c7d0d7;
  margin-bottom: 7px;
}
.al-empty.klein { padding: 6px 0; text-align: left; }
.al-empty.klein::before { content: none; }

.al-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--al-sidebar);
}
.al-login-card {
  background: #fff;
  border-radius: 12px;
  padding: 36px;
  width: 340px;
}
.al-login-card h1 { text-align: center; }
.al-login-card .al-btn { width: 100%; margin-top: 14px; text-align: center; }

.al-filterbar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.al-filterbar a {
  padding: 6px 14px;
  border-radius: 999px;
  background: #eef1f4;
  color: var(--al-text);
  text-decoration: none;
  font-size: 0.85rem;
}
.al-filterbar a.active { background: var(--al-accent); color: var(--al-text); }

.al-messages { margin-bottom: 16px; }
.al-messages li { list-style: none; padding: 10px 14px; border-radius: 8px; background: #e4f5ec; margin-bottom: 6px; font-size: 0.9rem; }

/* Anwesenheit: farbcodierte Statusspalten */
.al-status-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.al-status-table th, .al-status-table td { padding: 6px 6px; border-bottom: 1px solid var(--al-border); text-align: center; vertical-align: middle; }
.al-status-table th { color: var(--al-muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.02em; }
.al-status-table td.al-tn-name { text-align: left; font-weight: 600; white-space: nowrap; }
.al-status-cell { display: inline-block; width: 30px; height: 30px; border-radius: 6px; cursor: pointer; position: relative; border: 2px solid transparent; opacity: 0.35; }
.al-status-cell input { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.al-status-cell.checked { opacity: 1; border-color: rgba(0,0,0,0.25); }
.al-status-anwesend { background: #3fae72; }
.al-status-entschuldigt { background: #4a90d9; }
.al-status-krank { background: #9b6fd1; }
.al-status-unentschuldigt { background: #c0392b; }
.al-status-verspaetung { background: #d99a2b; }
.al-status-zeit-input { width: 84px !important; padding: 4px 6px !important; font-size: 0.8rem !important; }
.al-status-bemerkung-input { width: 140px !important; padding: 4px 6px !important; font-size: 0.8rem !important; }
.al-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 14px; font-size: 0.82rem; color: var(--al-muted); }
.al-legend span.dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ===================================================================
   CHECK SA-AZAV 2 (23.09.2026) – gemeinsame Bausteine
   =================================================================== */

/* Punkt 3.8: Hinzufuegen-Mechanismen liegen hinter einem Plus-Button,
   der Inhalt steht zuerst. Umgesetzt mit <details>/<summary> - kein JS noetig. */
.al-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  /* In der schmalen linken Spalte stießen Überschrift und Knopf aneinander -
     dann rutscht der Knopf lieber in die nächste Zeile. */
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.al-panel-head h2 { margin: 0; }
.al-panel-head .al-btn { white-space: nowrap; }

.al-add { margin-top: 16px; }
.al-add > summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  list-style: none;
  padding: 7px 14px;
  border: 1px solid var(--al-border);
  border-radius: 7px;
  background: #fff;
  color: var(--al-accent-dark);
  font-size: 14px;
  font-weight: 600;
  user-select: none;
}
.al-add > summary::-webkit-details-marker { display: none; }
.al-add > summary::before { content: "+"; font-size: 17px; line-height: 1; }
.al-add > summary:hover { border-color: var(--al-accent); background: #fff6e6; }
.al-add[open] > summary { border-color: var(--al-accent); background: #fff6e6; }
.al-add[open] > summary::before { content: "−"; }
.al-add-body {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--al-border);
  border-radius: 8px;
  background: #fbfcfd;
}

/* Punkt 2.11 / 10.1: thematische Gruppen und mehrspaltige Felder,
   damit der Bildschirm gefuellt wird statt einer endlosen Liste. */
.al-group { margin-bottom: 26px; }
.al-group:last-child { margin-bottom: 0; }
.al-group > h3 {
  margin: 0 0 12px;
  padding-bottom: 7px;
  border-bottom: 2px solid var(--al-border);
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--al-muted);
}
.al-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px 26px;
}
.al-grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.al-field { min-width: 0; }
.al-field > label,
.al-field > .al-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--al-muted);
  margin-bottom: 3px;
}
.al-field > .al-value {
  font-size: 15px;
  word-break: break-word;
}
.al-field input, .al-field select, .al-field textarea { width: 100%; }
.al-field-wide { grid-column: 1 / -1; }

/* Punkt 3.6: zweispaltiges Layout (links Informationen, rechts Teilnehmende) */
/* Stammdaten links kompakt, Arbeitsbereich rechts breit - vorher war es
   umgekehrt und die eigentliche Arbeitsfläche hatte am wenigsten Platz. */
.al-split {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(0, 2.2fr);
  gap: 14px;
  align-items: start;
}
@media (max-width: 1100px) { .al-split { grid-template-columns: 1fr; } }

/* CHECK3 2.6/2.7: Lehrplan - jedes Modul ein eigener, unabhaengiger Bereich */
.al-lehrplan {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 16px;
  align-items: start;
  margin-top: 14px;
}
.al-modul {
  border: 1px solid var(--al-border);
  border-radius: 10px;
  background: var(--al-card);
  overflow: hidden;
}
.al-modul-ue-badge {
  display: inline-block;
  margin: 0 0 6px 2px;
  padding: 2px 9px;
  border-radius: 5px;
  background: #eef2f4;
  color: var(--al-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.al-modul-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px 10px;
}
.al-modul-nr {
  flex-shrink: 0;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--al-sidebar);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
}
.al-modul-titel { font-weight: 600; flex: 1; line-height: 1.35; }
.al-modul-ue { color: var(--al-muted); font-size: 13px; white-space: nowrap; }
.al-modul-beschreibung {
  padding: 0 14px 10px;
  color: var(--al-muted);
  font-size: 13px;
  white-space: pre-wrap;
}
.al-modul-trenner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 14px 4px;
  color: var(--al-muted);
  font-size: 12px;
}
.al-modul-trenner::before,
.al-modul-trenner::after { content: ""; flex: 1; height: 1px; background: var(--al-border); }
.al-untermodule { padding: 0 14px 12px; }
.al-untermodul {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid #f0f3f5;
}
.al-untermodul:last-of-type { border-bottom: none; }
.al-untermodul-nr {
  color: var(--al-muted);
  font-variant-numeric: tabular-nums;
  min-width: 30px;
  font-size: 13px;
  padding-top: 1px;
}
/* Die Zeilen-Aktionen (bearbeiten/loeschen) erst beim Ueberfahren zeigen - sonst
   erschlagen die Symbole die eigentliche Information. */
.al-zeilen-aktionen { display: flex; gap: 2px; opacity: 0; transition: opacity .12s; }
.al-untermodul:hover .al-zeilen-aktionen,
.al-modul-head:hover .al-zeilen-aktionen,
.al-zeilen-aktionen:focus-within { opacity: 1; }
.al-mini-btn {
  border: none;
  background: none;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--al-muted);
  font-size: 13px;
  line-height: 1;
}
.al-mini-btn:hover { background: #eef2f4; color: var(--al-text); }
/* Inline-Bearbeiten: als <details> direkt an der Zeile, ohne Seitenwechsel */
.al-inline-form { margin: 6px 0 10px; padding: 12px; background: #f7f9fa; border-radius: 8px; }
.al-inline-form .al-grid { grid-template-columns: 1fr; gap: 10px; }

/* Punkt 8.1: Anwesenheits-Kalender (Zeilen = Datum, Spalten = TN) */
.al-kalender-wrap { overflow-x: auto; }
.al-kalender { border-collapse: separate; border-spacing: 0; font-size: 13px; width: auto; min-width: 100%; }
.al-kalender th, .al-kalender td {
  border-bottom: 1px solid var(--al-border);
  border-right: 1px solid var(--al-border);
  padding: 5px 8px;
  text-align: center;
  white-space: nowrap;
}
.al-kalender thead th {
  position: sticky; top: 0; z-index: 2;
  background: #f7f9fa; font-size: 12px;
}
.al-kalender .al-kal-datum {
  position: sticky; left: 0; z-index: 1;
  background: #fff; text-align: left; font-variant-numeric: tabular-nums;
}
.al-kalender thead .al-kal-datum { z-index: 3; background: #f7f9fa; }
.al-kalender tbody tr:hover .al-kal-datum { background: #f7f9fa; }
.al-kal-heute td { background: #fffbe9; }
.al-kal-leer { color: #c3cbd2; }
.al-kal-kommentar {
  display: block; font-size: 11px; color: var(--al-muted);
  max-width: 140px; overflow: hidden; text-overflow: ellipsis;
}

/* Statuspunkte im Kalender - dieselbe Farbsprache wie die Anwesenheitsliste */
.al-dot {
  display: inline-block; min-width: 22px; padding: 1px 5px;
  border-radius: 4px; font-size: 11px; font-weight: 600;
}

/* Punkt 1.x: Dashboard-Statusliste offener Taeglich-Aufgaben */
.al-status-liste { display: flex; flex-direction: column; gap: 9px; }
.al-status-zeile {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 13px; border: 1px solid var(--al-border);
  border-radius: 8px; background: #fff;
  /* Auf schmalen Fenstern lieber umbrechen, als den Kursnamen zu quetschen. */
  flex-wrap: wrap;
}
.al-status-zeile.offen { border-left: 4px solid var(--al-danger); }
.al-status-zeile.erledigt { border-left: 4px solid var(--al-ok); }
.al-status-zeile .name { font-weight: 600; flex: 1 1 220px; min-width: 200px; }
.al-flags { display: flex; gap: 6px; flex-wrap: wrap; }
.al-flag {
  font-size: 12px; padding: 2px 9px; border-radius: 20px;
  border: 1px solid var(--al-border); white-space: nowrap;
}
.al-flag.fehlt { background: #fdecea; border-color: #f5c6c0; color: var(--al-danger); }
.al-flag.ok { background: #eaf6f1; border-color: #bfe3d4; color: var(--al-ok-dark); }

/* Interne Bemerkung im Klassenbuch: sichtbar abgesetzt, damit sie nicht mit der
   Bemerkung verwechselt wird, die in Unterlagen fuer den Kostentraeger landet. */
.al-intern {
  border-left: 3px solid var(--al-border);
  padding-left: 10px;
  color: var(--al-muted);
}

/* Punkt 7.2: gleich breite Spalten, ruhigere Optik - Farbe erst bei Auswahl.
   Punkt 7.4: ein offener Tag ist sichtbar offen. */
.al-anw { width: 100%; border-collapse: collapse; }
.al-anw th, .al-anw td { border-bottom: 1px solid var(--al-border); padding: 6px 4px; }
.al-anw thead th {
  font-size: 11px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase;
  color: var(--al-muted); text-align: center; vertical-align: bottom; line-height: 1.25;
}
.al-anw thead th.tn, .al-anw td.tn { text-align: left; width: 210px; }
.al-anw thead th.kommentar, .al-anw td.kommentar { text-align: left; width: 260px; }
/* alle Statusspalten exakt gleich breit */
.al-anw col.status { width: 84px; }
.al-anw td.status { text-align: center; }

.al-anw-opt {
  display: block; cursor: pointer; border-radius: 6px;
  border: 1px solid var(--al-border); background: #fff;
  padding: 7px 4px; font-size: 12px; color: var(--al-muted);
  transition: background .12s, border-color .12s, color .12s;
}
.al-anw-opt:hover { border-color: #b9c4cc; background: #f7f9fa; }
.al-anw-opt input { position: absolute; opacity: 0; pointer-events: none; }
.al-anw-opt.checked { color: #fff; border-color: transparent; font-weight: 600; }
.al-anw-opt.checked[data-status=""]                      { background: #8a8f98; }
.al-anw-opt.checked[data-status="anwesend"]              { background: #3fae72; }
.al-anw-opt.checked[data-status="entschuldigt"]          { background: #4a90d9; }
.al-anw-opt.checked[data-status="krank"]                 { background: #9b6fd1; }
.al-anw-opt.checked[data-status="unentschuldigt"]        { background: #c0392b; }
.al-anw-opt.checked[data-status="verspaetung"]           { background: #d99a2b; }
.al-anw-opt.checked[data-status="bewerbungsbemuehung"] { background: #2b8a8f; }
.al-anw-opt.checked[data-status="urlaub"]                { background: #6b7d8c; }

.al-anw tr.offen td.tn::after {
  content: "offen"; margin-left: 8px; font-size: 11px; font-weight: 600;
  color: var(--al-danger); background: #fdecea; border-radius: 10px; padding: 1px 8px;
}
.al-anw td.tn small { display: block; color: var(--al-muted); font-size: 11px; }
.al-anw input[type="text"], .al-anw textarea {
  width: 100%; border: 1px solid var(--al-border); border-radius: 6px;
  padding: 7px 9px; font: inherit; font-size: 13px; resize: vertical;
}

/* Punkt 7.5: Rueckmeldung zum automatischen Speichern */
.al-autosave {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  padding: 9px 15px; border-radius: 8px; font-size: 13px; font-weight: 600;
  color: #fff; background: var(--al-ok); box-shadow: 0 4px 14px rgba(0,0,0,.16);
  opacity: 0; transform: translateY(6px); transition: opacity .18s, transform .18s;
  pointer-events: none;
}
.al-autosave.sichtbar { opacity: 1; transform: translateY(0); }
.al-autosave.fehler { background: var(--al-danger); }

.al-tagnav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.al-hinweis {
  padding: 13px 16px; border-radius: 8px; background: #fffbe9;
  border: 1px solid #f0e2b6; color: #7a5d12; font-size: 14px;
}

/* Hinweisbanner mit Icon (z. B. Trägerstammdaten noch nicht erfasst). Amber-Ton
   an die Marke gebunden: linker Streifen in CI-Orange, Icon in Orange-Dunkel. */
.al-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 10px;
  background: #fff6e6;
  border: 1px solid #f3d9a6;
  border-left: 4px solid var(--al-accent);
  color: #7a5213;
  font-size: 0.92rem;
}
.al-banner-ico {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  color: var(--al-accent-dark);
  margin-top: 1px;
}
.al-banner a { color: var(--al-accent-dark); font-weight: 600; }

/* CHECK3 6.6: Klassenbuch - Inhalt, Didaktik und Methodik vollstaendig lesbar */
.al-kb-eintrag {
  border: 1px solid var(--al-border);
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}
.al-kb-kopf {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: #f7f9fa;
  border-bottom: 1px solid var(--al-border);
}
.al-kb-datum { font-weight: 600; font-variant-numeric: tabular-nums; }
.al-kb-thema { flex: 1; min-width: 200px; }
.al-kb-felder {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 18px;
  padding: 12px 14px;
}
@media (max-width: 900px) { .al-kb-felder { grid-template-columns: 1fr; } }

/* CHECK3 8.5: Quoten im Kopf des Kurskalenders */
.al-kal-quote { display: inline-block; font-size: 11px; font-weight: 400; color: var(--al-muted); }
.al-kal-quote.fehlt { color: var(--al-danger); font-weight: 600; }

/* CHECK4 6.3: Die Quote im Kalenderkopf trägt die Ampelfarbe als kleine Plakette. */
.al-kal-quote[class*="ampel-"] {
  padding: 1px 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 600;
}

/* CHECK4 5.3: Der Name im Kalenderkopf führt in die Teilnehmerakte. */
.al-kal-name {
  color: var(--al-text);
  text-decoration: none;
  font-weight: 600;
}
.al-kal-name:hover { color: var(--al-accent-dark); text-decoration: underline; }

/* Gesperrte Schaltflächen sollen auch aussehen wie gesperrt. */
.al-btn:disabled,
.al-btn[disabled] {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: auto;   /* damit der title-Hinweis beim Überfahren erscheint */
}
.al-btn:disabled:hover,
.al-btn[disabled]:hover {
  background: inherit;
  border-color: var(--al-border);
}

/* Kästchen und Auswahlknöpfe sollen nicht über die ganze Feldbreite gehen,
   sondern links neben ihrer Beschriftung stehen. */
.al-field input[type="checkbox"],
.al-field input[type="radio"] {
  width: auto;
  margin: 2px 8px 0 0;
  vertical-align: middle;
}
.al-field-kontrollkaestchen {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.al-field-kontrollkaestchen > label { margin: 0; }

/* Kurstage mit Zeiten je Wochentag (CHECK4 3.2) */
.al-wochentage { border-collapse: collapse; width: 100%; max-width: 480px; }
.al-wochentage th {
  text-align: left; font-size: 11px; letter-spacing: .03em; text-transform: uppercase;
  color: var(--al-muted); font-weight: 600; padding: 0 10px 6px 0;
}
.al-wochentage td { padding: 4px 10px 4px 0; vertical-align: middle; }
.al-wochentage td.tag { width: 110px; }
.al-wochentage td.tag label {
  display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px;
}
.al-wochentage td.tag input[type="checkbox"] { width: auto; margin: 0; }
.al-wochentage input[type="time"] {
  width: 100%; border: 1px solid var(--al-border); border-radius: 6px;
  padding: 6px 8px; font: inherit; font-size: 14px;
}
/* Ein nicht angehakter Tag tritt optisch zurück. */
.al-wochentage tr:has(input[type="checkbox"]:not(:checked)) input[type="time"] { opacity: .45; }
.al-feldfehler { display: block; color: var(--al-danger); font-size: 12px; margin-top: 2px; }

/* Feste Spaltenzahl, damit Zeilen dort umbrechen, wo sie sollen (CHECK4 1.2–1.4). */
.al-grid.spalten-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.al-grid.spalten-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.al-grid.spalten-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px) {
  .al-grid.spalten-2, .al-grid.spalten-3, .al-grid.spalten-4 { grid-template-columns: 1fr; }
}
/* Mehrere Zeilen innerhalb einer Gruppe sauber untereinander */
.al-zeilen { display: flex; flex-direction: column; gap: 12px; }

/* Formulare, die nur über den Knopf oben geöffnet werden: eigener Auslöser bleibt verborgen. */
.al-add.al-add-still > summary { display: none; }
.al-add.al-add-still { margin-top: 0; }
.al-add.al-add-still[open] { margin-top: 16px; }

/* Kursstatus farbig und auf einen Blick (CHECK4 4.2) */
.al-statuszeile {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 8px; margin-bottom: 20px;
  border: 1px solid var(--al-border); background: #f7f9fa;
}
.al-statuspunkt { width: 10px; height: 10px; border-radius: 50%; background: var(--al-muted); flex-shrink: 0; }
.al-statustext { font-weight: 600; }
.al-statusnotiz { color: var(--al-muted); font-size: 13px; margin-left: auto; }
.al-statuszeile.al-status-geplant     { background: #eef4fb; border-color: #cfe0f2; }
.al-statuszeile.al-status-geplant     .al-statuspunkt { background: #4a90d9; }
.al-statuszeile.al-status-geplant     .al-statustext  { color: #1f5party; color: #1f5a92; }
.al-statuszeile.al-status-aktiv       { background: #eaf6f1; border-color: #bfe3d4; }
.al-statuszeile.al-status-aktiv       .al-statuspunkt { background: #3fae72; }
.al-statuszeile.al-status-aktiv       .al-statustext  { color: var(--al-ok-dark); }
.al-statuszeile.al-status-beendet     { background: #f2f4f5; border-color: #dde2e5; }
.al-statuszeile.al-status-beendet     .al-statuspunkt { background: #8a8f98; }
.al-statuszeile.al-status-beendet     .al-statustext  { color: #5b636b; }
.al-statuszeile.al-status-abgebrochen { background: #fdecea; border-color: #f5c6c0; }
.al-statuszeile.al-status-abgebrochen .al-statuspunkt { background: var(--al-danger); }
.al-statuszeile.al-status-abgebrochen .al-statustext  { color: var(--al-danger); }

/* Belegung: 2/12 (CHECK4 4.5) */
.al-belegung {
  font-variant-numeric: tabular-nums; font-weight: 700; font-size: 15px;
  padding: 3px 11px; border-radius: 20px;
  background: #eaf6f1; color: var(--al-ok-dark); border: 1px solid #bfe3d4;
}
.al-belegung.voll { background: #fff6e5; color: #8a6100; border-color: #f0dcb4; }

/* Unterrichtszeiten je Tag als kleine Marken */
.al-zeitchip {
  display: inline-block; margin: 2px 6px 2px 0; padding: 2px 9px;
  border-radius: 20px; border: 1px solid var(--al-border);
  font-size: 12px; font-variant-numeric: tabular-nums; background: #fff;
}

/* Status einer Kursteilnahme */
.al-flag.teilnahme-aktiv        { background: #eaf6f1; border-color: #bfe3d4; color: var(--al-ok-dark); }
.al-flag.teilnahme-geplant      { background: #eef4fb; border-color: #cfe0f2; color: #1f5a92; }
.al-flag.teilnahme-beendet      { background: #f2f4f5; border-color: #dde2e5; color: #5b636b; }
.al-flag.teilnahme-abbruch,
.al-flag.teilnahme-nichtantritt { background: #fdecea; border-color: #f5c6c0; color: var(--al-danger); }

/* Ergebnis der Teilnahme. „Abgebrochen fuer Job" ist absichtlich nicht rot:
   es ist ein Abbruch, zaehlt aber positiv in die Integrationsquote. */
.al-flag.ergebnis-erfolgreich        { background: #eaf6f1; border-color: #bfe3d4; color: var(--al-ok-dark); }
.al-flag.ergebnis-abbruch_job        { background: #eef4fb; border-color: #cfe0f2; color: #1f5a92; }
.al-flag.ergebnis-abbruch_fehlzeiten { background: #fdecea; border-color: #f5c6c0; color: var(--al-danger); }

/* Sammelaktionen über der Anwesenheitsliste (CHECK4 5.1) */
.al-sammelaktionen {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 14px; padding: 10px 12px;
  border: 1px solid var(--al-border); border-radius: 8px; background: #fbfcfd;
}
.al-sammelaktionen form { display: inline; }

/* Gleich hohe Zeilen: lange Beschriftungen dürfen umbrechen, ohne die Zeile zu dehnen
   (CHECK4 5.2) */
.al-anw-opt {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 48px; line-height: 1.15; hyphens: auto;
}
.al-anw td, .al-anw th { vertical-align: middle; }
.al-anw thead th { height: 58px; }

/* Verweis auf die Teilnehmerakte (CHECK4 5.3) */
.al-tn-link { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--al-border); }
.al-tn-link:hover { color: var(--al-accent-dark); border-bottom-color: currentColor; }

/* Filterbereich der Anwesenheitsübersicht (CHECK4 5.5, 6.1, 6.2) */
.al-filter {
  display: flex; flex-direction: column; gap: 12px;
}
.al-filter-zeile { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.al-filter-zeile label { font-size: 14px; }
.al-filter-haken { display: flex; align-items: center; gap: 7px; }
.al-filter-haken input { width: auto; margin: 0; }
.al-tn-auswahl { display: flex; gap: 7px; flex-wrap: wrap; }
.al-tn-chip {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 4px 11px; border-radius: 20px; font-size: 13px;
  border: 1px solid var(--al-border); background: #fff;
}
.al-tn-chip:hover { border-color: var(--al-accent); }
.al-tn-chip.gewaehlt { background: #eaf6f1; border-color: #bfe3d4; color: var(--al-ok-dark); }
.al-tn-chip input { width: auto; margin: 0; }

/* Anwesenheitsquote als Ampel (CHECK4 6.3) */
.al-quote {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  padding: 4px 12px; border-radius: 20px; font-size: 13px;
  border: 1px solid var(--al-border); background: #fff; color: var(--al-text);
}
.al-quote strong { font-variant-numeric: tabular-nums; }
.al-quote-mini {
  display: inline-block; padding: 1px 7px; border-radius: 10px;
  font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.ampel-gruen   { background: #eaf6f1; border-color: #bfe3d4; color: var(--al-ok-dark); }
.ampel-gelb    { background: #fff6e5; border-color: #f0dcb4; color: #8a6100; }
.ampel-rot     { background: #fdecea; border-color: #f5c6c0; color: var(--al-danger); }
.ampel-neutral { background: #f4f6f8; border-color: var(--al-border); color: var(--al-muted); }


/* CHECK4 7.2: Stillgelegte Felder, solange „Kein Unterricht“ gesetzt ist. */
.al-field.al-still { opacity: .45; }
.al-field.al-still input,
.al-field.al-still select,
.al-field.al-still textarea { background: #f4f6f8; cursor: not-allowed; }

/* CHECK4 8.4/8.6: Aktionsknöpfe der Kursplanung über der Tabelle. */
.al-planung-aktionen {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 0 4px;
}

/* CHECK4 8.8: Unterrichtstage und Ferientage getrennt nummeriert. */
.al-tagnummer {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.al-tagnummer.unterricht { background: #eef3f8; color: var(--al-accent-dark); }
.al-tagnummer.ferien     { background: #fdf3e3; color: #9a6b12; }
.al-zeile-frei > td { background: #fcfaf5; }

/* CHECK4 8.7: Lehrplanauswahl direkt in der Planungstabelle. */
.al-select-schmal { max-width: 260px; font-size: 13px; }

/* CHECK4 10.6: Anwesenheitsanzeige in der Teilnehmerakte. */
.al-flag.leer     { background: #f1f3f5; color: var(--al-muted); }
.al-flag.neutral  { background: #eef1f4; color: var(--al-text); }
.al-offene-tage {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 7px 11px;
  border-radius: 7px;
  background: #fdf3e3;
  color: #8a5d0c;
  font-size: 13px;
}
.al-offene-tage.vollstaendig { background: #eaf6f1; color: var(--al-ok-dark); }

/* CHECK4 11.1: Ja/Nein als Knopfgruppe statt Auswahlliste. */
.al-jn { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.al-jn-knopf {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--al-border);
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  user-select: none;
}
.al-jn-knopf input { position: absolute; opacity: 0; width: 0; height: 0; }
.al-jn-zeichen { font-size: 15px; line-height: 1; font-weight: 700; }
.al-jn-knopf:hover { border-color: var(--al-muted); }
.al-jn-ja   .al-jn-zeichen { color: var(--al-ok-dark); }
.al-jn-nein .al-jn-zeichen { color: var(--al-danger); }
.al-jn-offen .al-jn-zeichen { color: var(--al-muted); }
.al-jn-ja.aktiv    { background: #eaf6f1; border-color: #8fcfb2; }
.al-jn-nein.aktiv  { background: #fdecea; border-color: #f0a79d; }
.al-jn-offen.aktiv { background: #eef1f4; border-color: var(--al-muted); }
.al-jn-knopf.aktiv { font-weight: 600; }

/* CHECK4 10.6: Kurs und Quote nebeneinander, bei schmalem Panel untereinander. */
.al-anw-kopf {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.al-anw-kopf .al-quote { white-space: nowrap; flex: none; }

/* CHECK4 11.1: Die Markierung folgt sofort dem Klick, nicht erst dem Speichern.
   Die serverseitige Klasse `aktiv` bleibt zusätzlich bestehen - sie trägt den
   gespeicherten Stand und hält die Anzeige auch ohne :has()-Unterstützung richtig. */
.al-jn-knopf:has(input:checked) { font-weight: 600; }
.al-jn-ja:has(input:checked)    { background: #eaf6f1; border-color: #8fcfb2; }
.al-jn-nein:has(input:checked)  { background: #fdecea; border-color: #f0a79d; }
.al-jn-offen:has(input:checked) { background: #eef1f4; border-color: var(--al-muted); }

/* Füllpositionen einer Dokumentenvorlage als Nachschlageliste. */
.al-fuellpositionen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px 20px;
}
.al-fuellposition {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px solid var(--al-border);
  font-size: 13px;
}
.al-fuellposition code {
  background: #eef1f4;
  border-radius: 5px;
  padding: 2px 7px;
  font-size: 12px;
  white-space: nowrap;
}
.al-fuellposition span { color: var(--al-muted); }

/* Schnittstelle: Schlüsselanzeige und Beispielbefehle. */
.al-schluessel-neu { border-left: 4px solid var(--al-accent); }
.al-schluessel-wert {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--al-border);
  border-radius: 8px;
  background: #f7f9fa;
}
.al-schluessel-wert code {
  font-size: 13px;
  word-break: break-all;
  flex: 1 1 320px;
}
.al-code {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--al-border);
  border-radius: 8px;
  background: #f7f9fa;
  font-size: 12.5px;
  line-height: 1.55;
  overflow-x: auto;
  white-space: pre;
}

/* Stufen der Zugangsschlüssel - aufsteigend wärmer, damit die höchste auffällt. */
.al-badge.stufe-dozent      { background: #eef3f8; color: var(--al-accent-dark); }
.al-badge.stufe-mitarbeiter { background: #eaf6f1; color: var(--al-ok-dark); }
.al-badge.stufe-admin       { background: #fff6e5; color: #8a6100; }
.al-badge.stufe-superadmin  { background: #fdecea; color: var(--al-danger); }
.al-stufen { display: grid; gap: 10px; }
.al-stufe {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--al-border);
  font-size: 13.5px;
}
.al-stufe:last-child { border-bottom: none; }
@media (max-width: 700px) { .al-stufe { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- Seitenkopf
   Jeder Bereich einer Seite steht in einer eigenen weißen Fläche - Kopf,
   Filter, Inhalt. Vorbild: AZAV Pilot. */
.al-seitenkopf { padding: 16px 20px 18px; }
.al-seitenkopf h1 { margin: 0; }
.al-seitenkopf .al-subtitle { margin: 4px 0 0; }
.al-seitenkopf-zeile {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 10px;
}
/* Der Textblock darf schmaler werden, sonst nimmt eine lange Unterzeile die
   ganze Breite und schiebt die Knoepfe in die naechste Zeile. */
.al-seitenkopf-zeile > :first-child { flex: 1 1 260px; min-width: 0; }
.al-seitenkopf-zeile > .al-kopf-aktionen { flex: 0 0 auto; }
.al-pfad {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--al-muted);
}
.al-pfad a { color: var(--al-muted); text-decoration: none; }
.al-pfad a:hover { color: var(--al-accent); }
.al-pfad-trenner { color: #b6c0c8; }
.al-pfad-hier { color: var(--al-text); font-weight: 600; }

/* Filter in eigener Fläche, mit Beschriftung links wie im Vorbild. */
.al-filterpanel {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 12px 20px;
}
.al-filterpanel-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--al-muted);
}
.al-filterpanel .al-filterbar { margin-bottom: 0; }

/* Filterzeile mit Auswahllisten und Datumsfeldern statt Chips. Die Beschriftung
   steht ueber dem Feld, damit die Zeile auch mit fuenf Feldern lesbar bleibt.
   Eigene Klasse statt .al-filterbar: dort wird jedes <a> als Chip gezeichnet,
   was den Knopf "Zuruecksetzen" doppelt gestaltet haette. */
.al-filterbar-eng {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin: 0;
}
.al-filterbar-eng label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--al-muted);
}
.al-filterbar-eng input,
.al-filterbar-eng select {
  padding: 7px 11px;
  border: 1px solid var(--al-border);
  border-radius: 7px;
  font-size: 0.9rem;
  background: #fff;
  color: var(--al-text);
  max-width: 220px;
}

/* Tabellenzeilen bekommen mehr Luft, Verweise sind als solche erkennbar. */
table.al-table td { padding: 13px 10px; }
table.al-table th { padding: 10px; }
.al-zeilenlink {
  color: var(--al-text);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: #c3ccd3;
  font-weight: 600;
}
.al-zeilenlink:hover { color: var(--al-accent-dark); text-decoration-color: var(--al-accent); }
.al-zeilenlink.leise { font-weight: 400; color: var(--al-muted); }
.al-zeilenlink.leise:hover { color: var(--al-accent-dark); }

/* Suchfeld innerhalb der Filterfläche - ohne den Abstand des Formularlayouts. */
.al-filtersuche { margin: 0; flex: 1 1 220px; max-width: 320px; }
.al-filtersuche input {
  width: 100%;
  padding: 7px 11px;
  border: 1px solid var(--al-border);
  border-radius: 7px;
  font-size: 0.9rem;
}

/* ------------------------------------------------- Anwesenheit als Zeilenliste
   Je Teilnehmendem eine Zeile mit beschrifteten Statusknöpfen nebeneinander.
   Die frühere Matrix hatte Statusspalten, deren Überschriften unterschiedlich
   lang umbrachen - daher die ungleich hohen Zeilen. */
.al-anw-liste { display: flex; flex-direction: column; }

.al-anw-zeile {
  padding: 12px 2px;
  border-bottom: 1px solid var(--al-border);
}
.al-anw-zeile:last-child { border-bottom: none; }

.al-anw-name {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.al-anw-name .al-tn-link {
  font-weight: 600;
  color: var(--al-text);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: #c3ccd3;
}
.al-anw-name .al-tn-link:hover { color: var(--al-accent-dark); }
.al-anw-name small { color: var(--al-muted); font-size: 12px; }

/* Noch nicht gepflegt: ein Hinweis direkt hinter dem Namen. */
.al-anw-zeile.offen .al-anw-name::after {
  content: "offen";
  font-size: 11px;
  font-weight: 600;
  color: var(--al-danger);
  background: #fdecea;
  border-radius: 10px;
  padding: 1px 8px;
}

.al-anw-koerper {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.al-anw-wahl { display: flex; gap: 6px; flex-wrap: wrap; }

.al-anw-opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border: 1px solid var(--al-border);
  border-radius: 7px;
  background: #fff;
  color: var(--al-muted);
  font-size: 12.5px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .12s, background .12s, color .12s;
}
.al-anw-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.al-anw-opt:hover { border-color: #b9c4cc; background: #f7f9fa; }
/* Ein farbiger Punkt sagt schon vor dem Klick, worum es geht. */
.al-anw-opt::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: .55;
}
.al-anw-opt.checked { color: #fff; border-color: transparent; font-weight: 600; }
.al-anw-opt.checked::before { background: rgba(255,255,255,.85); opacity: 1; }

.al-anw-opt[data-status=""]                      { color: #7a828b; }
.al-anw-opt[data-status="anwesend"]              { color: #2f8d5b; }
.al-anw-opt[data-status="entschuldigt"]          { color: #3a79b4; }
.al-anw-opt[data-status="krank"]                 { color: #7d55ad; }
.al-anw-opt[data-status="unentschuldigt"]        { color: #b03326; }
.al-anw-opt[data-status="verspaetung"]           { color: #ab7415; }
.al-anw-opt[data-status="bewerbungsbemuehung"] { color: #22706f; }
.al-anw-opt[data-status="urlaub"]                { color: #5d6b78; }

.al-anw-opt.checked[data-status=""]                      { background: #8a8f98; }
.al-anw-opt.checked[data-status="anwesend"]              { background: #3fae72; }
.al-anw-opt.checked[data-status="entschuldigt"]          { background: #4a90d9; }
.al-anw-opt.checked[data-status="krank"]                 { background: #9b6fd1; }
.al-anw-opt.checked[data-status="unentschuldigt"]        { background: #c0392b; }
.al-anw-opt.checked[data-status="verspaetung"]           { background: #d99a2b; }
.al-anw-opt.checked[data-status="bewerbungsbemuehung"] { background: #2b8a8f; }
.al-anw-opt.checked[data-status="urlaub"]                { background: #6b7d8c; }

.al-anw-bemerkung {
  flex: 1 1 220px;
  min-width: 180px;
  padding: 7px 10px;
  border: 1px solid var(--al-border);
  border-radius: 7px;
  font: inherit;
  font-size: 13px;
  resize: vertical;
}

/* Zurücksetzen-Knopf der Anwesenheitszeile - nur sichtbar, wenn etwas gesetzt ist. */
.al-anw-leeren {
  display: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--al-border);
  border-radius: 7px;
  color: var(--al-muted);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}
.al-anw-leeren input { position: absolute; opacity: 0; width: 0; height: 0; }
.al-anw-leeren:hover { border-color: var(--al-danger); color: var(--al-danger); }
.al-anw-zeile:not(.offen) .al-anw-leeren { display: inline-flex; }

/* Nur für Screenreader - sichtbarer Text wäre hier bloß Ballast. */
.al-nur-vorlesen {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------- Kurskarten (Dashboard)
   Je laufendem Kurs eine Karte mit den offenen Tagesaufgaben. */
.al-kurskarten {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 12px;
}
.al-kurskarte {
  border: 1px solid var(--al-border);
  border-radius: 10px;
  padding: 14px 16px;
  background: #fff;
}
.al-kurskarte.erledigt { background: #fbfdfc; }
.al-kurskarte-titel {
  display: block;
  font-weight: 700;
  color: var(--al-text);
  text-decoration: none;
  margin-bottom: 4px;
}
.al-kurskarte-titel:hover { color: var(--al-accent-dark); text-decoration: underline; }
.al-kurskarte-zeile {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--al-muted);
  margin-bottom: 10px;
}
.al-kurskarte-fertig {
  padding: 8px 11px;
  border-radius: 7px;
  background: #eaf6f1;
  color: var(--al-ok-dark);
  font-size: 13px;
}
.al-aufgaben { display: flex; flex-direction: column; gap: 6px; }
.al-aufgabe {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.al-aufgabe-datum { font-size: 12.5px; color: var(--al-muted); font-variant-numeric: tabular-nums; }
.al-aufgabe-marke {
  padding: 3px 10px;
  border-radius: 999px;
  background: #eaf1f8;
  color: #2f6190;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.al-aufgabe-marke:hover { background: #dce8f3; }
/* Liegengebliebenes hebt sich ab - heute ist normal, gestern nicht mehr.
   Phase 3: Überfälliges als ruhige Outline-Marke statt roter Vollfläche,
   damit die Kurs-Card nicht zur „roten Wand" wird. */
.al-aufgabe-marke.ueberfaellig { background: #fff6f5; color: var(--al-danger); border-color: #f1cbc5; }
.al-aufgabe-marke.ueberfaellig:hover { background: #fdecea; }

/* ------------------------------------------------------------- Leerzustände */
.al-leer { text-align: center; padding: 30px 20px; color: var(--al-muted); }
.al-leer-symbol { font-size: 26px; color: #c3ccd3; line-height: 1; margin-bottom: 8px; }
.al-leer-titel { font-weight: 600; color: var(--al-text); margin-bottom: 3px; }
.al-leer-text { font-size: 13px; }

/* Sortierbare Spaltenköpfe. */
.al-spaltenkopf {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: inherit;
  text-decoration: none;
}
.al-spaltenkopf:hover { color: var(--al-accent-dark); }
.al-spaltenkopf.aktiv { color: var(--al-accent-dark); }
.al-sortpfeil { font-size: 11px; opacity: .45; }
.al-spaltenkopf.aktiv .al-sortpfeil { opacity: 1; }

/* ----------------------------------------------------------- Globale Suche */
.al-suchknopf {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  min-width: 260px;
  border: 1px solid var(--al-border);
  border-radius: 8px;
  background: #f7f9fa;
  color: var(--al-muted);
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  text-align: left;
}
.al-suchknopf:hover { border-color: #b9c4cc; background: #fff; }
.al-tastenkuerzel {
  margin-left: auto;
  padding: 1px 6px;
  border: 1px solid var(--al-border);
  border-radius: 5px;
  background: #fff;
  font-size: 11px;
  font-family: inherit;
  color: var(--al-muted);
}

/* Achtung: `display: flex` schlägt das hidden-Attribut - ohne diese Zeile stand
   die Suchleiste bei jedem Seitenaufruf offen. */
.al-suche-overlay[hidden] { display: none; }

.al-suche-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(20, 36, 51, .35);
  padding: 60px 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.al-suche-feld {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(680px, 100%);
  padding: 12px 16px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(20, 36, 51, .22);
  color: var(--al-muted);
}
.al-suche-feld input {
  flex: 1;
  border: none;
  outline: none;
  font: inherit;
  font-size: 1rem;
  color: var(--al-text);
}
.al-suche-zu {
  border: none; background: none; cursor: pointer;
  font-size: 20px; line-height: 1; color: var(--al-muted);
}
.al-suche-treffer {
  width: min(680px, 100%);
  max-height: 60vh;
  overflow-y: auto;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(20, 36, 51, .22);
}
.al-suche-treffer:empty { display: none; }
.al-suche-treffer-zeile {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--al-border);
  text-decoration: none;
  color: var(--al-text);
}
.al-suche-treffer-zeile:last-child { border-bottom: none; }
.al-suche-treffer-zeile:hover,
.al-suche-treffer-zeile.aktiv { background: var(--al-aktiv); }
.al-suche-art {
  flex: 0 0 auto;
  padding: 2px 9px;
  border-radius: 999px;
  background: #eef1f4;
  color: var(--al-muted);
  font-size: 11px;
  font-weight: 600;
}
.al-suche-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.al-suche-titel { font-weight: 600; }
.al-suche-titel mark { background: #ffe9a8; color: inherit; padding: 0 1px; border-radius: 2px; }
.al-suche-zusatz { font-size: 12px; color: var(--al-muted); }
.al-suche-leer { padding: 16px; color: var(--al-muted); font-size: 13px; }

/* Das eingebaute Löschkreuz von <input type="search"> doppelt unseres. */
.al-suche-feld input::-webkit-search-cancel-button { appearance: none; }

/* -------------------------------------------------------- Spaltenauswahl */
.al-spaltenwahl { position: relative; display: inline-block; }
.al-spaltenwahl-knopf { font-size: 0.82rem; padding: 5px 11px; }
.al-spaltenwahl-menue {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  min-width: 210px;
  padding: 8px;
  border: 1px solid var(--al-border);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(20, 36, 51, .14);
}
.al-spaltenwahl-zeile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}
.al-spaltenwahl-zeile:hover { background: #f1f4f6; }
.al-spaltenwahl-zeile input { width: auto; margin: 0; }
.al-spaltenwahl-zuruecksetzen {
  width: 100%;
  margin-top: 6px;
  padding: 6px;
  border: none;
  border-top: 1px solid var(--al-border);
  background: none;
  color: var(--al-accent-dark);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  text-align: left;
}

/* Aktionen im Seitenkopf und die Leiste über Tabellen. */
.al-kopf-aktionen { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.al-tabellenleiste {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

/* Aktionen unter einem Fehlzeitenbericht: Stand, PDF und die beiden Knoepfe
   in einer Zeile, auf schmalen Fenstern umbrechend. */
.al-bericht-aktionen {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-top: 1px solid var(--al-border);
}

/* Hinweisflaeche innerhalb einer Kachel - z.B. "Kurse halten den Lauf auf". */
.al-hinweis {
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 0.9rem;
  margin-bottom: 14px;
  border: 1px solid var(--al-border);
  background: #f6f8f9;
}
.al-hinweis.warn { background: #fff8f0; border-color: #f0d6b8; }

/* Dokumenteneditor: links das Blatt, rechts die Felder. Unter 1100px stapeln
   sie sich, damit die Vorschau nicht auf Briefmarkengroesse schrumpft. */
.al-dokument-editor {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 16px;
  align-items: start;
}
@media (max-width: 1100px) {
  .al-dokument-editor { grid-template-columns: 1fr; }
}
.al-vorschau { position: sticky; top: 16px; }
.al-vorschau iframe {
  width: 100%;
  /* A4-Verhaeltnis, damit das Blatt nicht verzerrt wirkt. */
  aspect-ratio: 210 / 297;
  border: 1px solid var(--al-border);
  border-radius: 8px;
  background: #fff;
}
.al-dokument-aktionen {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--al-border);
}
.al-dokument-editor .al-field { margin-bottom: 12px; }
.al-dokument-editor .al-field label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--al-muted);
  margin-bottom: 4px;
}
.al-dokument-editor .al-field input {
  width: 100%;
  padding: 7px 11px;
  border: 1px solid var(--al-border);
  border-radius: 7px;
  font-size: 0.9rem;
}

/* Verlauf der Teilnehmerakte: Zeitspur mit Ereignissen */
.al-verlauf { margin-top: 10px; }
.al-verlauf-eintrag {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  padding: 12px 0 12px 0;
  border-bottom: 1px solid var(--al-border);
}
.al-verlauf-eintrag:last-child { border-bottom: none; }
.al-verlauf-zeit {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--al-muted);
  text-align: right;
  padding-top: 1px;
}
.al-verlauf-inhalt { border-left: 3px solid var(--al-border); padding-left: 14px; min-width: 0; }
.al-verlauf-eintrag.nachricht .al-verlauf-inhalt { border-left-color: var(--al-accent); }
.al-verlauf-eintrag.notiz .al-verlauf-inhalt { border-left-color: #8ca0b3; }
.al-verlauf-eintrag.datei .al-verlauf-inhalt { border-left-color: #b9c4cc; }
.al-verlauf-eintrag.abwesenheit .al-verlauf-inhalt { border-left-color: var(--al-warning); }
.al-verlauf-kopf { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.al-verlauf-art {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--al-muted);
}
.al-verlauf-text {
  margin-top: 5px;
  white-space: pre-wrap;
  color: var(--al-text);
  font-size: 14px;
}
@media (max-width: 700px) {
  .al-verlauf-eintrag { grid-template-columns: 1fr; gap: 4px; }
  .al-verlauf-zeit { text-align: left; }
}

/* Verschlüsselungsstand im Nachrichtenfenster */
.al-verschluesselt { padding: 12px 14px; border-radius: 8px; border: 1px solid var(--al-border); }
.al-verschluesselt.ja { background: #eaf6f1; border-color: #bfe3d4; }
.al-verschluesselt.nein { background: #fdecea; border-color: #f5c6c0; }
.al-verschluesselt .al-subtitle { margin: 0; }

/* Dateifeld im Bearbeiten-Formular: vorhandene Datei, Löschhaken, Austauschen.
   Djangos Fassung setzt die drei Teile mit <br> aneinander - das sieht in
   unseren Formularen verloren aus. */
.al-datei-vorhanden {
  display: block;
  font-size: 12px;
  color: var(--al-muted);
  margin-bottom: 4px;
}
.al-datei-vorhanden a {
  color: var(--al-accent-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
  /* Lange Dateinamen sollen die Zeile nicht sprengen. */
  overflow-wrap: anywhere;
}
.al-datei-loeschen {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--al-muted);
  margin-bottom: 6px;
}
.al-datei-ersetzen {
  display: block;
  font-size: 12px;
  color: var(--al-muted);
  margin-bottom: 4px;
}

/* ------------------------------------------------- Hauptschalter Post-Ausgang
   Grund und Knopf stehen in einer Zeile, solange Platz ist. Das Eingabefeld
   darf wachsen, der Knopf nicht - sonst rutscht er bei langen Beschriftungen
   aus der Zeile. Unter 640px stapeln beide. */
.al-schalter-form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-top: 12px;
}
.al-schalter-grund {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  color: var(--al-muted);
}
.al-schalter-grund input {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--al-border);
  border-radius: 7px;
  font: inherit;
  font-size: 14px;
  color: var(--al-text);
  background: #fff;
}
.al-schalter-form .al-btn { flex: 0 0 auto; }
@media (max-width: 640px) {
  .al-schalter-form { flex-direction: column; align-items: stretch; }
}

/* ============================================================ Mobile-Navigation
   Off-Canvas-Sidebar als CSS-only Schublade (#al-nav-toggle + Labels, kein JS
   wegen CSP). Burger in der Topbar, Backdrop zum Schließen. */
.al-nav-burger { display: none; }
.al-nav-backdrop { display: none; }

@media (max-width: 760px) {
  /* Topbar umbrechen, damit der Nutzer-Block rechts nicht aus dem Bild läuft:
     Burger + Suche in Zeile 1, Nutzer/Abmelden rechtsbündig in Zeile 2. */
  .al-topbar { flex-wrap: wrap; gap: 10px; }
  .al-topbar .al-suchknopf { flex: 1 1 auto; min-width: 0; }
  .al-topbar .who { width: 100%; text-align: right; font-size: 12px; }
  .al-topbar .al-user { width: 100%; justify-content: flex-end; }

  .al-nav-burger {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; flex: 0 0 auto;
    border: 1px solid var(--al-border); border-radius: 9px;
    background: #fff; color: var(--al-text); font-size: 20px; line-height: 1;
    cursor: pointer; user-select: none;
  }
  .al-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 264px;
    max-height: 100vh; border-radius: 0; z-index: 60;
    transform: translateX(-100%); transition: transform .22s ease;
  }
  #al-nav-toggle:checked ~ .al-sidebar {
    transform: translateX(0); box-shadow: 0 0 50px rgba(0, 0, 0, .45);
  }
  #al-nav-toggle:checked ~ .al-nav-backdrop {
    display: block; position: fixed; inset: 0; z-index: 55;
    background: rgba(10, 20, 25, .5);
  }
}
@media (prefers-reduced-motion: reduce) { .al-sidebar { transition: none; } }

/* ================================================================== Pagination
   Nummerierter Seiten-Navigator + „pro Seite"-Dropdown (nutzt data-sendet). */
.al-pager {
  display: flex; align-items: center; justify-content: flex-start;
  gap: 14px; flex-wrap: wrap; padding: 16px 2px 2px;
}
.al-pager-info { font-size: 13px; color: var(--al-muted); font-variant-numeric: tabular-nums; }
.al-pager-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.al-pager-pfeile, .al-pager-zahlen { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.al-pg {
  min-width: 34px; height: 34px; padding: 0 9px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--al-border); border-radius: 8px; background: #fff;
  color: var(--al-text); font-size: 13px; font-weight: 600; text-decoration: none;
  font-variant-numeric: tabular-nums;
}
a.al-pg:hover { background: #f5f7f6; border-color: #cfd6da; }
.al-pg.aktiv { background: var(--al-accent); border-color: var(--al-accent); color: var(--al-text); }
.al-pg.disabled { color: #b7c0c6; background: #fafbfb; }
.al-pg.dots { border: 0; background: transparent; min-width: auto; padding: 0 2px; color: var(--al-muted); }
.al-pager-proseite { margin: 0 0 0 auto; }
.al-pager-proseite-label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--al-muted); }
.al-pager-proseite select {
  height: 34px; padding: 0 30px 0 10px; border: 1px solid var(--al-border);
  border-radius: 8px; background-color: #fff; font: inherit; font-size: 13px; color: var(--al-text);
}
