/* Die Farbe der Schule (HS Schule): alles, was zur Flugschule gehört, ist
   daran zu erkennen — getrennt vom Bernstein des Logbuchs. */
:root { --school: #4f9fd9; --school-wash: rgba(79, 159, 217, 0.10); }

/* Der Eintrag im Admin-Bereich: wie ein Abschnitt dort (details.settingsPanel),
   aber er klappt nicht auf, er öffnet die Personaldatenbank. */
.schoolEntry { border: 1px solid var(--school); border-left-width: 4px; border-radius: var(--radius, 10px);
  background: var(--school-wash); margin-bottom: 10px; }
.schoolEntry button {
  display: flex; align-items: baseline; gap: 10px; width: 100%; padding: 13px 16px; background: none; border: 0;
  font: inherit; font-size: 12.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--school); cursor: pointer; text-align: left;
}
.schoolEntry button:hover { filter: brightness(1.15); }
.schoolEntry button::after { content: '›'; margin-left: auto; font-size: 16px; line-height: 1; opacity: 0.8; }
.schoolEntry .sum { font-weight: 400; letter-spacing: 0.02em; text-transform: none; font-size: 11.5px; color: var(--ink-faint); }

/* Die Ansicht selbst trägt die Farbe im Kopf. */
.staffView .schoolTitle { color: var(--school); }

/* Zwei Abschnitte, aufklappbar: Flugschüler und Piloten. */
details.staffSection { border: 1px solid var(--line); border-radius: var(--radius, 10px); background: var(--panel); margin: 0 0 12px; }
details.staffSection > summary {
  display: flex; align-items: baseline; gap: 10px; padding: 13px 16px; cursor: pointer; list-style: none;
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-dim);
}
details.staffSection > summary::-webkit-details-marker { display: none; }
details.staffSection > summary::after { content: '▾'; margin-left: auto; font-size: 10px; opacity: 0.55; }
details.staffSection[open] > summary { color: var(--school); border-bottom: 1px solid var(--line); }
details.staffSection[open] > summary::after { content: '▴'; }
details.staffSection > summary .sum { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 11.5px; color: var(--ink-faint); }
details.staffSection .sectionBody { padding: 12px 16px 16px; }
.sectionBar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 10px; }
.sectionBar .spacer { flex: 1; }

/* Die Personaldatenbank (public/staff.js). Baut auf den Farben und Bausteinen
   der Logbuch-Seite auf: .btn, .field, .fieldGrid, .settingsPanel, .formMsg. */

.staffView { max-width: 1100px; margin-left: auto; margin-right: auto; }
.staffBar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 14px; }
.staffBar .spacer { flex: 1; }
.staffBar .staffPerm { font: inherit; font-size: 13px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); max-width: 260px; }
.permNote { margin: -6px 0 12px; font-size: 13px; color: var(--ink-dim); }
.permNote a { color: var(--school, #4f9fd9); margin-left: 6px; }
.staffBar input[type="search"] {
  min-width: 220px; background: var(--panel-2); color: var(--ink); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 14px;
}

.staffTable { width: 100%; border-collapse: collapse; font-size: 13px; }
/* Am Handy wischt man in der Tabelle, nicht die ganze Seite. */
@media (max-width: 760px) { .staffTable { display: block; overflow-x: auto; } }
.staffTable th, .staffTable td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.staffTable th { color: var(--ink-faint); font-weight: 600; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.staffTable tbody tr { cursor: pointer; }
.staffTable tbody tr:hover { background: var(--amber-wash-faint, rgba(217, 142, 59, .06)); }
.staffTable .mono { font-family: var(--mono, ui-monospace, monospace); }

.validOk { color: var(--green); }
.validSoon { color: var(--caution); }
.validGone { color: var(--rust); }
.validNone { color: var(--ink-faint); }

.staffHead { display: flex; flex-wrap: wrap; gap: 12px; align-items: baseline; margin: 0 0 14px; }
.staffHead h2 { margin: 0; }
.staffHead .code { font-family: var(--mono, ui-monospace, monospace); color: var(--amber); font-size: 18px; }
.staffHead .spacer { flex: 1; }

.staffTabs { display: flex; gap: 8px; margin: 0 0 16px; flex-wrap: wrap; }
.staffTabs button { min-width: 150px; }
.staffTabs button.on { background: var(--amber-fill); color: var(--on-amber); border-color: var(--amber-fill); }

.staffPanel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius, 10px); padding: 18px; margin: 0 0 16px; }
.staffPanel h3 { margin: 0 0 12px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-dim); }
.staffPanel textarea { width: 100%; min-height: 70px; }

.tickRow { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.staffPanel label.tick, .staffPanel label.btn {
  display: inline-flex; align-items: center; gap: 6px; font-size: 14px;
  text-transform: none; letter-spacing: 0; color: var(--ink); font-weight: 500;
}
.tick input { width: 18px; height: 18px; }
.tick .from { font-size: 11px; color: var(--ink-faint); }

/* Berechtigungen und Type Ratings: je Zeile Häkchen oder Typ, dann das Datum. */
.ratingGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 6px 18px; }
.ratingLine { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.ratingLine .tick { min-width: 110px; }
.ratingLine input[type="date"], .ratingLine input[data-date-field] { width: 160px; }
.ratingLine input[data-type-name] { width: 130px; text-transform: uppercase; }
.ratingLine .from { font-size: 11px; color: var(--ink-faint); }
#slTypes { display: flex; flex-direction: column; gap: 4px; margin-bottom: 6px; }
.tick.locked { opacity: .85; }

.fromLogbook { font-size: 12px; color: var(--ink-faint); margin-top: 4px; }
.fromLogbook b { color: var(--ink-dim); }

.pdfRow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Verfügbarkeiten: ein Monat als Raster, Montag zuerst. */
.calHead { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.calHead .month { font-weight: 600; min-width: 160px; text-align: center; }
.calGrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calGrid .dow { font-size: 11px; color: var(--ink-faint); text-align: center; padding: 4px 0; }
.calGrid button.day {
  min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2);
  color: var(--ink); font-size: 14px; cursor: pointer; padding: 4px;
}
.calGrid button.day.other { opacity: .35; }
.calGrid button.day.today { border-color: var(--amber); }
.calGrid button.day.off { background: var(--amber-fill); color: var(--on-amber); border-color: var(--amber-fill); }
.calGrid button.day.weekend:not(.off) { background: var(--panel-3); }

.offList { list-style: none; padding: 0; margin: 12px 0 0; }
.offList li { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.offList li .spacer { flex: 1; }
.offList li button { padding: 2px 10px; }

.calLink { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.calLink input { flex: 1; min-width: 260px; font-family: var(--mono, ui-monospace, monospace); font-size: 12px; }

@media (max-width: 700px) {
  .staffTable .wide { display: none; }
  .staffTabs button { min-width: 0; flex: 1; }
}

/* Die Crew-Liste in der Personaldatenbank (2026-10-06): Funktion als Filter,
   und ein grünes Häkchen für einen 3LC, der mit einem Logbuch verbunden ist. */
.fnChips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.fnChips .n { opacity: .6; margin-left: 4px; font-size: 11px; }
.linkedTick { color: var(--green); font-weight: 700; }
.staffHead .linkedTick { font-size: 13px; }
.linkLine { margin: 0 0 12px; font-size: 14px; }
.linkLine .mono { font-family: var(--mono, ui-monospace, monospace); }
/* Auswahlfelder so hoch wie die Eingabefelder daneben — auch in Safari, das
   ein natives Auswahlfeld sonst in seiner eigenen Höhe zeichnet. (Bis 2026-10-19 mit min-height 35 px — einen Pixel
   höher als die Eingabefelder, Martin: „ist nicht in einer Linie“.) */
.staffPanel .field select {
  -webkit-appearance: none; appearance: none; padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}

/* „ausblenden“ / „wieder anzeigen“ beim Hinweis auf Konten ohne 3LC. */
.hideLink { font-size: 11px; color: var(--ink-faint); margin-left: 4px; }
.hideLink:hover { color: var(--ink); }

/* Ein Flugschüler wird Pilot: links unten, unter dem Datensatz. */
.promoteBar { display: flex; align-items: center; gap: 12px; margin: 4px 0 16px; }

/* Ein Pilot, der zugleich Flugschüler ist: ein Schild in der Farbe der Schule
   neben dem Namen, in beiden Abschnitten. */
.schoolTag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 10.5px;
  font-weight: 600; letter-spacing: .03em; color: var(--school); background: var(--school-wash);
  border: 1px solid var(--school); vertical-align: 1px; white-space: nowrap; }
.staffHead .schoolTag { font-size: 12px; }

/* Kurse in der Personaldatenbank (2026-10-07). */
.staffKurse { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 0; font-size: 13.5px; }
.staffKurse:empty { display: none; }
.staffKurse .label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); }
.staffKurse .kursChip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.staffKurse .kursChip .linkish { text-decoration: none; opacity: .6; }
.staffKurse select { font: inherit; font-size: 13px; padding: 3px 8px; border-radius: 999px; border: 1px dashed var(--line); background: transparent; color: var(--ink-dim); }
/* Dienstplan-Reiter (myDPL, 2026-10-08). */
.dplTicks { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 14px 0 6px; }
.dplKontenTitel { margin: 18px 0 8px; font-size: 14px; font-weight: 600; }
.dplTick { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
/* Markierte gesammelt einer Dienststelle zuweisen (myDPL, 2026-10-08). */
.staffTable th.pick, .staffTable td.pick { width: 28px; text-align: center; padding-left: 6px; padding-right: 0; }
.staffTable td.pick input, .staffTable th.pick input { cursor: pointer; }
.bulkBar { position: sticky; top: var(--suite-h, 0px); z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 10px 0;
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2, #2a2f37); }
.bulkBar select { font: inherit; font-size: 13px; padding: 5px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel-solid); color: var(--ink); }
.staffTable th.sortable { cursor: pointer; user-select: none; }
.staffTable th.sortable:hover, .staffTable th.sortable.on { color: var(--ink); }

/* Personaldatenbank: Ansicht „Alle“ oder „Nach Flugeinsatzstellen“ (Martin, 2026-10-09). */
.staffView { margin-right: 10px; }
/* Umschalter und Suchfeld gleich hoch (Martin, 2026-10-09). */
.staffBar .staffView button, .staffBar input[type="search"] { height: 36px; box-sizing: border-box; }
.staffBar .staffView button { padding-top: 0; padding-bottom: 0; }
.festTable td.festOpen { cursor: pointer; }
.festTable td.festOpen:hover { text-decoration: underline; color: var(--hub, #3fae96); }

/* Stammdaten: Person, Dienst, Kontakt (2026-10-13). */
.stammTitel { margin: 16px 0 8px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-dim); font-weight: 600; }
.stammTitel:first-of-type { margin-top: 4px; }
/* myHUB › TFO und FO: nach Flugeinsatzstellen, in jeder zum Ziehen (2026-10-10). */
.opsTable tr.hubFestKopf th { text-align: left; padding: 16px 8px 6px; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--hub, #3fae96); background: transparent; border-bottom: 1px solid var(--line); }
.opsTable tbody:first-of-type tr.hubFestKopf th { padding-top: 6px; }
.opsTable tr.hubFestKopf .sum { margin-left: 6px; color: var(--ink-faint); font-weight: 400; }
.opsTable td.opsGriff { width: 20px; padding-right: 0; }
.opsTable td.opsGriff [data-drag] { cursor: grab; color: var(--ink-faint); font-size: 15px; user-select: none; }
.opsTable td.opsGriff [data-drag]:hover { color: var(--ink); }
.opsAuch { display: inline-block; padding: 1px 7px; border-radius: 9px; border: 1px solid var(--line); font-size: 11.5px; color: var(--ink-dim); white-space: nowrap; }
#dpMehrBox .dpMehrFeld { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
#dpMehrBox .dpMehrFeld .hint { min-width: 4.2em; }
#dpMehrBox .dpMehrFeld select { flex: 1; min-width: 0; }
#dpMehrBox > .hint { margin-top: 6px; }
#dpMehrBox label.dplTick { display: flex; gap: 7px; align-items: center; min-height: 38px; margin: 0; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink); cursor: pointer; }
/* Stammdaten: weitere Funktionen derselben Person (2026-10-10). */
.sfWeitere { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; min-height: 38px; }
.sfWeitere label.dplTick { display: inline-flex; gap: 7px; align-items: center; margin: 0; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink); cursor: pointer; }
.sfWeitere label.dplTick[hidden] { display: none; }
/* Die weiteren Funktionen haben mehr Platz (Martin, 2026-10-13): über die ganze Breite der Maske. */
.fieldGrid > .sfWeitereFeld { grid-column: 1 / -1; }
/* TFO / FO: eine FEST zuklappen (2026-10-11) — ein Klick auf ihre Zeile. */
.opsTable tr.hubFestKopf[data-fest-klapp] { cursor: pointer; }
.opsTable tr.hubFestKopf[data-fest-klapp]:hover th { color: var(--ink); }
.opsTable tr.hubFestKopf .festPfeil { display: inline-block; width: 1.2em; color: var(--ink-faint); }
.opsTable tbody.zu tr.hubFestKopf th { padding-bottom: 6px; }
.bulkBar .bulkTrenn { margin-left: 14px; padding-left: 14px; border-left: 1px solid var(--line); }
/* Ein 3LC von Hand: frei oder schon vergeben (2026-10-11). */
/* Ob ein 3LC frei ist, wer Dienstvorgesetzter ist: in der Zeile der Beschriftung — unter dem Feld schob es das Feld aus
   der Linie (Martin, 2026-10-19). Als Satz, nicht in Großbuchstaben wie die Beschriftung. */
.staffPanel .field label .hint { margin-left: 4px; text-transform: none; letter-spacing: normal; }
.codeHint.besetzt { color: #e0564a; font-weight: 600; }
.codeHint.frei { color: #4fb36a; }
input.besetzt { border-color: #e0564a !important; }
/* Ein schmales Fenster (Christian, 2026-10-11: geteilter Bildschirm): die breite Liste lief rechts aus ihrem Feld
   hinaus und stand ohne Hintergrund vor dem Bild. Sie rollt jetzt in ihrem Feld; die Leiste darüber bleibt stehen. */
details.staffSection .sectionBody { overflow-x: auto; }
details.staffSection .sectionBody > .sectionBar { position: sticky; left: 0; }
details.staffSection .sectionBody > .hint { position: sticky; left: 0; }

/* Die Zugriffe einer weiteren Person (Martin, 2026-10-14): je Recht ein Häkchen mit seiner Erklärung darunter. */
.staffRechte { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 0; }
.staffRecht { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; cursor: pointer; }
.staffRecht input { width: auto; margin-top: 3px; }
.staffRecht > span { display: flex; flex-direction: column; gap: 2px; }

/* Startpasswort am Handy: das Feld über den beiden Knöpfen — nebeneinander lief „Konto anlegen“ über den Rand (2026-10-19). */
@media (max-width: 600px) {
  .staffPanel .field > .accentRow { flex-wrap: wrap; }
  .staffPanel .field > .accentRow > input { flex: 1 1 100% !important; }
}
/* Stammdaten: sofort gespeichert — Abstand zum Notfall-Feld, der Stand klein links (2026-10-24) */
.formActions.sfAktionen { margin-top: 18px; align-items: center; }
.sfAuto { font-size: 12px; }
.sfAuto.fehlt { color: var(--danger, #e5736b); }
/* Versetzung mit Stichtag (2026-10-24) */
/* Leitungsfunktion (Leiter, Stv, Dienstplaner) unter Stammdaten › Dienst: der Hinweis über die ganze Breite. */
.dpRolle { margin-top: 10px; }
.dpRolle .dpRolleHint { grid-column: 1 / -1; margin: -4px 0 0; }
.dpVersetzung { margin: 10px 0 4px; }
.dpVersetzung summary { cursor: pointer; color: var(--ink-dim); font-size: 13px; }
.dpVersFelder { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 8px; }
.dpVersFelder .field { min-width: 180px; }
.dpVerlauf { margin-top: 8px; font-size: 13px; } .dpVerlauf ol { margin: 4px 0 0; padding-left: 20px; } .dpVerlauf li { margin: 2px 0; } .dpVerlauf li.geplant b { font-style: italic; }
