/* Lokal gehostete Schriften statt Google-Fonts-@import (vorher wurde bei
   jedem Seitenaufruf die IP-Adresse an fonts.googleapis.com/fonts.gstatic.com
   uebertragen, ohne Einwilligung/Vertrag -- siehe Datenschutz-Lagebericht). */
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/open-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/open-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Roboto Slab';
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url('/fonts/roboto-slab-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Roboto Slab';
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url('/fonts/roboto-slab-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Farben/Fonts von ljbm.lu uebernommen -- siehe Planung Abschnitt 8 */
:root {
  --color-blue: #5bc5f2;
  --color-green: #21ac74;
  --color-anthracite: #4e585d;
  --color-accent: #ffb606;
  --color-footer-bg: #4e585d;
  --color-bg: #f7f9fa;
  --color-surface: #ffffff;
  --color-border: #e0e4e6;
  --font-heading: 'Roboto Slab', serif;
  --font-body: 'Open Sans', sans-serif;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

/* Verhindert, dass spezifischere Regeln (z. B. ".drawer__body label {
   display: block }") das hidden-Attribut per Spezifitaet aushebeln -- kam
   im Excursions-Wizard vor (Playwright-Test deckte es auf). */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-anthracite);
  background: var(--color-bg);
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  color: var(--color-anthracite);
}

a {
  color: var(--color-blue);
}

.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  text-decoration: none;
}
.btn--primary {
  background: var(--color-green);
  color: #fff;
}
.btn--primary:hover {
  background: #1c9463;
}
.btn--ghost {
  background: transparent;
  color: var(--color-anthracite);
  border: 1px solid var(--color-border);
}
.btn--reject {
  background: #c0392b;
  color: #fff;
}
.btn--reject:hover {
  background: #a93226;
}
.btn--danger {
  background: #fff0f0;
  color: #c0392b;
  border: 1.5px solid #f5c6c6;
}
.btn--danger:hover {
  background: #ffe0e0;
  border-color: #c0392b;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
}
.site-header__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.site-header__logo {
  height: 36px;
}
.site-header__title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-anthracite);
  text-decoration: none;
}
.site-header__title:hover {
  color: var(--color-blue);
}
.site-header__back {
  color: var(--color-anthracite);
  font-size: 0.85rem;
  text-decoration: none;
  padding-left: 0.75rem;
  border-left: 1px solid var(--color-border);
}
.site-header__back:hover {
  color: var(--color-blue);
}

/* Suche: Lupe-Icon, klappt ovales Eingabefeld auf statt permanent sichtbarer Box */
.site-header__search {
  display: flex;
  align-items: center;
}
.site-header__search-form {
  max-width: 0;
  overflow: hidden;
  transition: max-width 0.25s ease;
}
.site-header__search-form.open {
  max-width: 240px;
  margin-left: 0.5rem;
}
.site-header__search-form input {
  width: 220px;
  max-width: 100%;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  font-family: inherit;
}
.site-header__account {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-anthracite);
  cursor: pointer;
  text-decoration: none;
}
.icon-btn:hover {
  background: var(--color-bg);
  color: var(--color-blue);
  border-color: var(--color-blue);
}
/* Seitentitel mit Aktions-Icon oben rechts (z. B. PDF-Export auf der
   Exkursions-Detailseite). */
.page-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.page-title-row h1 {
  margin: 0;
}
.page-title-row__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.page-title-row__actions form {
  display: contents;
}

/* Kategorie-Filter auf der Benachrichtigungen-Seite: Icon-Buttons statt
   Checkbox-Dropdown -- aktiv (aria-pressed="true") farbig/normal, abgewaehlt
   stark abgeblendet, damit auf einen Blick klar ist, was gerade ausgeblendet
   ist. */
.notif-filter-bar {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.notif-filter-bar .icon-btn[aria-pressed="true"] {
  background: var(--color-blue);
  border-color: var(--color-blue);
  color: #fff;
}
.notif-filter-bar .icon-btn[aria-pressed="false"] {
  opacity: 0.3;
}
.notif-filter-bar__sep {
  width: 1px;
  align-self: stretch;
  background: var(--color-border);
  margin: 0 0.2rem;
}
/* "Nur offene"-Schalter: zusaetzlich zum Kategorie-Filter -- blendet alles
   aus, wo fuer diesen Nutzer gerade keine Aktion/Entscheidung mehr aussteht
   (siehe `open`-Flag je Karte in modules/notifications/routes.js). */
.notif-toggle-pill {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-anthracite);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.notif-toggle-pill:hover {
  border-color: var(--color-blue);
}
.notif-toggle-pill[aria-pressed="true"] {
  background: var(--color-blue);
  border-color: var(--color-blue);
  color: #fff;
}
/* Kleinere Zwischenueberschriften je Benachrichtigungs-Kategorie (siehe
   views/notifications.ejs) -- bewusst kleiner als ein normales <h2>, da es
   hier nur um Gruppierung geht, nicht um eine eigene Seitensektion. */
.notif-section-title {
  font-size: 1rem;
  color: #888;
  margin: 1.5rem 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Notification-Badge: weisse Zahl in rotem Kreis, wie App-Benachrichtigungen */
.notification-btn {
  position: relative;
}
.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: #c0392b;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 2px solid var(--color-surface);
}

/* Dashboard */
.dashboard {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1.5rem;
}
.dashboard__entry-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}
/* HTML-Tools bekommt eine eigene volle Zeile unter Intranet/Kalender. */
.dashboard__entry-tiles > .tile-accordion--green {
  grid-column: 1 / -1;
}
@media (max-width: 700px) {
  .dashboard__entry-tiles {
    grid-template-columns: 1fr;
  }
  .dashboard__entry-tiles > .tile-accordion--green {
    grid-column: auto;
  }
}
.tile {
  display: block;
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: #fff;
}
.tile--blue {
  background: var(--color-blue);
}
.tile--green {
  background: var(--color-green);
}
.tile h2 {
  color: #fff;
  margin-top: 0;
}

/* Dashboard-Akkordeon: Kachel klappt zu Untermenue mit farblich passendem
   Hintergrund auf (Planung: "ähnliche Hintergrundfarbe wie der gewählte
   Bereich"). */
.tile-accordion {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.tile-accordion__summary {
  display: block;
  padding: 1.5rem;
  cursor: pointer;
  color: #fff;
  list-style: none;
}
.tile-accordion__summary::-webkit-details-marker {
  display: none;
}
.tile-accordion__summary h2 {
  color: #fff;
  margin: 0 0 0.25rem;
}
.tile-accordion__summary p {
  margin: 0;
}
.tile-accordion--blue > .tile-accordion__summary {
  background: var(--color-blue);
}
.tile-accordion--green > .tile-accordion__summary {
  background: var(--color-green);
}
.tile-accordion--yellow > .tile-accordion__summary {
  background: var(--color-accent);
}
.tile-accordion--yellow > .tile-accordion__summary h2,
.tile-accordion--yellow > .tile-accordion__summary p {
  color: var(--color-anthracite);
}
.tile-accordion__summary--with-action {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.tile-accordion__content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  padding: 1rem;
}
.tile-accordion--blue .tile-accordion__content {
  /* Statt color-mix(): html2canvas (Feedback-Screenshot) kann die Funktion
     nicht parsen und bricht sonst mit einem Fehler ab. */
  background: #e6f6fd;
}
.tile-accordion--green .tile-accordion__content {
  background: #def3ea;
}
.tile-accordion--yellow .tile-accordion__content {
  background: #fff8e0;
}
.tile-accordion__content--calendar {
  display: block;
}

/* Kalender-Dashboard-Widget */
.calendar-widget__toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.calendar-widget__month {
  font-size: 0.95rem;
  color: var(--color-anthracite);
  min-width: 9rem;
  text-align: center;
}
.calendar-widget__spacer {
  margin-left: auto;
}
.icon-btn--accent-dark {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-anthracite);
}
.icon-btn--accent-dark:hover {
  background: #e0a800;
  border-color: #e0a800;
  color: var(--color-anthracite);
}
.calendar-filter {
  position: relative;
}
.calendar-filter__panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.6rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  white-space: nowrap;
}
.calendar-filter__panel label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--color-anthracite);
  cursor: pointer;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.calendar-grid--head {
  margin-bottom: 4px;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #8a9499;
  text-transform: uppercase;
}
.calendar-day {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 56px;
  padding: 3px 4px;
  border-radius: 6px;
  background: var(--color-surface);
  text-decoration: none;
  color: var(--color-anthracite);
  overflow: hidden;
}
.calendar-day:hover {
  background: #fff4da;
}
.calendar-day--empty {
  background: transparent;
  pointer-events: none;
}
.calendar-day--today {
  box-shadow: inset 0 0 0 1.5px var(--color-accent);
}
/* Belegungskalender (Buchen-Feature): belegte Tage schattiert und als
   <button> anklickbar (Default-Button-Stil zurueckgesetzt, damit es wie die
   uebrigen Kalendertage aussieht). */
button.calendar-day {
  border: none;
  font: inherit;
  width: 100%;
  text-align: left;
}
.calendar-day--booked {
  background: #ffe0b2;
  cursor: pointer;
}
.calendar-day--booked:hover {
  background: #ffd08a;
}
.calendar-day__num {
  font-size: 0.72rem;
  font-weight: 700;
}
.calendar-event-chip {
  display: block;
  font-size: 0.6rem;
  line-height: 1.3;
  padding: 1px 4px;
  border-radius: 4px;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calendar-event-chip--veranstaltung { background: var(--color-blue); }
.calendar-event-chip--exkursion { background: var(--color-green); }
.calendar-event-chip--sonstiges { background: #888; }
.calendar-event-chip--ferien { background: #d8dcdf; color: var(--color-anthracite); }
.calendar-event-chip--fahrzeug { background: var(--color-blue); text-decoration: none; }
.calendar-grid--alle-fahrzeuge .calendar-day { min-height: 76px; }
.calendar-event-more {
  font-size: 0.6rem;
  color: #999;
}
@media (max-width: 560px) {
  .calendar-day { min-height: 40px; }
  .calendar-event-chip, .calendar-event-more { display: none; }
}

/* Wochenuebersicht (/kalender/woche) */
.kalender-week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.6rem;
}
@media (max-width: 900px) {
  .kalender-week-grid { grid-template-columns: repeat(2, 1fr); }
}
.kalender-week-day {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.75rem;
  min-height: 160px;
}
.kalender-week-day__head {
  display: flex;
  flex-direction: column;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--color-anthracite);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.4rem;
  margin-bottom: 0.5rem;
}
.kalender-week-day__head span {
  font-weight: 400;
  font-size: 0.72rem;
  color: #999;
}
.kalender-week-event {
  border-radius: 6px;
  padding: 0.3rem 0.5rem;
  margin-bottom: 0.4rem;
  font-size: 0.78rem;
  color: #fff;
}
.kalender-week-event strong { display: block; }
.kalender-week-event span { display: block; font-size: 0.7rem; opacity: 0.9; }
.kalender-week-event--veranstaltung { background: var(--color-blue); }
.kalender-week-event--exkursion { background: var(--color-green); }
.kalender-week-event--sonstiges { background: #888; }
.kalender-week-event--ferien { background: #d8dcdf; color: var(--color-anthracite); }

/* Kategorie-Badge auf der Tagesansicht (/kalender/tag), gleiche Farben wie
   die Monats-Chips und die Wochenansicht. */
.calendar-category-badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
}
.calendar-category-badge--veranstaltung { background: var(--color-blue); }
.calendar-category-badge--exkursion { background: var(--color-green); }
.calendar-category-badge--sonstiges { background: #888; }
.calendar-category-badge--ferien { background: #d8dcdf; color: var(--color-anthracite); }
/* Projekte-Kachel: gruppiert in fachspezifisch/fachunspezifisch statt eines
   einzelnen Karten-Grids */
.tile-accordion__content--grouped {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.project-group__title {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-anthracite);
}
.project-group__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}
.sub-card {
  position: relative;
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow);
}
.sub-card__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem 1rem;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--color-anthracite);
  text-align: center;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}
.sub-card__icon {
  display: flex;
}
.sub-card__chip {
  display: inline-block;
  background: var(--color-anthracite);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
}
.tile-accordion--green .sub-card:hover .sub-card__chip,
.tile-accordion--blue .sub-card:hover .sub-card__chip {
  background: #fff;
  color: var(--color-anthracite);
}
/* Hover-Farbwechsel passend zur Elternkachel (blau = Intranet, gruen = Projekte) */
.tile-accordion--blue .sub-card:hover .sub-card__link {
  background: var(--color-blue);
  color: #fff;
}
.tile-accordion--green .sub-card:hover .sub-card__link {
  background: var(--color-green);
  color: #fff;
}

/* Benachrichtigungs-Badge + Statistik-Icon (Admin/Moderator) auf Unterkaertchen */
.sub-card__badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
}
.sub-card__stats-icon {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-anthracite);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s, transform 0.15s;
}
.sub-card:hover .sub-card__stats-icon {
  opacity: 1;
  transform: translateY(0);
}
.sub-card__stats-icon:hover {
  color: var(--color-blue);
}

/* Zweispaltige Unterseite (z. B. Excursions: Formular links, Karte rechts) */
.split-view {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
}
@media (max-width: 700px) {
  .split-view {
    grid-template-columns: 1fr;
  }
}
.split-view__panel {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}
.placeholder-note {
  color: #7a7a7a;
  font-size: 0.9rem;
}
.map-placeholder {
  height: 240px;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7a7a7a;
}
.disabled-form input {
  background: #f2f2f2;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.project-card {
  display: block;
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--color-anthracite);
}
.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
}
.badge--sandbox {
  background: var(--color-accent);
  color: var(--color-anthracite);
}
.badge--produktiv {
  background: var(--color-green);
  color: #fff;
}

.empty-state {
  color: #7a7a7a;
}

/* HTML-Tools: "Fenster" (tool-frame) um alle Werkzeug-Kaertchen. Im
   Ruhezustand nur das runde Profilbild sichtbar; bei Hover/Fokus klappt das
   Infokaertchen SEITLICH auf (kein separat schwebendes Fenster) und drueckt
   dabei die folgenden Kaertchen im gleichen Frame zur Seite, da es ganz
   normal im Fluss der Flex-Zeile waechst statt absolut positioniert zu sein. */
.tool-frame {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  padding: 1.5rem;
  margin-top: 1.5rem;
}
.tool-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem;
}
.tool-card {
  display: flex;
  align-items: flex-start;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  overflow: hidden;
  transition: border-radius 0.2s ease;
}
.tool-card:hover,
.tool-card:focus-within {
  border-radius: var(--radius);
}
.tool-card__trigger {
  display: flex;
  padding: 4px;
  cursor: pointer;
  outline: none;
  flex-shrink: 0;
}
.tool-card__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-surface);
  flex-shrink: 0;
}
.tool-card__chip {
  display: inline-block;
  background: var(--color-anthracite);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
}
.tool-card__info {
  width: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  white-space: nowrap;
  transition: width 0.22s ease, max-height 0.22s ease, opacity 0.18s ease;
}
.tool-card:hover .tool-card__info,
.tool-card:focus-within .tool-card__info {
  width: 280px;
  max-height: 600px;
  opacity: 1;
}
.tool-card__info-inner {
  width: 280px;
  padding: 0.75rem 1rem 0.75rem 0.25rem;
  white-space: normal;
}
.tool-card__info-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}
.tool-card__info-head-right {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  margin-left: auto;
}
.tool-card__visibility {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  color: #888;
}
.tool-card__menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: none;
  color: #888;
  cursor: pointer;
  flex-shrink: 0;
}
.tool-card__menu-btn:hover {
  color: var(--color-blue);
  border-color: var(--color-blue);
}

/* Zugriffsrechte-Modal (Menu-Icon im Tool-Kaertchen). */
.tool-access__modes {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.tool-access__modes label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.tool-access__section {
  margin-bottom: 1rem;
}
.tool-access__add-row {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}
.tool-access__add-row input {
  flex: 1;
  min-width: 0;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}
.tool-access__add-row--suggest {
  position: relative;
}
.tool-access__suggestions {
  list-style: none;
  margin: 0;
  padding: 0.25rem;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 5;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  max-height: 220px;
  overflow-y: auto;
}
.tool-access__suggestion {
  display: flex;
  flex-direction: column;
  width: 100%;
  text-align: left;
  padding: 0.4rem 0.6rem;
  border: 0;
  background: none;
  border-radius: calc(var(--radius) - 2px);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
}
.tool-access__suggestion:hover,
.tool-access__suggestion:focus-visible {
  background: var(--color-bg);
}
.tool-access__suggestion-hint {
  font-size: 0.75rem;
  color: #888;
}
.tool-access__hint {
  font-size: 0.8rem;
  color: #888;
  min-height: 1.2em;
  margin: 0 0 0.4rem;
}
.tool-access__schueler-check {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: #666;
  margin: 0 0 0.6rem;
  cursor: pointer;
}
.tool-access__schueler-check input {
  margin-top: 0.15rem;
  flex: none;
}
.tool-access__person-row--pending {
  opacity: 0.75;
  font-style: italic;
}
.tool-access__person-row--pending .tool-access__badge {
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
  background: var(--color-blue);
  border-radius: 999px;
  padding: 0.05rem 0.5rem;
  margin-left: 0.4rem;
}
.tool-access__person-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.tool-access__person-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.85rem;
  padding: 0.3rem 0.6rem;
  background: var(--color-bg);
  border-radius: var(--radius);
}
.tool-access__class-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 200px;
  overflow-y: auto;
}
.tool-card__desc {
  margin: 0;
  font-size: 0.85rem;
  color: #555;
}
.tool-card__divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 0.7rem 0;
}
.tool-card__meta {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.tool-card__meta-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #444;
}
.tool-card__meta-row svg {
  flex-shrink: 0;
  color: #999;
}
.tool-card__links {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.85rem;
}
.tool-card__link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  padding: 0;
  color: var(--color-anthracite);
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  text-align: left;
  text-decoration: none;
}
.tool-card__link svg {
  flex-shrink: 0;
  color: #999;
}
.tool-card__link:hover {
  color: var(--color-blue);
}
.tool-card__link:hover svg {
  color: var(--color-blue);
}
.tool-card__link--primary {
  font-weight: 600;
  color: var(--color-blue);
}
.tool-card__link--primary svg {
  color: var(--color-blue);
}
.tool-card__share {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--color-border);
}
.tool-card__share-row {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}
.tool-card__share-row input {
  flex: 1;
  min-width: 0;
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  font-size: 0.75rem;
}
.tool-card__share-qr {
  width: 120px;
  height: 120px;
  display: block;
  margin: 0 auto;
  cursor: zoom-in;
}
.tool-card__qr-zoom-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 199;
  pointer-events: none;
}
.tool-card__qr-zoom {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(80vw, 480px);
  height: min(80vw, 480px);
  transform: translate(-50%, -50%);
  border: 8px solid #fff;
  border-radius: var(--radius);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  z-index: 200;
  pointer-events: none;
  background: #fff;
}
.tool-stats-chart {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.tool-stats-chart__row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
}
.tool-stats-chart__label {
  width: 2.8rem;
  color: #888;
  flex-shrink: 0;
}
.tool-stats-chart__bar-wrap {
  flex: 1;
  background: var(--color-bg);
  border-radius: 999px;
  overflow: hidden;
  height: 10px;
}
.tool-stats-chart__bar {
  display: block;
  height: 100%;
  background: var(--color-blue);
  border-radius: 999px;
}
.tool-stats-chart__value {
  width: 1.5rem;
  text-align: right;
  flex-shrink: 0;
  font-weight: 600;
}

/* Auth-Seiten */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  padding: 1rem;
}
.auth-card {
  background: var(--color-surface);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 380px;
}
.auth-card__logo {
  height: 48px;
  display: block;
  margin: 0 auto 1rem;
}
.auth-card label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.auth-card__checkbox-label {
  display: flex !important;
  align-items: flex-start;
  gap: 0.5rem;
}
.auth-card__checkbox-label input {
  width: auto !important;
  margin-top: 0.2rem !important;
}
.auth-card input,
.auth-card select {
  width: 100%;
  padding: 0.6rem;
  margin-top: 0.3rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}
.form-error {
  color: #c0392b;
}
.form-success {
  color: var(--color-green);
}

.impersonation-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  background: #fff3cd;
  color: #664d03;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  text-align: center;
}
.impersonation-banner form {
  margin: 0;
}
.impersonation-banner button {
  background: #664d03;
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 0.3rem 0.8rem;
  cursor: pointer;
  font-size: 0.85rem;
}

/* Generische Inhaltsseite */
.page {
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5rem;
}
.page--wide {
  max-width: 980px;
}
.feedback-verwaltung-page {
  max-width: 90%;
}
.feedback-thumb {
  width: 60px;
  height: 40px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  cursor: zoom-in;
  display: block;
}
.feedback-thumb-zoom-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 199;
  pointer-events: none;
}
.feedback-thumb-zoom {
  position: fixed;
  top: 50%;
  left: 50%;
  max-width: min(80vw, 700px);
  max-height: 80vh;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  border: 6px solid #fff;
  border-radius: var(--radius);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  z-index: 200;
  pointer-events: none;
  background: #fff;
}
.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 6.5rem;
  padding: 0.3rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.status-chip--open {
  background: var(--color-border);
  color: #555;
}
.status-chip--in_progress {
  background: var(--color-accent);
  color: var(--color-anthracite);
}
.status-chip--resolved {
  background: var(--color-green);
  color: #fff;
}
.datenschutz-draft-notice {
  background: #fff3cd;
  color: #664d03;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}
.page form label {
  display: block;
  margin-bottom: 1rem;
}
.page input,
.page textarea,
.page select {
  width: 100%;
  padding: 0.6rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.entry-list {
  padding-left: 1.2rem;
}

/* Footer -- zweistufig wie ljbm.lu (Logo-Bereich + dunkle Copyright-Zeile),
   dunkles Anthrazit statt reines Schwarz. */
.site-footer {
  background: var(--color-footer-bg);
  color: #fff;
  margin-top: 2rem;
}
.site-footer__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
}
.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.site-footer__logo {
  height: 28px;
  filter: brightness(0) invert(1);
}
.site-footer__copyright {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}
/* Footer-Links, oeffnen das Bottom-Sheet (siehe unten) statt eigener Seiten */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}
.footer-link-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  padding: 0.25rem 0;
}
.footer-link-btn:hover {
  color: var(--color-accent);
}
.footer-group__hint {
  color: #999;
}

/* Bottom-Sheet: klappt von unten ins Bild, mit Backdrop + X zum Schliessen */
.bottom-sheet {
  position: fixed;
  inset: 0;
  z-index: 900;
  visibility: hidden;
}
.bottom-sheet[aria-hidden='false'] {
  visibility: visible;
}
.bottom-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.bottom-sheet[aria-hidden='false'] .bottom-sheet__backdrop {
  opacity: 1;
}
.bottom-sheet__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 82vh;
  background: var(--color-surface);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  flex-direction: column;
}
.bottom-sheet[aria-hidden='false'] .bottom-sheet__panel {
  transform: translateY(0);
}
.bottom-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}
.bottom-sheet__header h2 {
  margin: 0;
}
.bottom-sheet__body {
  padding: 1.25rem 1.5rem 2rem;
  overflow-y: auto;
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}
.bottom-sheet__body p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0 0 1rem;
}
.kontakt-form input,
.kontakt-form select,
.kontakt-form textarea {
  width: 100%;
  padding: 0.5rem 0.6rem;
  margin-bottom: 0.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  font-family: inherit;
  font-size: 0.85rem;
}
.kontakt-form .btn {
  width: 100%;
}
.kontakt-form__status {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--color-green);
}

/* Feedback-Floating-Button, klassische Position unten rechts (Planung
   Abschnitt 10) */
.feedback-fab {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 40;
  background: var(--color-accent);
  color: var(--color-anthracite);
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  border: none;
  box-shadow: var(--shadow);
  text-decoration: none;
  font-weight: 600;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

/* Feedback-Fenster: gelbes Theme passend zum Floating-Button */
.drawer--feedback .drawer__header {
  background: var(--color-accent);
  border-bottom: none;
}
.drawer--feedback .drawer__header h2 {
  color: var(--color-anthracite);
}
.drawer--feedback .drawer__header .icon-btn {
  border-color: rgba(78, 88, 93, 0.3);
}
.drawer--feedback .drawer__header .icon-btn:hover {
  background: rgba(255, 255, 255, 0.4);
  border-color: var(--color-anthracite);
}
.feedback-admin-link {
  text-align: center;
  font-size: 0.85rem;
}

/* Menu-Drawer: Verwaltungs-Links (Anfragen/Nutzerverwaltung/Feedback) statt Zahnrad-Seite */
.settings-drawer__nav {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--color-border);
}
.settings-drawer__link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0.25rem;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-anthracite);
  text-decoration: none;
  font-weight: 500;
}
.settings-drawer__link:hover {
  color: var(--color-blue);
}
.settings-drawer__link span:first-child {
  flex: 1;
}
.settings-drawer__chevron {
  color: #aaa;
  font-size: 1.1rem;
}
.notification-badge--inline {
  position: static;
}

/* Profil-Pill im Header: Name+Rolle oval umkreist neben Personen-Icon */
.profile-pill {
  position: relative;
}
.profile-pill__btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem 0.4rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-anthracite);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.profile-pill__btn:hover {
  background: var(--color-bg);
  border-color: var(--color-blue);
  color: var(--color-blue);
}
.profile-pill__btn svg {
  flex-shrink: 0;
}
.profile-pill__menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 500;
  min-width: 200px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.profile-pill__menu a,
.profile-pill__menu button {
  display: block;
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: none;
  background: none;
  border-radius: calc(var(--radius) - 4px);
  color: var(--color-anthracite);
  text-decoration: none;
  font-family: inherit;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
}
.profile-pill__menu a:hover,
.profile-pill__menu button:hover {
  background: var(--color-bg);
  color: var(--color-blue);
}

/* Dashed Dropzone statt zweier separater Buttons -- zeigt nach der Aufnahme
   den markierten Bereich direkt an derselben Stelle. */
.feedback-capture-zone {
  margin-bottom: 1rem;
  border-radius: var(--radius);
  overflow: hidden;
}
.feedback-capture-zone__placeholder {
  width: 100%;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  color: #888;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}
.feedback-capture-zone__placeholder:hover {
  border-color: var(--color-accent);
  color: var(--color-anthracite);
}
.feedback-capture-zone__preview {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
}
.feedback-capture-zone__preview img {
  display: block;
  width: 100%;
  height: auto;
}
.feedback-capture-zone__toolbar {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  gap: 0.4rem;
}
.feedback-capture-zone__toolbar .icon-btn {
  background: rgba(255, 255, 255, 0.9);
  width: 30px;
  height: 30px;
}

/* Bearbeiten-Overlay: vergroessert das Bild fuer praezises Markieren */
.feedback-edit-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feedback-edit-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}
.feedback-edit-modal__panel {
  position: relative;
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 1rem;
  max-width: 92vw;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.feedback-edit-modal__hint {
  margin: 0;
  font-size: 0.85rem;
  color: #888;
}
#feedback-edit-canvas {
  max-width: 88vw;
  max-height: 70vh;
  display: block;
  cursor: crosshair;
  border-radius: calc(var(--radius) - 4px);
  touch-action: none;
}
.feedback-edit-modal__toolbar {
  display: flex;
  gap: 0.5rem;
}
.feedback-select-overlay {
  position: fixed;
  inset: 0;
  z-index: 950;
  cursor: crosshair;
  background: rgba(0, 0, 0, 0.15);
}
.feedback-select-box {
  position: fixed;
  border: 2px dashed var(--color-accent);
  background: rgba(255, 182, 6, 0.15);
  pointer-events: none;
}

/* Excursions-Antragsworkflow */
.category-chooser {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

/* Kategorie-Etappen: Schulgelaende -> Zeitpunkt -> Uebernachtung -> In-/
   Ausland erscheinen nacheinander (JS setzt/entfernt "hidden" je Etappe).
   Einzug + linker Rahmen zeigen die Verschachtelung im Entscheidungsbaum. */
.kategorie-stage {
  margin-bottom: 0.5rem;
  animation: kategorie-stage-in 0.25s ease;
}
.kategorie-stage--indent-1,
.kategorie-stage--indent-2,
.kategorie-stage--indent-3 {
  border-left: 2px solid var(--color-border);
  padding-left: 1rem;
}
.kategorie-stage--indent-1 {
  margin-left: 0.75rem;
}
.kategorie-stage--indent-2 {
  margin-left: 1.5rem;
}
.kategorie-stage--indent-3 {
  margin-left: 2.25rem;
}
@keyframes kategorie-stage-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.sub-card--info {
  cursor: pointer;
}
.sub-card--info summary {
  list-style: none;
}
.sub-card--info summary::-webkit-details-marker {
  display: none;
}
.checklist-box {
  background: #fff4da;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}
.checklist-box ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}
.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
}
.checkbox-label input {
  width: auto !important;
}
/* Lifecycle-Statusleiste (Antragsstatus: eingereicht -> genehmigt ->
   abgerechnet, mit abgelehnt als Alternativ-Endzustand) */
.stage-stepper {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.5rem 0;
  font-size: 0.8rem;
}
.stage-stepper__step {
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: var(--color-border);
  color: #7a7a7a;
  white-space: nowrap;
}
.stage-stepper__step--done {
  background: var(--color-green);
  color: #fff;
}
.stage-stepper__step--current {
  background: var(--color-accent);
  color: var(--color-anthracite);
}
/* Einfaches Status-Badge (Fiche Echange de lecons: eingereicht/genehmigt/
   abgelehnt -- kein Abrechnungs-Endzustand wie bei Excursions, daher kein
   stage-stepper). */
.status-badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--color-border);
  color: #7a7a7a;
}
/* Direkt hinter einem Link platziert (z. B. Begleitbrief-Status in der
   Dokumente-Liste) statt in eigener Zeile/Karte. */
.status-badge--inline {
  margin-left: 0.5rem;
}
.status-badge--genehmigt {
  background: var(--color-green);
  color: #fff;
}
.status-badge--eingereicht {
  background: var(--color-accent);
  color: var(--color-anthracite);
}
.status-badge--abgelehnt {
  background: #c0392b;
  color: #fff;
  font-weight: 600;
}
.status-badge--entwurf {
  background: var(--color-border);
  color: #666;
}
/* Exkursion bereits genehmigt, aber z. B. der Begleitbrief noch nicht von
   der Administration kontrolliert/signiert -- Zwischenstufe zwischen grau
   (entwurf) und gruen (kontrolliert/genehmigt). */
.status-badge--warnung {
  background: var(--color-accent);
  color: var(--color-anthracite);
}
/* Hover-Detail auf "Genehmigung ausstehend" (nur Admin/Zustaendige, siehe
   stage-stepper.ejs) -- klappt die Accord-de-principe/Kosten/Fahrzeug/
   Dokumente-Chips in einer Zeile darunter auf, ohne eine permanente zweite
   Karte auf der Antragsseite zu brauchen. */
.stage-stepper__step--hoverable {
  position: relative;
  cursor: help;
}
.stage-stepper__popover {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.75rem;
  width: max-content;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  white-space: normal;
}
/* Sprechblasen-Pfeil, zeigt auf den ausloesenden Chip. */
.stage-stepper__popover::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-bottom-color: #fff;
}
.stage-stepper__popover::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-bottom-color: var(--color-border);
  z-index: -1;
}
.stage-stepper__step--hoverable:hover .stage-stepper__popover,
.stage-stepper__step--hoverable:focus .stage-stepper__popover {
  display: flex;
}
.stage-stepper__step--rejected {
  background: #c0392b;
  color: #fff;
  font-weight: 600;
}
/* Feedback-Chip ist auf der Detailseite ein <a> (Sprung zu #feedback-
   section), in der Antragsliste ein <span> (die ganze Karte ist schon ein
   Link) -- beide sollen optisch identisch zu den anderen Chips bleiben. */
a.stage-stepper__step {
  text-decoration: none;
  display: inline-block;
}
/* Nach der Exkursion, solange noch kein Feedback abgegeben wurde: dezent
   pulsierender Chip als Blickfang, ohne aufdringlich zu wirken. */
.stage-stepper__step--pulse {
  animation: stage-stepper-pulse 1.6s ease-in-out infinite;
}
@keyframes stage-stepper-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
.stage-stepper__connector {
  width: 1.25rem;
  height: 2px;
  background: var(--color-border);
}
.stage-stepper__connector--done {
  background: var(--color-green);
}

/* Chip-Timeline pro Exkursionsanfrage (partials/exkursion-timeline.ejs) --
   interner Statusüberblick der mehrstufigen Genehmigung fuer Direktion/
   Comptabilité/Sekretariat, ersetzt auf der Notifications-Seite viele
   einzelne Benachrichtigungszeilen durch eine Karte je Anfrage. */
.exkursion-timeline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 0.6rem;
  text-decoration: none;
  color: inherit;
  background: #fff;
}
a.exkursion-timeline:hover {
  border-color: var(--color-blue);
}
.exkursion-timeline__icon {
  display: flex;
  color: var(--color-anthracite);
  flex-shrink: 0;
}
.exkursion-timeline__titleblock {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.exkursion-timeline__title {
  font-weight: 700;
}
.exkursion-timeline__date {
  color: #888;
  font-size: 0.85rem;
}
.exkursion-timeline__chip {
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  background: var(--color-border);
  color: #7a7a7a;
}
.exkursion-timeline__chip--done {
  background: var(--color-green);
  color: #fff;
}
.exkursion-timeline__chip--pending {
  background: var(--color-accent);
  color: var(--color-anthracite);
}
.exkursion-timeline__chip--rejected {
  background: #c0392b;
  color: #fff;
}

/* Request-Liste mit Stage-Stepper */
.request-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}
.request-list__item a {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--color-anthracite);
}
.request-list__date {
  display: block;
  font-size: 0.85rem;
  color: #7a7a7a;
  margin: 0.15rem 0 0.35rem;
}
/* Entwuerfe: eigene Zeile mit Loesch-Button rechts statt Stage-Stepper --
   .stage-stepper deckt den Entwurf-Status bewusst nicht ab (siehe stage-
   stepper.ejs), da er kein Teil des eingereicht->genehmigt->...-Zyklus ist. */
.request-list__item--draft {
  position: relative;
}
.request-list__resume {
  cursor: pointer;
}
.request-list__delete-form {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
}
.request-list__delete-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: var(--color-bg);
  color: #888;
  cursor: pointer;
  font-size: 0.75rem;
}
.request-list__delete-btn:hover {
  background: #f0d0d0;
  color: #c0392b;
}
/* Recycling-Icon bei genehmigten (oder weiter fortgeschrittenen) Antraegen --
   gleiches Platzierungsmuster wie der Loesch-Button bei Entwuerfen oben,
   als Geschwister-Element der Karten-<a>, nicht darin verschachtelt (sonst
   wuerde ein Klick auf den Button zusaetzlich die Kartennavigation ausloesen). */
.request-list__item--approved {
  position: relative;
}
.request-list__recycle-form {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
}
.request-list__recycle-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: var(--color-bg);
  color: #888;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.request-list__recycle-btn:hover {
  background: var(--color-accent);
  color: var(--color-anthracite);
}
.notification-item--unread {
  border-left: 3px solid var(--color-accent);
}
.notification-item p {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  color: #555;
}

/* Excursions-Landing: Split-Layout (Liste/Wizard links, Karte rechts) */
.excursions-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}
@media (max-width: 900px) {
  .excursions-page {
    grid-template-columns: 1fr;
  }
}
.excursions-page__list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.excursions-page__list-head h1 {
  margin: 0;
}
.excursions-page__map {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.exkursionskarte-frame {
  width: 100%;
  height: 480px;
  border: none;
  display: block;
}

/* Orientation-Landingseite: zwei Tabs links (Orienteurs/Stages) ueber der
   Liste, gleiches Grid wie Excursions (excursions-page wird mitbenutzt). */
.orientation-tabs {
  display: flex;
  gap: 0.4rem;
  margin: 1rem 0 1.25rem;
  border-bottom: 1px solid var(--color-border);
}
.orientation-tab {
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  padding: 0.5rem 0.2rem;
  margin-bottom: -1px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  color: #888;
  cursor: pointer;
}
.orientation-tab:hover {
  color: var(--color-anthracite);
}
.orientation-tab--active {
  color: var(--color-anthracite);
  border-bottom-color: var(--color-green);
}
.orientation-field {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-anthracite);
  margin-bottom: 1rem;
}
.orientation-input,
.orientation-select,
.orientation-field input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 2.7rem;
  margin-top: 0.35rem;
  padding: 0 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 2.65rem;
  color: var(--color-anthracite);
  background: var(--color-surface);
}
.orientation-select {
  margin-top: 0;
  padding-right: 2rem;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%234e585d'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
}
.orientation-stages-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.orientation-stages-toolbar .orientation-select,
.orientation-stages-toolbar .orientation-input {
  flex: 1 1 160px;
}
/* Nur 3 Eintraege auf einen Blick, Rest scrollt -- sonst sprengt eine lange
   Liste die Seite neben der festen Kartenhoehe rechts. */
#stage-list {
  max-height: 300px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

/* Plus-Button (neue Anfrage), Hover-Farbwechsel wie gewuenscht */
.plus-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: none;
  background: var(--color-green);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.plus-btn:hover {
  background: var(--color-blue);
}

/* Side-in-Drawer (Excursions-Wizard) */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
  visibility: hidden;
}
.drawer[aria-hidden='false'] {
  visibility: visible;
}
.drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.drawer[aria-hidden='false'] .drawer__backdrop {
  opacity: 1;
}
.drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(680px, 100%);
  background: var(--color-surface);
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}
.drawer[aria-hidden='false'] .drawer__panel {
  transform: translateX(0);
}
.drawer__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid var(--color-border);
}
.drawer__step-title {
  margin: 0.35rem 0 0;
}
.drawer__header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.wizard-autosave-status {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: #999;
  min-height: 1.1em;
}
.drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
}
.drawer__body label {
  display: block;
  margin-bottom: 1rem;
}
.drawer__body input,
.drawer__body select,
.drawer__body textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  /* <input>/<select>/<textarea> erben Schriftgroesse/-familie standardmaessig
     NICHT vom umgebenden Text (Browser-Vorgabe), ohne das hier explizit zu
     setzen landen sie beim kleinen Browser-Standard (13.3px Arial) statt bei
     der Seitenschrift -- gleiche Groesse wie z. B. "Datum waehlen". */
  font-size: 1rem;
  font-family: inherit;
}
/* Zwei Felder nebeneinander in einer Zeile (z. B. Datum/Datum bis bei
   Uebernachtung) statt untereinander gestapelt. */
.wizard-field-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.wizard-field-row > label {
  flex: 1;
  min-width: 0;
}
/* Zieladresse: drei Felder (Strasse+Nummer, PLZ+Ort, Land) statt einem
   einzelnen Freitextfeld. Groesse/Abstand bewusst exakt wie beim "Datum
   waehlen"-Feld (.daterange__display: padding 0.6rem/0.75rem, 1rem statt
   des sonst ueblichen Browser-Default-Schriftgrads bei <input>) -- dadurch
   automatisch insgesamt etwa so hoch wie die Minikarte rechts daneben, ohne
   das exakt erzwingen zu muessen. */
.destination-address-fields {
  flex: 1;
  min-width: 0;
}
.destination-address-fields label {
  margin-bottom: 0.5rem;
}
.destination-address-fields input {
  display: block;
  padding: 0.6rem 0.75rem;
  font-size: 1rem;
  font-family: inherit;
  margin-bottom: 0.5rem;
}
.destination-address-fields input:last-child {
  margin-bottom: 0;
}
/* Zieladresse-Minikarte rechts neben dem Adressfeld (gleiche Zeile). */
.destination-map-wrap {
  flex: 1;
  min-width: 0;
}
.destination-map-wrap .echange-mini-map {
  margin-bottom: 0;
}

/* Datum-Zeitraum-Picker (Booking-Stil): ein Klick auf die Anzeige oeffnet
   eine Kalender-Popover statt zwei einzelner nativer Date-Inputs. Start
   antippen, bei "mit Uebernachtung" zusaetzlich das Ende -- ein Enddatum vor
   dem Start startet einfach eine neue Auswahl (so kann "bis" nie vor "von"
   liegen). Die echten dateDebut/dateFin-Inputs bleiben als Datenhalter
   bestehen, sind aber bewusst per hidden-Attribut nicht mehr bedienbar. */
.daterange {
  position: relative;
  margin-bottom: 1rem;
}
.daterange__display {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
}
.daterange__placeholder {
  color: #999;
}
.daterange__sep {
  color: #999;
}
.daterange__icon {
  margin-left: auto;
  color: #999;
  flex-shrink: 0;
}
.daterange__popover {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  z-index: 20;
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  padding: 1rem;
  width: 300px;
}
.daterange__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.daterange__nav {
  background: none;
  border: none;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-anthracite);
  width: 28px;
  height: 28px;
  border-radius: 50%;
}
.daterange__nav:hover {
  background: var(--color-bg);
}
.daterange__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.7rem;
  color: #999;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.daterange__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.daterange-grid__day {
  aspect-ratio: 1;
  border: none;
  background: none;
  border-radius: 50%;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-anthracite);
  padding: 0;
}
.daterange-grid__day:hover:not(:disabled) {
  background: var(--color-bg);
}
.daterange-grid__day--empty {
  visibility: hidden;
  cursor: default;
}
.daterange-grid__day--disabled {
  color: #ddd;
  cursor: not-allowed;
}
.daterange-grid__day--today {
  font-weight: 800;
  text-decoration: underline;
}
.daterange-grid__day--start,
.daterange-grid__day--end {
  background: var(--color-accent);
  color: var(--color-anthracite);
  font-weight: 700;
}
.daterange-grid__day--in-range {
  background: #fff3d6;
  border-radius: 0;
}
.daterange__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--color-border);
}
.daterange__hint {
  font-size: 0.75rem;
  color: #999;
}
.daterange__clear {
  background: none;
  border: none;
  color: var(--color-blue);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}
/* Abstand vor den Unterteilungstiteln im Wizard (z.B. "Transport" direkt
   nach dem Begleitpersonen-Repeater) -- .excform-section__title bringt sonst
   nur unteren Abstand mit, gedacht fuer den Einsatz in .excform-section-Boxen
   mit eigenem Padding. */
.drawer__body .excform-section__title {
  margin-top: 1.5rem;
}
.drawer__nav {
  display: flex;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--color-border);
}
/* Im schmalen Drawer eine Spalte statt des breiteren Zwei-Spalten-Rasters,
   sonst wird der Text der Kategorie-Karten abgeschnitten. */
.drawer__body .category-chooser {
  grid-template-columns: 1fr;
}
.category-option {
  cursor: pointer;
  /* Grid-Items haben implizit min-width:auto (= Inhaltsbreite als Minimum),
     wodurch lange Woerter das Panel sprengen statt umzubrechen. */
  min-width: 0;
  overflow-wrap: break-word;
}
.category-option input {
  width: auto !important;
  margin-right: 0.4rem;
}

/* Wizard-Prozessleiste (Formular-Schritte im Drawer, nicht zu verwechseln
   mit dem Antragsstatus-Stepper oben) */
.wizard-stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.75rem;
}
.wizard-stepper__step {
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--color-border);
  color: #7a7a7a;
  border: none;
  font: inherit;
  cursor: pointer;
}
.wizard-stepper__step:hover {
  filter: brightness(0.95);
}
.wizard-stepper__step--current {
  background: var(--color-accent);
  color: var(--color-anthracite);
  font-weight: 600;
}
.wizard-stepper__step--done {
  background: var(--color-green);
  color: #fff;
}

/* Tabellen (Feedback-Verwaltung) */
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th,
.data-table td {
  padding: 0.5rem;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  font-size: 0.9rem;
}
.data-table {
  margin-bottom: 1.5rem;
}

/* Horizontal scrollbarer Wrapper fuer breite Tabellen (z.B. Fiche Echange
   de lecons mit 11 Spalten) statt Layout-Ueberlauf auf kleinen Bildschirmen. */
.table-scroll {
  overflow-x: auto;
  margin-bottom: 1.5rem;
}
.table-scroll .data-table {
  margin-bottom: 0;
}
.echlecons-table {
  min-width: 980px;
}
.echlecons-table input {
  width: 100%;
  box-sizing: border-box;
  font-size: 0.85rem;
  padding: 0.3rem;
}
.echlecons-table select {
  width: 100%;
  box-sizing: border-box;
  font-size: 0.85rem;
  padding: 0.3rem;
}
.echlecons-table input[type="checkbox"] {
  width: auto;
}
.formation-row--inactive {
  opacity: 0.4;
}

/* Profil-Karte (Persoenliche Daten): Ansicht + Inline-Bearbeiten per Stift-Icon */
.profile-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  max-width: 480px;
}
.profile-card__view {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.profile-card__fields {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.profile-card__fields > div {
  display: flex;
  gap: 0.5rem;
}
.profile-card__fields dt {
  width: 90px;
  flex-shrink: 0;
  color: #888;
  font-size: 0.85rem;
}
.profile-card__fields dd {
  margin: 0;
  font-weight: 600;
}
.profile-card__edit {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.profile-card__edit-actions {
  display: flex;
  gap: 0.5rem;
}

/* Statistiken-Seite (Exkursionskarte, portiert aus statistiken.html) */
.stats-page {
  max-width: 1000px;
}
.stats-filter-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.stats-filter {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  font-family: inherit;
}
.stats-section {
  margin-bottom: 2rem;
}
.stats-section__title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-anthracite);
  font-weight: 800;
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-bg);
}
.bar-row {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}
.bar-row__label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bar-row__dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  flex-shrink: 0;
}
.bar-row__track {
  background: var(--color-bg);
  border-radius: 999px;
  overflow: hidden;
  height: 22px;
}
.bar-row__fill {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0.5rem;
  border-radius: 999px;
  min-width: 4px;
}
.bar-row__count {
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}
.bar-row__count-out {
  color: #999;
  font-size: 0.8rem;
}
.subj-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
}
.subj-row__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex-shrink: 0;
}
.subj-row__name {
  flex: 1;
}
.subj-row__pct {
  color: #999;
  font-size: 0.8rem;
}
.timeline-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
}
.timeline-item__date {
  font-size: 0.75rem;
  color: #999;
}
.timeline-item__main {
  font-weight: 600;
}
.timeline-item__class {
  margin-left: 0.5rem;
  font-weight: 400;
  color: #999;
  font-size: 0.8rem;
}
.timeline-item__exc {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #666;
  font-size: 0.85rem;
  margin-top: 0.2rem;
}
.timeline-item__note {
  margin-top: 0.3rem;
  font-style: italic;
  color: #666;
  font-size: 0.85rem;
}

/* Statistik-Kacheln (Anfragen-Uebersicht & Statistik) */
.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.stats-card {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  min-width: 100px;
}
.stats-card__n {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-anthracite);
}
.stats-card--total {
  background: var(--color-bg);
  border-color: var(--color-blue);
}
.stats-card--total .stats-card__n {
  color: var(--color-blue);
}
/* Aufgaben-Zustaendigkeiten (Nutzerverwaltung, Planung Abschnitt 40) --
   kompaktes Aufgaben-Icon in der Aktion-Spalte oeffnet ein gemeinsames Modal
   (task-modal.ejs) mit Checkboxen statt Mehrfachauswahl-Select. */
.task-assign-btn {
  position: relative;
}
.task-assign-btn__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--color-blue);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 2px solid var(--color-surface);
}
.task-modal__list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 0.75rem 0 1rem;
}
.task-modal__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400;
}
.task-modal__item input {
  width: auto !important;
}

/* Rechte-Modal (vorher "Aufgaben"): Module als aufklappbare Kaertchen. */
.modal__panel--wide {
  width: min(880px, 94vw);
}
.rights-modal__list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 0.75rem 0 1rem;
}
.rights-module {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
}
.rights-module summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}
.rights-module__badge {
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--color-blue);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.rights-module__body {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.rights-module__rights {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.88rem;
  color: var(--color-anthracite);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.rights-module__tasks-heading {
  margin: 0.3rem 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #666;
}

/* Inline-Bearbeiten von Name/IAM/E-Mail in der Nutzerverwaltung (ein
   Bearbeiten-Button in der Aktion-Spalte oeffnet alle drei Felder der
   Zeile). */
.user-row__input {
  width: 100%;
  padding: 0.25rem 0.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}
.user-row__input--iam {
  width: 7rem;
}
.user-row__actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.icon-btn--sm {
  width: 26px;
  height: 26px;
}
.user-row--deactivated {
  opacity: 0.55;
}
.user-row__badge {
  display: inline-block;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: #e2e2e2;
  color: #555;
  font-size: 0.68rem;
  font-weight: 600;
  vertical-align: middle;
}

.untis-code-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 1.25rem;
}
.untis-code-form input,
.untis-code-form select {
  width: auto;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  font-family: inherit;
}
.untis-code-form input[type="color"] {
  width: 36px;
  height: 36px;
  padding: 0;
  flex: none;
  cursor: pointer;
}
/* Spezifitaet ".untis-code-form .untis-dropzone" statt nur ".untis-dropzone"
   noetig, um ".page form label { display: block; margin-bottom: 1rem; }"
   zu schlagen -- sonst bleibt das Label (technisch ein <label>) block-
   gesetzt und der Text zentriert sich nicht, egal was hier steht. */
.untis-code-form .untis-dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.75rem;
  line-height: 1;
  box-sizing: border-box;
  margin: 0;
  padding: 0 1rem;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--color-anthracite);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}
.untis-code-form .btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.75rem;
  line-height: 1;
  box-sizing: border-box;
  margin: 0;
  padding: 0 1.2rem;
  font-size: 0.85rem;
}
.untis-dropzone:hover,
.untis-dropzone--dragover {
  border-color: var(--color-blue);
  background: var(--color-bg);
}

/* Exkursionskarte-Einstellungen: Faecher-Tabelle + Klassen-Tags */
.subject-key-badge {
  font-size: 0.68rem;
  background: var(--color-bg);
  color: var(--color-anthracite);
  padding: 2px 7px;
  border-radius: 8px;
  font-weight: 700;
  white-space: nowrap;
}
.data-table input[type="color"] {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  cursor: pointer;
}
.data-table input[type="text"] {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: inherit;
  width: 100%;
}
.class-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.class-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--color-bg);
  color: var(--color-anthracite);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.85rem;
  font-weight: 700;
}
.class-tag button {
  background: none;
  border: none;
  color: var(--color-anthracite);
  opacity: 0.5;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0;
}
.class-tag button:hover {
  opacity: 1;
  color: #c0392b;
}

/* "Neues Ziel" (Exkursionskarte) -- vollstaendig portiertes Formular aus
   neue-exkursion.html: Kartenpicker+Geocoding, Fotos, Materialien. */
.excform-page {
  max-width: 760px;
}
.excform-hint {
  background: #fff8e0;
  border: 1.5px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: #7a5c00;
  margin-bottom: 1.25rem;
}
.excform-section {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}
.excform-section__title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-anthracite);
  font-weight: 800;
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-bg);
}
.excform-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}
@media (max-width: 560px) {
  .excform-grid { grid-template-columns: 1fr; }
}
.excform-page form .excform-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.excform-field--full {
  grid-column: 1 / -1;
}
.excform-page .excform-field input,
.excform-page .excform-field select,
.excform-page .excform-field textarea {
  font-size: 0.9rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: var(--color-anthracite);
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  font-family: inherit;
}
.excform-geocode-status {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 0.6rem;
}
.excform-map {
  height: 280px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  margin-bottom: 0.9rem;
}
/* Wizard-Schritt "Ziel waehlen" (Phase E): Liste bestehender Exkursionskarte-
   Eintraege zum Anklicken, oberhalb der Auswahlkarte. */
.herkunft-liste {
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin: 0.5rem 0 0.9rem;
}
.herkunft-liste__item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.75rem;
  border: none;
  border-bottom: 1px solid var(--color-border);
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
}
.herkunft-liste__item:last-child { border-bottom: none; }
.herkunft-liste__item:hover { background: var(--color-bg); }
.herkunft-liste__item--active { background: #e8f0fe; border-left: 3px solid #4e585d; }
.herkunft-liste__item small { display: block; opacity: 0.75; }
/* Exkursionskarteneintrag im Feedback-Bereich: Minikarte (klickbar, oeffnet
   die grosse Karte fokussiert auf diesen Punkt) + Chip-Button daneben. */
.exkursionskarte-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.9rem;
}
.exkursionskarte-preview__map-wrap {
  position: relative;
  width: 130px;
  height: 90px;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
}
.exkursionskarte-preview__map {
  width: 100%;
  height: 100%;
}
.exkursionskarte-preview__map-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
}
.chip-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.chip-action:hover {
  background: #fff;
  color: var(--color-blue);
  border-color: var(--color-blue);
}

.excform-toggle-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.75rem 0;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.excform-toggle {
  position: relative;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
  display: inline-block;
}
.excform-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.excform-toggle__slider {
  position: absolute;
  inset: 0;
  background: var(--color-border);
  border-radius: 24px;
  transition: background 0.2s;
}
.excform-toggle__slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.excform-toggle input:checked + .excform-toggle__slider {
  background: var(--color-blue);
}
.excform-toggle input:checked + .excform-toggle__slider::before {
  transform: translateX(18px);
}
.excform-route-hint {
  font-size: 0.78rem;
  color: #888;
  background: var(--color-bg);
  border-radius: var(--radius);
  padding: 0.5rem 0.65rem;
  border-left: 3px solid var(--color-blue);
  margin-bottom: 0.75rem;
}
.excform-coords-row {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}
.excform-coords-row input {
  flex: 1;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  font-family: inherit;
}
.excform-route-status {
  font-size: 0.78rem;
  margin-top: 0.5rem;
}
.excform-route-status--ok {
  color: var(--color-green);
}
.excform-route-status--err {
  color: #c0392b;
}
.excform-upload-zone {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  cursor: pointer;
  background: var(--color-bg);
  transition: border-color 0.15s, background 0.15s;
  margin-bottom: 0.9rem;
  font-size: 0.85rem;
  color: #777;
}
.excform-upload-zone:hover {
  border-color: var(--color-accent);
}
.excform-upload-zone strong {
  color: var(--color-anthracite);
}
.excform-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.6rem;
}
.excform-photo-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--color-bg);
}
.excform-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.excform-photo-item__heart,
.excform-photo-item__remove {
  position: absolute;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.excform-photo-item__remove {
  top: 5px;
  left: 5px;
  width: 22px;
  height: 22px;
  font-size: 0.7rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
}
.excform-photo-item__heart {
  top: 5px;
  right: 5px;
  width: 28px;
  height: 28px;
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.35);
}
.excform-photo-item--profile .excform-photo-item__heart {
  background: rgba(220, 50, 50, 0.8);
}
.excform-photo-item__label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(220, 50, 50, 0.75);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  text-align: center;
  padding: 3px 0;
  letter-spacing: 0.3px;
  display: none;
}
.excform-photo-item--profile .excform-photo-item__label {
  display: block;
}
.excform-material-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--color-bg);
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.5rem;
}
.excform-material-item__name {
  font-size: 0.84rem;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.excform-material-item__author {
  width: 160px;
  flex-shrink: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.4rem 0.6rem;
  font-size: 0.8rem;
  font-family: inherit;
}
.excform-material-item__remove {
  background: none;
  border: none;
  color: #ccc;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.1rem 0.3rem;
}
.excform-material-item__remove:hover {
  color: #c0392b;
}
.excform-upload-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius);
  padding: 0.6rem 0.9rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--color-anthracite);
  cursor: pointer;
  background: var(--color-bg);
  width: 100%;
  font-family: inherit;
}
.excform-upload-btn:hover {
  border-color: var(--color-accent);
}
a.excform-upload-btn {
  text-decoration: none;
  box-sizing: border-box;
}
/* "+ Kostenposition/Eigenkapital hinzufuegen" sollen nicht die volle
   Zeilenbreite ausfuellen, sondern wie ein normaler Button nur so breit wie
   ihr Text sein -- plus Abstand nach unten zur naechsten Zeile/zum naechsten
   Block. Beide auf dieselbe (an den laengeren Text "Kostenposition"
   angepasste) feste Breite, damit sie nicht unterschiedlich breit wirken. */
.excform-upload-btn--costline,
.excform-upload-btn--ownfunds {
  display: inline-flex;
  width: 230px;
  margin: 0 0 0.75rem;
}

/* Dokumente-Checkliste (Autorisation parentale / Fiche medicale / Begleit-
   brief): runder Haken wird automatisch gruen, sobald der jeweilige Punkt
   erledigt ist (Datei hochgeladen bzw. Checkbox bestaetigt). */
.doc-checklist {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1rem 0;
}
.doc-checklist__item {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1rem;
  background: var(--color-bg);
  border-radius: var(--radius);
}
.doc-checklist__check {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: #fff;
  flex-shrink: 0;
  margin-top: 0.1rem;
  position: relative;
  transition: background 0.15s, border-color 0.15s;
}
.doc-checklist__check--clickable {
  cursor: pointer;
}
.doc-checklist__check--done {
  background: var(--color-green);
  border-color: var(--color-green);
}
.doc-checklist__check--done::after {
  content: '';
  position: absolute;
  left: 8px;
  top: 4px;
  width: 6px;
  height: 12px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.doc-checklist__body {
  flex: 1;
  min-width: 0;
}
.doc-checklist__body p {
  margin: 0.2rem 0 0.6rem;
  font-size: 0.85rem;
  color: #666;
}
.doc-checklist__filename {
  display: inline-block;
  margin-left: 0.6rem;
  font-size: 0.85rem;
  color: #666;
}
.doc-checklist__placeholder {
  display: block;
  font-size: 0.8rem;
  color: #999;
  font-style: italic;
  margin-bottom: 0.5rem;
}
.doc-checklist__confirm {
  display: flex !important;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.doc-checklist__confirm input {
  width: auto !important;
}
/* Rundes PDF-Symbol rechts in der Dokumente-Checkliste: Vorlage herunter-
   laden (Fiche medicale, Autorisation Ausland, E6) -- solange keine echte
   Vorlagen-Datei hinterlegt ist, bewusst deaktiviert mit erklaerendem
   Tooltip statt eines toten Links. */
.doc-checklist__pdf-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-anthracite);
  cursor: pointer;
  margin-left: 0;
}
.doc-checklist__pdf-icon--disabled {
  color: #ccc;
  cursor: not-allowed;
}

/* Begleitbrief-Editor als Fenster auf derselben Seite (Modal ueber Wizard-
   Drawer/Detailseite, kein separater Tab mehr) -- eigene, einfache Modal-
   Struktur analog .drawer, aber zentriert statt seitlich einfahrend, und mit
   hoeherem z-index, damit sie auch ueber dem Wizard-Drawer liegen kann. */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal[aria-hidden='false'] {
  visibility: visible;
}
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.modal__panel {
  position: relative;
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  width: min(720px, 92vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}
.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid var(--color-border);
}
.modal__header h2 {
  margin: 0;
}
.modal__body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
}
.modal__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0;
}
.modal__alt-upload {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

/* Rich-Text-Toolbar + contenteditable-Flaeche des Begleitbrief-Editors --
   ueber execCommand() statt einer externen Editor-Bibliothek (Bold/Italic/
   Underline/Farbe genuegt fuer den gewuenschten Funktionsumfang). */
.richtext-toolbar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}
.richtext-toolbar__btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  cursor: pointer;
  font-family: inherit;
}
.richtext-toolbar__btn:hover {
  background: var(--color-surface);
}
.richtext-toolbar__color {
  display: flex;
  align-items: center;
  cursor: pointer;
}
.richtext-toolbar__color input[type='color'] {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
}
.richtext-toolbar__sep {
  width: 1px;
  height: 22px;
  background: var(--color-border);
  margin: 0 0.2rem;
}
.richtext-editor {
  min-height: 320px;
  padding: 0.9rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
  font-size: 0.9rem;
  line-height: 1.5;
  overflow-y: auto;
}
.richtext-editor:focus {
  outline: 2px solid var(--color-anthracite);
  outline-offset: 1px;
}

/* Post-Exkursions-Feedback (Planung Abschnitt 38): Drag-&-Drop-Zone fuer
   Fotos + kleine Vorschau-Galerie (sowohl fuer noch nicht hochgeladene, per
   Drag&Drop gestagte Dateien als auch fuer bereits gespeicherte Fotos). */
.dropzone {
  border: 2px dashed var(--color-border);
  border-radius: calc(var(--radius) * 1.5);
  padding: 1.5rem 1rem;
  text-align: center;
  color: #888;
  cursor: pointer;
  background: var(--color-bg);
  transition: border-color 0.15s, background 0.15s;
}
.dropzone p {
  margin: 0;
  font-size: 0.85rem;
}
.dropzone:hover,
.dropzone:focus {
  border-color: var(--color-anthracite);
  outline: none;
}
.dropzone--active {
  border-color: var(--color-blue);
  background: var(--color-surface);
}
.photo-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0.75rem 0;
}
.photo-gallery__item {
  position: relative;
  width: 84px;
  height: 84px;
}
.photo-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}
.photo-gallery__remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: #c0392b;
  color: #fff;
  font-size: 0.7rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Endabrechnung-Modal (Planung Abschnitt 39): Kostenvoranschlag (nicht
   editierbar) neben einem Eingabefeld fuer die tatsaechliche Endabrechnung
   je Zeile. Abweichende Werte werden blassgrau hervorgehoben, bis
   gespeichert wird. */
.kosten-modal__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.75rem 0;
}
.kosten-modal__row--compare {
  display: grid;
  grid-template-columns: 1fr 110px 110px;
  gap: 0.75rem;
  align-items: center;
  padding: 0.4rem;
  border-radius: var(--radius);
}
.kosten-modal__row--header {
  font-size: 0.78rem;
  font-weight: 600;
  color: #888;
  padding-bottom: 0;
}
.kosten-modal__estimate {
  color: #888;
}
.kosten-modal__field--changed {
  border-color: #b5b5b5 !important;
  background: #ececec !important;
  color: #555;
}
/* Gesamtsumme-Zeile nutzt denselben Grid-Raster wie die Kostenzeilen darueber,
   damit die beiden Summen unter ihren jeweiligen Spalten stehen. */
.kosten-modal__row--total {
  display: grid;
  grid-template-columns: 1fr 110px 110px;
  gap: 0.75rem;
  align-items: center;
  padding: 0.5rem 0.4rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--color-border);
  font-weight: 700;
}
/* Neue, erst bei der Endabrechnung ergaenzte Position (Plus-Icon) --
   Bezeichnung + Fach werden hier statt der sonst festen Label-Anzeige
   editierbar. */
.kosten-modal__row--new {
  background: var(--color-bg);
}
.kosten-modal__new-fields {
  display: flex;
  gap: 0.4rem;
}
.kosten-modal__new-fields select {
  flex-shrink: 0;
  width: auto;
}
/* Kostenvoranschlag-bearbeiten-Modal (Admin/Kostenfreigabe-Zustaendige):
   einfacher Positionen-Editor, im Unterschied zum Endabrechnungs-Modal oben
   nur EIN Betrag je Zeile statt Voranschlag/Endabrechnung im Vergleich. */
.kvmodal__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.75rem 0;
}
.kvmodal__row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.kvmodal__row select {
  flex: 0 0 auto;
  width: auto;
}
.kvmodal__row input[type="text"]:not(.kvmodal__amount) {
  flex: 1 1 auto;
  min-width: 0;
}
.kvmodal__amount {
  flex: 0 0 90px;
}
.kvmodal__per-person {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: #666;
  white-space: nowrap;
}
.kvmodal__total {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0.4rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--color-border);
  font-weight: 700;
}
.kvmodal__support {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.kvmodal__support input {
  flex: 0 0 140px;
}
.kvmodal__subheading {
  margin: 1rem 0 0.25rem;
  font-size: 0.95rem;
}

/* Abweichender Endabrechnungsbetrag in der Kostenvoranschlag-Tabelle der
   Detailseite (nicht editierbar, nur zur Anzeige). */
.cost-diff {
  background: #ececec;
  color: #555;
  border-radius: var(--radius);
  padding: 0.1rem 0.4rem;
}
/* Badge "entspricht der Endabrechnung" neben der Kostenvoranschlag-
   Ueberschrift. */
.tag--match {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--color-green);
  color: #fff;
  vertical-align: middle;
}
/* Ja/Nein-Schieber "Entspricht die Endabrechnung dem Kostenvoranschlag?"
   -- eigene Rot/Gruen-Faerbung statt der sonst ueblichen Grau/Blau-Toene. */
.excform-toggle--redgreen .excform-toggle__slider {
  background: #c0392b;
}
.excform-toggle--redgreen input:checked + .excform-toggle__slider {
  background: var(--color-green);
}
/* Solange noch keine Antwort gespeichert ist (endabrechnung_matches = NULL):
   neutraler grauer Zustand mit dem Knopf in der Mitte statt bereits Rot/Nein
   vorwegzunehmen -- verschwindet dauerhaft, sobald einmal interagiert wurde
   (siehe JS, entfernt die Klasse direkt beim ersten Klick). */
.excform-toggle--neutral .excform-toggle__slider {
  background: #ccc;
}
.excform-toggle--neutral .excform-toggle__slider::before {
  transform: translateX(9px);
}

/* Pulsierendes Plus-Icon zum "Kartenziel-Formular öffnen" (Planung Abschnitt
   38) -- ersetzt den fruehreren Text-Button + separaten Hinweistext, Infos
   kommen stattdessen per Hover/Fokus-Tooltip (.info-icon-Muster). */
.karte-plus-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-blue);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 0.4rem 0;
  animation: karte-plus-pulse 1.6s ease-in-out infinite;
}
.karte-plus-icon:hover,
.karte-plus-icon:focus {
  animation-play-state: paused;
}
@keyframes karte-plus-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(91, 197, 242, 0.6); }
  50% { box-shadow: 0 0 0 8px rgba(91, 197, 242, 0); }
}

/* Échanges de classes: Mini-Vorschaukarte, Verantwortlicher-Chip, Info-Icon,
   Kostenzeilen-Repeater -- Wizard-Muster analog Excursions/Exkursionskarte. */
.echange-mini-map {
  height: 140px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  margin-bottom: 0.75rem;
  background: var(--color-bg);
}
/* Verantwortliche:r + Begleitpersonen in einer gemeinsamen Chip-Reihe: der
   Verantwortliche-Chip traegt einen Stern und bleibt fix an erster Stelle,
   Begleitpersonen-Chips (direkt editierbare Namensfelder) und der "+"-Button
   reihen sich flex-wrap dahinter ein. */
.person-chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}
/* display:contents macht den Platzhalter fuer die JS-gerenderten Begleit-
   personen-Chips layout-transparent, damit sie als eigene Flex-Items in
   .person-chip-row umbrechen statt als ein einziger Block. */
#participant-chip-list {
  display: contents;
}
.responsable-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-bg);
  border-radius: 999px;
  padding: 0.4rem 0.5rem 0.4rem 0.9rem;
  font-weight: 700;
  flex-shrink: 0;
}
.responsable-chip__star {
  color: var(--color-accent);
}
.responsable-chip__edit {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: var(--color-surface);
  color: var(--color-anthracite);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.responsable-chip:hover .responsable-chip__edit,
.responsable-chip__edit:focus {
  opacity: 1;
}
.participant-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  background: var(--color-bg);
  border-radius: 999px;
  padding: 0.3rem 0.3rem 0.3rem 0.8rem;
  flex-shrink: 0;
}
.drawer__body .participant-chip__input {
  width: 100px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-anthracite);
}
.participant-chip__input:focus {
  outline: none;
}
.participant-chip__remove {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  border: none;
  background: var(--color-surface);
  color: #888;
  cursor: pointer;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.add-chip-btn {
  border: 1px dashed var(--color-border);
  background: transparent;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #666;
  cursor: pointer;
  flex-shrink: 0;
}
.info-icon {
  position: relative;
  display: inline-flex;
  color: #999;
  cursor: help;
  margin-left: 0.3rem;
}
.info-icon__tooltip {
  display: none;
  position: absolute;
  bottom: 130%;
  left: 0;
  width: 260px;
  background: var(--color-anthracite);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius);
  z-index: 10;
  line-height: 1.4;
}
.info-icon:hover .info-icon__tooltip,
.info-icon:focus .info-icon__tooltip {
  display: block;
}
/* Fuer Info-Icons nahe am rechten Rand des Drawers (z. B. beim LJBM-
   Transport-Schieber): Tooltip wird sonst per "left:0" nach rechts aus dem
   sichtbaren Bereich hinausgeschoben und abgeschnitten. */
.info-icon--right .info-icon__tooltip {
  left: auto;
  right: 0;
}
.warning-note {
  background: #fff0f0;
  border: 1px solid #f5c6c6;
  color: #c0392b;
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
  font-size: 0.8rem;
  margin: 0.5rem 0 1rem;
}
.costline-item {
  display: grid;
  grid-template-columns: 130px 1fr 100px auto auto;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}
.costline-item select,
.costline-item input[type="text"],
.ownfunds-item select,
.ownfunds-item input[type="text"] {
  height: 38px;
  line-height: 36px;
  padding: 0 0.6rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  font-family: inherit;
  font-size: 0.85rem;
}
/* Runder Devis-Button je Kostenposition: grau/leer ohne Anhang, blau/gefuellt
   sobald eine Kosteneinschaetzung hochgeladen wurde. Tooltip nach demselben
   Muster wie .info-icon (eigene Klasse noetig, da .info-icon auf inline-Text
   ausgelegt ist und hier ein <button> mit fester Groesse gebraucht wird). */
.costline-item__devis-btn {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: #888;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.costline-item__devis-btn:hover {
  background: var(--color-border);
  color: var(--color-anthracite);
}
.costline-item__devis-btn--filled {
  background: var(--color-blue);
  border-color: var(--color-blue);
  color: #fff;
}
.costline-item__devis-btn--filled:hover {
  background: var(--color-blue);
  filter: brightness(1.1);
  color: #fff;
}
.costline-item__devis-btn .info-icon__tooltip {
  bottom: 140%;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  text-align: center;
}
.costline-item__devis-btn:hover .info-icon__tooltip {
  display: block;
}
/* Eigenkapital-Repeater (Motiv/Detail/Betrag), gleiches Muster wie
   .costline-item -- exakt dieselben 5 Spalten (inkl. einer unsichtbaren
   Platzhalter-Spalte anstelle des Devis-Buttons), damit Motiv/Detail/Betrag
   wirklich exakt gleich breit wie Transport/Bezeichnung/Betrag darueber
   werden, statt nur zufaellig aehnlich (die 1fr-Spalte haette sonst je nach
   Zeilentyp unterschiedlich viel Restplatz zur Verfuegung). */
.ownfunds-item {
  display: grid;
  grid-template-columns: 130px 1fr 100px auto auto;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}
.ownfunds-item__spacer {
  width: 30px;
  height: 1px;
}
/* Schieber "Finanzielle Unterstuetzung beantragen": Label (mit Info-Icon)
   links, Schieber rechts, dazwischen (nur wenn aktiv) das graue, nicht
   bedienbare Betragsfeld (wird erst nach Pruefung extern eingetragen). */
.financial-support-row {
  justify-content: space-between;
  cursor: default;
}
.financial-support-row .excform-toggle {
  cursor: pointer;
}
.financial-support-pending__amount {
  flex: 1;
  min-width: 0;
  margin: 0 1rem;
  height: 38px;
  padding: 0 0.6rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: #ececec;
  color: #999;
  font-family: inherit;
  font-size: 0.85rem;
  cursor: not-allowed;
}
.excform-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.excform-visit-item {
  display: grid;
  grid-template-columns: 140px 1fr 90px 1fr auto;
  gap: 0.5rem;
  align-items: center;
  background: var(--color-bg);
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.5rem;
}
@media (max-width: 700px) {
  .excform-visit-item { grid-template-columns: 1fr 1fr; }
}
.excform-visit-item input {
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  font-family: inherit;
  font-size: 0.82rem;
  width: 100%;
}
.excform-visit-item__remove {
  background: none;
  border: none;
  color: #ccc;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.1rem 0.3rem;
}
.excform-visit-item__remove:hover {
  color: #c0392b;
}

/* "Buchen"-Feature: Kategorie-Galerie, Fahrzeug-Liste, Steckbrief. */
.buchen-kategorien {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}
.buchen-kategorie-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 140px;
  padding: 1.25rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  text-decoration: none;
  color: inherit;
}
.buchen-kategorie-card:hover {
  border-color: var(--color-blue);
}
/* Zwei-Spalten-Uebersicht (Fahrzeugkarten / Kalender), siehe
   views/buchen-fahrzeuge.ejs + public/js/buchen-fahrzeuge.js. Faellt auf
   schmalen Bildschirmen untereinander. */
.buchen-overview-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.7fr) minmax(280px, 1.5fr);
  gap: 1.5rem;
  margin-top: 1rem;
  align-items: start;
}
@media (max-width: 900px) {
  .buchen-overview-row { grid-template-columns: 1fr; }
}
.buchen-fahrzeuge-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.buchen-fahrzeug-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  background: var(--color-surface);
  cursor: pointer;
}
.buchen-fahrzeug-card:hover {
  border-color: var(--color-blue);
}
.buchen-fahrzeug-card--selected {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 1.5px var(--color-blue);
}
/* Eigener Fokus-Ring statt des nativen (per Maus-Klick sonst dauerhaft
   sichtbar, siehe tabindex="0") -- sieht sonst wie "ausgewaehlt" aus, auch
   wenn die Auswahl (siehe oben) laengst wieder aufgehoben wurde. */
.buchen-fahrzeug-card:focus {
  outline: none;
}
.buchen-fahrzeug-card:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.buchen-fahrzeug-card__photo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.buchen-fahrzeug-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.buchen-fahrzeug-card__placeholder {
  font-size: 1.1rem;
}
.buchen-fahrzeug-card__text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.buchen-fahrzeug-card__text strong {
  font-size: 0.85rem;
}
.buchen-fahrzeug-card__text .excform-geocode-status {
  font-size: 0.72rem;
}
.buchen-steckbrief {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
}
.buchen-steckbrief__photo {
  flex: 1;
  height: 180px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.buchen-steckbrief__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.buchen-steckbrief__placeholder-text {
  color: #999;
  font-size: 0.85rem;
  padding: 0 1rem;
  text-align: center;
}
/* Info-Tabelle + Belegungskalender nebeneinander statt untereinander (ersetzt
   die vorherige "Belegung"-Ueberschrift -- der Kalender ist hier klein genug,
   dass er neben statt unter den Steckbrief-Daten Platz hat). */
.buchen-detail-grid {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.buchen-detail-grid__info {
  flex: 1 1 280px;
}
.buchen-detail-grid__calendar {
  flex: 0 1 320px;
}
.calendar-widget--compact .calendar-widget__month {
  font-size: 0.82rem;
  min-width: 7rem;
}
.calendar-widget--compact .calendar-day {
  min-height: 34px;
  padding: 2px 3px;
}
.calendar-widget--compact .calendar-day__num {
  font-size: 0.65rem;
}
