/* Eventplaner Planung (23.08.2026, ROSCCX-Auftrag Paket 2) — /app/eventplaner-v3
   Klassenpraefix: epl-. Farben/Abstaende aus den vier Design-Artboards (Main/Monat/
   Jahrestermine/Schichtplan). Nutzt ausschliesslich die bestehenden App-Theme-Variablen
   (--bg/--panel/--surface-2/--text/--muted/--line) aus main.css/ui-standards.css -- keine
   zweite Override-Ebene, keine eigenen Light/Dark-Media-Queries. Der Orange-Akzent
   (#d46a20/#c05818) ist in den Artboards themeunabhängig konstant und bleibt es hier auch. */

.epl-root {
  --epl-gold: #d46a20;
  --epl-gold-lo: #c05818;
  --epl-gold-soft: rgba(212, 106, 32, .14);
  --epl-gold-border: rgba(212, 106, 32, .38);
  --epl-green: #2f7a4b;
  --epl-green-soft: #dcfce7;
  --epl-yellow: #8a6a1d;
  --epl-yellow-soft: #fef9c3;
  --epl-red: #8f312a;
  --epl-red-soft: #fee2e2;
  --epl-teal: #3d7686;
  --epl-teal-soft: rgba(61, 118, 134, .16);
  --epl-olive-soft: rgba(89, 90, 61, .16);
  color: var(--text);
  font-size: 13px;
}
body[data-app-theme="fcp_brand"] .epl-root {
  --epl-green-soft: rgba(63, 166, 107, .22);
  --epl-yellow-soft: rgba(197, 154, 43, .2);
  --epl-red-soft: rgba(181, 72, 63, .22);
}

.epl-root * { box-sizing: border-box; }

.epl-loading,
.epl-error,
.epl-empty {
  padding: 18px 4px;
  color: var(--muted);
  font-size: 12.5px;
}
.epl-error { color: var(--epl-red); }

/* ---------------------------------------------------------------------- */
/* Toolbar (gemeinsam fuer Woche/Monat)                                    */
/* ---------------------------------------------------------------------- */
.epl-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
/* Standard 5 (Formularelemente-Atome, FCP_UI_STANDARDS.md): Kontrollhöhe
   44px Desktop statt 36/30px — Owner-Befund 05.09.2026 ("kein neues UI-
   System" trotz frischer Optik) betraf u. a. diese kleineren Massangaben,
   analog zum selben Fix in fcp-termine-mitglied.css. */
.epl-toolbar__today {
  height: 44px;
  padding: 0 14px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
.epl-toolbar__nav {
  display: flex;
  align-items: center;
  gap: 2px;
}
/* Standard 5: Icon-Knopf = 44px Fläche statt 30px. */
.epl-toolbar__nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.epl-toolbar__nav-btn:hover { background: var(--surface-2); color: var(--text); }
.epl-toolbar__label {
  font-size: 17px;
  font-weight: 700;
  white-space: nowrap;
}
.epl-toolbar__label small {
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
  margin-left: 4px;
}
.epl-toolbar__spacer { flex: 1; }
/* Standard 5: Kontrollhöhe 44px statt 36px. */
.epl-toolbar__cta {
  height: 44px;
  padding: 0 16px;
  border-radius: 9px;
  border: 0;
  background: linear-gradient(180deg, var(--epl-gold), var(--epl-gold-lo));
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(212, 106, 32, .24);
}
.epl-toolbar__cta:hover { filter: brightness(1.04); }
.epl-toolbar__cta[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; }

/* ---------------------------------------------------------------------- */
/* Woche                                                                    */
/* ---------------------------------------------------------------------- */
.epl-week {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  overflow: hidden;
}
.epl-week__head {
  display: grid;
  grid-template-columns: 56px repeat(7, 1fr);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.epl-week__head-cell {
  padding: 8px 4px;
  text-align: center;
  border-left: 1px solid var(--line);
}
.epl-week__head-cell:first-child { border-left: 0; }
.epl-week__dow { font-size: 10px; font-weight: 700; letter-spacing: .06em; color: var(--muted); }
.epl-week__date {
  margin: 2px auto 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}
.epl-week__head-cell.is-today .epl-week__dow { color: var(--epl-gold); }
.epl-week__head-cell.is-today .epl-week__date { background: var(--epl-gold); color: #fff; }

.epl-week__body {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  max-height: 72vh;
  overflow-y: auto;
}
.epl-week__hours {
  position: relative;
  border-right: 1px solid var(--line);
}
.epl-week__hour-label {
  position: absolute;
  right: 8px;
  transform: translateY(-50%);
  font-size: 10.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.epl-week__grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  user-select: none;
  touch-action: none;
}
.epl-week__col {
  position: relative;
  border-left: 1px solid var(--line);
}
.epl-week__col.is-weekend { background: rgba(var(--tint-rgb), .05); }
.epl-week__col.is-today { background: rgba(212, 106, 32, .07); }
.epl-week__hourline {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
}
.epl-week__col-inner { position: absolute; inset: 0; cursor: crosshair; }

.epl-week__event {
  position: absolute;
  left: 3px;
  right: 3px;
  border-radius: 8px;
  padding: 5px 7px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
  border-left: 3px solid var(--epl-gold);
  background: var(--epl-gold-soft);
  cursor: pointer;
  min-height: 18px;
}
.epl-week__event.is-termin { background: var(--epl-olive-soft); border-left-color: #595a3d; }
.epl-week__event.is-arbeit { background: var(--epl-gold-soft); border-left-color: var(--epl-gold); }
.epl-week__event-title { font-size: 11.5px; font-weight: 700; line-height: 1.25; color: var(--text); }
.epl-week__event-meta { font-size: 10.5px; color: var(--muted); margin-top: 2px; }

.epl-week__selection {
  position: absolute;
  left: 3px;
  right: 3px;
  border-radius: 8px;
  border: 2px dashed var(--epl-gold);
  background: rgba(212, 106, 32, .18);
  pointer-events: none;
}

/* ---------------------------------------------------------------------- */
/* Popover: Termin anlegen                                                  */
/* ---------------------------------------------------------------------- */
.epl-popover-backdrop {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(20, 18, 10, .28);
}
.epl-popover {
  position: fixed;
  z-index: 901;
  width: min(320px, calc(100vw - 24px));
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 20px 48px rgba(0, 0, 0, .32);
  padding: 16px;
}
.epl-popover__title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.epl-popover__meta { font-size: 11.5px; color: var(--muted); margin-bottom: 12px; }
/* Detail-Popover (Owner-Begehung 24.08.2026, Befund 2): Art-/Status-Badges
   in einer Zeile unter dem Titel. */
.epl-detail-popover__meta-row { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }
.epl-popover--detail .epl-popover__actions { flex-wrap: wrap; }
.epl-popover--detail .epl-popover__actions .epl-btn { flex: 1 1 auto; min-width: 88px; }
.epl-popover__row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.epl-field { margin-bottom: 10px; }
.epl-field label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  margin-bottom: 4px;
}
.epl-field input,
.epl-field select,
.epl-field textarea {
  width: 100%;
  height: var(--control-height, 40px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface, var(--panel));
  color: var(--text);
  padding: 0 10px;
  font-size: 12.5px;
  font-family: inherit;
}

/* Owner-Grundsatz 04.09.2026: Touch-Zweig, damit iOS beim Fokus nicht zoomt. */
@media (pointer: coarse), (max-width: 899px) {
  .epl-field input,
  .epl-field select,
  .epl-field textarea {
    font-size: 16px;
  }
}
.epl-field textarea { height: auto; padding: 8px 10px; resize: vertical; }
.epl-field--checkbox { display: flex; align-items: center; gap: 8px; }
.epl-field--checkbox input { width: 16px; height: 16px; flex: 0 0 auto; }
.epl-field--checkbox label { margin: 0; text-transform: none; font-weight: 600; font-size: 12.5px; color: var(--text); }

.epl-popover__actions { display: flex; gap: 8px; margin-top: 4px; }
.epl-btn {
  flex: 1;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 12.5px;
  cursor: pointer;
}
.epl-btn:hover { color: var(--text); border-color: var(--muted); }
.epl-btn--primary {
  border: 0;
  background: linear-gradient(180deg, var(--epl-gold), var(--epl-gold-lo));
  color: #fff;
  font-weight: 700;
}
.epl-btn--primary:hover { filter: brightness(1.04); }
.epl-btn--primary[disabled] { opacity: .55; cursor: progress; }
.epl-btn--danger { color: var(--epl-red); border-color: rgba(143, 49, 42, .4); }
.epl-popover__error {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--epl-red-soft);
  color: var(--epl-red);
  font-size: 11.5px;
}

/* ---------------------------------------------------------------------- */
/* Monat                                                                    */
/* ---------------------------------------------------------------------- */
.epl-monat-layout { display: grid; grid-template-columns: 1fr 260px; gap: 16px; align-items: start; }
.epl-month {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  overflow: hidden;
}
.epl-month__head {
  display: grid;
  grid-template-columns: 40px repeat(7, 1fr);
  height: 28px;
  align-items: center;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.epl-month__head span { text-align: center; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; color: var(--muted); }
.epl-month__row { display: grid; grid-template-columns: 40px repeat(7, 1fr); border-bottom: 1px solid var(--line); }
.epl-month__row:last-child { border-bottom: 0; }
.epl-month__kw {
  display: flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 700; color: var(--muted);
  background: var(--surface-2); border-right: 1px solid var(--line);
}
.epl-month__cell {
  border-right: 1px solid var(--line);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 108px;
  overflow: hidden;
  cursor: pointer;
}
.epl-month__cell:hover { background: rgba(var(--tint-rgb), .06); }
.epl-month__cell.is-outside { background: rgba(var(--tint-rgb), .06); color: var(--muted); }
.epl-month__cell.is-today { background: rgba(212, 106, 32, .09); }
.epl-month__cell-head { display: flex; justify-content: flex-end; }
.epl-month__cell-date {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--text);
}
.epl-month__cell.is-today .epl-month__cell-date { background: var(--epl-gold); color: #fff; }
.epl-month__cell.is-outside .epl-month__cell-date { color: var(--muted); }
.epl-month__chip {
  height: 19px;
  border-radius: 5px;
  border-left: 3px solid var(--epl-gold);
  background: var(--epl-gold-soft);
  display: flex;
  align-items: center;
  padding: 0 6px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.epl-month__chip.is-termin { background: var(--epl-olive-soft); border-left-color: #595a3d; }
.epl-month__chip.is-arbeit { background: var(--epl-gold-soft); border-left-color: var(--epl-gold); }
.epl-month__overflow { font-size: 10px; color: var(--muted); padding-left: 2px; }

.epl-month-side { display: flex; flex-direction: column; gap: 14px; }
.epl-month-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 14px 16px;
}
.epl-month-card__title {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); margin-bottom: 10px;
}
.epl-month-card__stat { display: flex; align-items: baseline; gap: 6px; margin-bottom: 6px; }
.epl-month-card__stat strong { font-size: 22px; font-weight: 800; }
.epl-month-card__stat span { color: var(--muted); font-size: 12.5px; }
.epl-month-card__item {
  display: flex; align-items: flex-start; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line);
}
.epl-month-card__item:first-child { border-top: 0; }
.epl-month-card__dot { width: 6px; height: 6px; border-radius: 50%; margin-top: 5px; flex: 0 0 auto; }
.epl-month-card__item-title { font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.epl-month-card__item-date { font-size: 10.5px; color: var(--muted); }

/* ---------------------------------------------------------------------- */
/* Jahrestermine                                                            */
/* ---------------------------------------------------------------------- */
.epl-jt-toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.epl-jt-toolbar__title { font-size: 17px; font-weight: 700; }
.epl-jt-toolbar__hint { font-size: 12px; color: var(--muted); }
.epl-view-switch { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface-2); gap: 2px; }
.epl-view-switch button {
  padding: 7px 15px; border-radius: 7px; font-size: 12.5px; color: var(--muted);
  border: 0; background: transparent; cursor: pointer; font-weight: 600;
}
.epl-view-switch button.is-active { font-weight: 700; background: var(--panel); box-shadow: 0 1px 3px rgba(0,0,0,.12); color: var(--text); }

.epl-jt-table-wrap { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: auto; }
.epl-jt-table { width: 100%; min-width: 980px; border-collapse: collapse; font-size: 12px; }
.epl-jt-table thead th {
  text-align: left;
  padding: 10px;
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.epl-jt-table thead th.is-filterable { position: relative; cursor: pointer; color: var(--text); }
.epl-jt-table thead th.has-filter { background: var(--epl-gold-soft); }
.epl-th-filter-caret { margin-left: 6px; opacity: .7; }
.epl-jt-table tbody td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.epl-jt-table tbody tr:last-child td { border-bottom: 0; }
.epl-jt-table tbody tr:hover { background: rgba(var(--tint-rgb), .06); }
.epl-jt-table tbody tr.is-editing { background: rgba(212, 106, 32, .05); }
/* Owner-Begehung 24.08.2026, Befund 2c: Zeile ist klickbar (Detail-Popover),
   die Anlage- und Bearbeiten-Zeile bleiben davon ausgenommen. */
.epl-jt-table tbody tr:not(.is-editing):not(.epl-jt-create-row) { cursor: pointer; }
.epl-jt-table input,
.epl-jt-table select {
  width: 100%;
  height: 32px;
  border: 1px solid var(--epl-gold);
  border-radius: 7px;
  background: var(--surface, var(--panel));
  color: var(--text);
  padding: 0 8px;
  font-size: 12px;
  font-family: inherit;
}

/* Owner-Grundsatz 04.09.2026: Touch-Zweig, damit iOS beim Fokus nicht zoomt. */
@media (pointer: coarse), (max-width: 899px) {
  .epl-jt-table input,
  .epl-jt-table select {
    font-size: 16px;
  }
}
.epl-jt-col-titel { font-weight: 700; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.epl-jt-col-muted { color: var(--muted); }
.epl-jt-badge {
  display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 5px;
  font-size: 10.5px; font-weight: 700; border-left: 3px solid var(--epl-gold); color: var(--text);
}
.epl-jt-badge.is-termin { background: var(--epl-olive-soft); border-left-color: #595a3d; }
.epl-jt-badge.is-arbeit { background: var(--epl-gold-soft); border-left-color: var(--epl-gold); }
.epl-jt-status {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700;
}
.epl-jt-status.is-published { background: var(--epl-green-soft); color: var(--epl-green); }
.epl-jt-status.is-draft { background: var(--epl-yellow-soft); color: var(--epl-yellow); }
.epl-jt-status.is-cancelled { background: var(--epl-red-soft); color: var(--epl-red); }
.epl-jt-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; white-space: nowrap; }
.epl-icon-btn {
  width: 28px; height: 28px; border-radius: 7px; border: 0; background: transparent;
  color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.epl-icon-btn:hover { background: var(--surface-2); color: var(--text); }
.epl-icon-btn.is-danger:hover { color: var(--epl-red); }

.epl-jt-create-row td { background: var(--epl-gold-soft); padding: 8px 10px; }
.epl-jt-create-toggle { border: 0; background: transparent; color: var(--epl-gold); font-weight: 700; font-size: 13px; cursor: pointer; }
.epl-jt-create-toggle:hover { text-decoration: underline; }
.epl-jt-create-hint { font-size: 11.5px; color: var(--muted); margin-left: 10px; }
.epl-jt-footer { display: flex; align-items: center; gap: 16px; font-size: 12px; color: var(--muted); margin-top: 12px; }
.epl-jt-footer b { color: var(--text); }

.epl-filter-pop {
  position: absolute;
  z-index: 60;
  top: calc(100% + 4px);
  left: 0;
  width: 210px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 20px 44px rgba(0, 0, 0, .28);
  overflow: hidden;
  text-transform: none;
  font-weight: 400;
}
.epl-filter-pop__list { padding: 6px 4px; max-height: 220px; overflow-y: auto; }
.epl-filter-pop__item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; font-size: 12px; color: var(--text); cursor: pointer; }
.epl-filter-pop__item:hover { background: var(--surface-2); }
.epl-filter-pop__item input { width: 14px; height: 14px; }
.epl-filter-pop__actions { display: flex; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--line); }
.epl-filter-pop__actions button { flex: 1; height: 28px; border-radius: 6px; font-size: 11.5px; cursor: pointer; }
.epl-filter-pop__actions button.is-ok { border: 0; background: linear-gradient(180deg, var(--epl-gold), var(--epl-gold-lo)); color: #fff; font-weight: 700; }
.epl-filter-pop__actions button.is-reset { border: 1px solid var(--line); background: transparent; color: var(--muted); }

/* ---------------------------------------------------------------------- */
/* Schichtplan                                                             */
/* ---------------------------------------------------------------------- */
.epl-shift-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.epl-shift-toolbar__title { font-size: 17px; font-weight: 700; }
.epl-shift-toolbar select {
  height: var(--control-height, 40px); border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); color: var(--text); padding: 0 10px; font-size: 12.5px; min-width: 260px;
}

/* Owner-Grundsatz 04.09.2026: Touch-Zweig, damit iOS beim Fokus nicht zoomt. */
@media (pointer: coarse), (max-width: 899px) {
  .epl-shift-toolbar select {
    font-size: 16px;
  }
}

.epl-kpi-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.epl-kpi { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 10px 14px; }
.epl-kpi__label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.epl-kpi__value { font-size: 24px; font-weight: 800; margin-top: 2px; }
.epl-kpi__value.is-green { color: var(--epl-green); }
.epl-kpi__value.is-red { color: var(--epl-red); }

/* Owner-Begehung 24.08.2026, Befund 2: min-width:0 auf der ganzen Kette bis zum
   Scroll-Container -- sonst blaest ein zu breiter Tag die Grid-/Flex-Vorfahren
   auf und die GANZE SEITE bekommt einen horizontalen Scrollbalken statt nur
   der Zeitachse (Owner: "ich kann sie nicht horizontal scrollen"). */
.epl-shift-timeline-col { min-width: 0; }
.epl-shift-layout { display: grid; grid-template-columns: 1fr 280px; gap: 16px; align-items: start; }
.epl-timeline {
  display: flex; flex-direction: column; gap: 18px; min-width: 0;
  /* Owner-Begehung 24.08.2026, Befund 1: EINE Quelle fuer die Label-Spaltenbreite.
     .epl-phase__ruler-row und .epl-shift-row nutzen beide exakt dieses Grid --
     das garantiert identische Bezugsbreite fuer Stundenskala und Schichtbalken
     (vorher: Flex-Track + margin-left-Zwilling liefen bei abweichender
     Boxgroessen-Rundung/Content auseinander).
  */
  --epl-timeline-cols: 190px 1fr;
  /* Befund 2: Mindestbreite je Stunde, damit lange Tage scrollen und kurze
     Tage die volle Breite ausfuellen (min-width unten: max(100%, Stunden*Wert)). */
  --epl-hour-min-w: 100px;
}
.epl-phase { min-width: 0; }
.epl-phase__band {
  height: 24px; display: flex; align-items: center; padding: 0 10px; border-radius: 7px;
  background: var(--epl-gold-soft); margin-bottom: 4px;
  /* Befund 2: Tages-Kopfzeile bleibt AUSSERHALB des Scroll-Containers, volle
     Breite, wird nie horizontal mitgescrollt. */
}
.epl-phase__band-name { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text); }
.epl-phase__band-range { font-size: 10.5px; color: var(--muted); margin-left: 8px; }

/* Befund 2: Ruler-Zeile UND alle Schichtzeilen teilen sich diesen EINEN
   Scroll-Container -- Achse und Balken scrollen dadurch synchron. Nur diese
   Box scrollt (overflow-x:auto), nie die Gesamtseite (siehe min-width:0-Kette
   oben). --epl-phase-hours wird inline pro Phase gesetzt (buildPhase()) und
   vererbt sich an die min-width-Formel unten. */
.epl-phase__scroll { overflow-x: auto; overflow-y: hidden; min-width: 0; -webkit-overflow-scrolling: touch; }
.epl-phase__ruler-row,
.epl-shift-row {
  display: grid;
  grid-template-columns: var(--epl-timeline-cols);
  /* Dieselbe Formel auf Ruler-Zeile UND jeder Schichtzeile -- garantiert
     identische Gesamtbreite, damit Skala und Balken nicht wieder auseinander-
     laufen (siehe Befund 1 von gestern). */
  min-width: max(100%, calc(190px + var(--epl-phase-hours, 8) * var(--epl-hour-min-w, 100px)));
}
.epl-phase__ruler-row { align-items: stretch; }
/* Excel-Muster: Namensspalte links bleibt beim horizontalen Scrollen stehen
   (position:sticky), mit Theme-Hintergrund und rechter Hairline, damit
   darunter durchscrollende Balken sie nicht optisch durchscheinen lassen. */
.epl-phase__ruler-spacer {
  min-width: 0; position: sticky; left: 0; z-index: 3;
  background: var(--panel); border-right: 1px solid var(--line);
}
.epl-phase__ruler { position: relative; height: 20px; border-bottom: 1px solid var(--line); }
.epl-phase__tick { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.epl-phase__tick-label { position: absolute; bottom: 2px; font-size: 9.5px; color: var(--muted); transform: translateX(2px); z-index: 1; }
/* Befund 1b: Beginn-Chip mit eigenem Hintergrund/Ebene, oberhalb der Tick-
   Labels (die sitzen unten in der Ruler-Box) -- nie Text auf Text, auch wenn
   die Linie nah an einem Tick liegt. */
.epl-phase__festline { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--epl-gold); z-index: 2; }
/* Chip bleibt INNERHALB der Ruler-Box (top statt ueber den Rand hinaus) --
   das war schon gestern die kollisionsfreie Zone gegenueber .epl-phase__band.
   Opaker Hintergrund + höherer z-index sorgen zusätzlich dafür, dass der
   Chip einen Tick darunter sauber verdeckt statt Text-auf-Text zu vermischen
   (Beleg: "Beginn 07:3000" -- Linie lag vorher direkt neben dem 08:00-Tick). */
.epl-phase__festline-label {
  position: absolute; top: 1px;
  padding: 1px 5px; border-radius: 4px;
  background: var(--panel); border: 1px solid var(--epl-gold-border);
  font-size: 9.5px; font-weight: 700; color: var(--epl-gold); white-space: nowrap; z-index: 4;
}

.epl-shift-row { height: 34px; align-items: center; position: relative; }
.epl-shift-row__name {
  min-width: 0; font-size: 12px; padding-right: 8px; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text);
  position: sticky; left: 0; z-index: 3;
  background: var(--panel); border-right: 1px solid var(--line);
  display: flex; align-items: center; height: 100%;
}
.epl-shift-row__name:hover { text-decoration: underline; }
.epl-shift-row__name.is-selected { font-weight: 800; color: var(--epl-gold); }
.epl-shift-row__track { position: relative; height: 100%; min-width: 0; }
.epl-shift-bar {
  position: absolute; top: 7px; height: 20px; border-radius: 6px; display: flex; align-items: center;
  padding: 0 8px; overflow: hidden; cursor: pointer; border: 1px solid transparent;
  font-size: 10px; font-weight: 700; white-space: nowrap;
}
.epl-shift-bar.is-green { background: var(--epl-green-soft); border-color: var(--epl-green); color: var(--epl-green); }
.epl-shift-bar.is-yellow { background: var(--epl-yellow-soft); border-color: var(--epl-yellow); color: var(--epl-yellow); }
.epl-shift-bar.is-red { background: var(--epl-red-soft); border-color: var(--epl-red); color: var(--epl-red); }

.epl-shift-add {
  margin-top: 6px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  text-align: center;
}
.epl-shift-add:hover { color: var(--epl-gold); border-color: var(--epl-gold-border); }

.epl-detail {
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 16px;
  position: sticky; top: 12px;
}
.epl-detail__eyebrow { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.epl-detail__title { font-size: 16px; font-weight: 800; margin-bottom: 2px; }
.epl-detail__meta { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.epl-detail__fill {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 9px; margin-bottom: 14px;
}
.epl-detail__fill.is-green { background: var(--epl-green-soft); }
.epl-detail__fill.is-yellow { background: var(--epl-yellow-soft); }
.epl-detail__fill.is-red { background: var(--epl-red-soft); }
.epl-detail__fill-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.epl-detail__fill span { font-size: 12.5px; font-weight: 700; }
.epl-detail__section-title { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.epl-helper-list { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.epl-helper { display: flex; align-items: center; gap: 9px; }
.epl-helper__avatar {
  width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); color: var(--text);
  display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; flex: 0 0 auto;
}
.epl-helper__avatar.is-open { background: transparent; border: 1px dashed var(--muted); color: var(--muted); }
.epl-helper__name { font-size: 12.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.epl-helper__status { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px; }
.epl-helper__status.is-pending { background: var(--epl-yellow-soft); color: var(--epl-yellow); }
.epl-helper__status.is-approved { background: var(--epl-green-soft); color: var(--epl-green); }
.epl-helper__actions { display: flex; gap: 4px; }
.epl-helper__actions button {
  width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line); background: transparent;
  color: var(--muted); cursor: pointer; font-size: 11px; line-height: 1;
}
.epl-helper__actions button.is-approve:hover { color: var(--epl-green); border-color: var(--epl-green); }
.epl-helper__actions button.is-reject:hover { color: var(--epl-red); border-color: var(--epl-red); }

/* ---------------------------------------------------------------------- */
/* Responsive                                                              */
/* ---------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .epl-monat-layout,
  .epl-shift-layout { grid-template-columns: 1fr; }
  .epl-detail { position: static; }
}
@media (max-width: 720px) {
  .epl-kpi-row { grid-template-columns: repeat(2, 1fr); }
  .epl-week__body { max-height: 60vh; }
}

.epl-scroll-x { overflow-x: auto; }

.epl-jt-inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.epl-jt-inline-form .epl-field { margin-bottom: 0; min-width: 120px; flex: 1 1 120px; }
.epl-jt-inline-form .epl-btn { flex: 0 0 auto; min-width: 96px; }

.epl-flash {
  margin: 0 0 12px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--epl-red-soft);
  color: var(--epl-red);
  font-size: 12px;
}

/* ---------------------------------------------------------------------- */
/* Verein-Umschalter (Owner-Begehung 23.08.2026, Befund 1.2) — nur bei     */
/* Mehr-Vereine-Konten sichtbar, Slot in der Workspace-Kopfzeile.          */
/* ---------------------------------------------------------------------- */
.epl-club-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  flex-wrap: wrap;
}
.epl-club-switch__label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  flex: 0 0 auto;
}
.epl-club-switch__select {
  height: 36px;
  min-width: 0;
  width: min(200px, 100%);
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  color: var(--text);
  padding: 0 10px;
  font-size: 12.5px;
  font-family: inherit;
}

/* Owner-Grundsatz 04.09.2026: Touch-Zweig, damit iOS beim Fokus nicht zoomt. */
@media (pointer: coarse), (max-width: 899px) {
  .epl-club-switch__select {
    font-size: 16px;
  }
}
