/* HMP Crew – Ergänzungen zu app.css.
   app.css wird 1:1 aus dem HMP Fleet Manager übernommen und hier NICHT verändert;
   Crew-eigene Bausteine stehen nur in dieser Datei (siehe docs/DESIGN.md). */

/* Hinweisband für Test- und Entwicklungsumgebung (oberhalb von allem) */
.env-banner {
  position: sticky; top: 0; z-index: 100;
  padding: 6px 16px; text-align: center;
  font-size: .8125rem; font-weight: 500; letter-spacing: .02em;
}
.env-banner--test { background: var(--orange); color: var(--white); }
.env-banner--dev  { background: var(--blue);   color: var(--white); }

/* Anmeldung: zwei Wege (HMP-Login / E-Mail und Passwort) */
.auth-way { margin-top: 22px; }
.auth-way__title {
  margin: 0 0 10px; font-size: .8125rem; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.auth-way .auth__hint { margin-top: 10px; }
.auth-way form { margin-top: 0; }
.auth-divider {
  display: flex; align-items: center; gap: 12px; margin: 26px 0 0;
  font-size: .8125rem; color: var(--subtle);
}
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }

/* Zwei-Faktor-Einrichtung */
.steps { margin: 0; padding-left: 1.25rem; }
.steps li + li { margin-top: 6px; }
.qr { display: flex; justify-content: center; padding: 12px; background: var(--white); border: 1px solid var(--line); }
.qr svg { width: 220px; height: 220px; max-width: 100%; }
.secret, .code-list code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; }
.code-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.code-list li { padding: 8px 12px; background: var(--bg-soft); border: 1px solid var(--line-soft); text-align: center; }

/* Rechte-Auswahl in der Rollenverwaltung */
.check-group { margin: 0 0 18px; padding: 0; border: 0; }
.check-group legend { margin-bottom: 8px; font-weight: 500; color: var(--ink); }
.check-group .field--check + .field--check { margin-top: 6px; }

/* Datenschutzerklärung */
.policy-text { margin: 16px 0; font-size: .9375rem; }
.policy-text--scroll { max-height: 50vh; overflow-y: auto; padding: 12px; border: 1px solid var(--line); background: var(--bg-soft); }

/* Erneuerung eines Nachweises (wartet auf Prüfung) */
.pending-renewal { margin-top: 8px; padding: 8px 10px; background: var(--orange-bg); border-left: 3px solid var(--orange); }
.pending-renewal p { margin: 4px 0 0; }

/* Registrierungsassistent (mobil zuerst) */
.wizard-body { background: var(--bg); }
.wizard-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--ink); color: var(--on-dark); }
.wizard-head img { width: 64px; height: auto; }
.wizard-head span { flex: 1; font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase; }
.wizard-head__logout { color: var(--on-dark); }
.wizard { max-width: 640px; margin: 0 auto; padding: 16px 12px 48px; }
.wizard__progress { margin: 0 0 8px; font-size: .8125rem; color: var(--muted); }
.wizard__steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; font-size: .8125rem; }
.wizard__steps li { padding: 4px 10px; border: 1px solid var(--line); background: var(--white); color: var(--subtle); }
.wizard__steps li.is-done { color: var(--text); }
.wizard__steps li.is-current { border-color: var(--ink); background: var(--ink); color: var(--white); }
.wizard__card h1 { font-size: 1.5rem; margin: 0; }
.wizard__nav { display: flex; gap: 10px; margin-top: 8px; }
.wizard__nav .btn--block { flex: 1; }
.wizard__hint { margin-top: 16px; text-align: center; }
.review-box { border-color: var(--orange); }

/* Kontoart-Wahl: zwei gleichwertige Karten (mobil untereinander, ab Tablet nebeneinander) */
.kind-choice { display: grid; gap: 14px; }
@media (min-width: 640px) { .kind-choice { grid-template-columns: 1fr 1fr; } }
.kind-card { display: flex; flex-direction: column; gap: 10px; padding: 18px; text-align: left; font: inherit;
             color: var(--text); background: var(--white); border: 1px solid var(--line); cursor: pointer; }
.kind-card:hover, .kind-card:focus-visible { border-color: var(--ink); box-shadow: var(--shadow-2); }
.kind-card.is-selected { border: 2px solid var(--ink); }
.kind-card__icon .icon { width: 28px; height: 28px; color: var(--ink); }
.kind-card__title { font-size: 1.125rem; font-weight: 500; color: var(--ink); }
.kind-card__text, .kind-card__need { font-size: .9375rem; }
.kind-card__need { padding-top: 8px; border-top: 1px solid var(--line-soft); }
.kind-card__cta { margin-top: auto; }

/* Planung (Phase 3): Kalender, Disposition. Farben je Projektart über vorhandene Fleet-Variablen. */
.cal-job--blau { --job: var(--blue); }
.cal-job--gruen { --job: var(--green); }
.cal-job--orange { --job: var(--orange); }
.cal-job--rot { --job: var(--red); }
.cal-job--violett { --job: var(--ink-2); }
.cal-job--grau { --job: var(--muted); }
.cal-job { display: block; margin-top: 4px; padding: 3px 6px; overflow: hidden; border-left: 3px solid var(--job, var(--ink));
           background: var(--bg-soft); color: var(--text); font-size: .75rem; line-height: 1.35; text-decoration: none;
           white-space: nowrap; text-overflow: ellipsis; }
.cal-job:hover, .cal-job:focus-visible { background: var(--white); box-shadow: var(--shadow-1); color: var(--ink); }
.cal-job.is-cancelled { opacity: .55; text-decoration: line-through; }
.cal-job__time { font-weight: 600; }
.cal-job__fill { float: right; margin-left: 6px; color: var(--green); font-weight: 600; }
.cal-job__fill.is-open { color: var(--orange); }
.cal-month { overflow-x: auto; }
.cal-month__head, .cal-month__week { display: grid; grid-template-columns: repeat(7, minmax(110px, 1fr)); min-width: 770px; }
.cal-month__head span { padding: 8px; color: var(--muted); font-size: .75rem; font-weight: 500; text-align: center; }
.cal-day { min-height: 110px; padding: 6px; border-top: 1px solid var(--line-soft); border-left: 1px solid var(--line-soft); }
.cal-day.is-other { background: var(--bg-soft); color: var(--muted); }
.cal-day.is-weekend { background: var(--bg-soft); }
.cal-day.is-today { box-shadow: inset 0 3px var(--orange); }
.cal-day__num { font-weight: 600; text-decoration: none; }
.cal-day__holiday { display: block; color: var(--muted); font-size: .7rem; }
.cal-days { display: grid; gap: 1px; padding: 16px 20px; }
@media (min-width: 1024px) { .cal-days { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); } }
.cal-days__day { padding: 8px; border-top: 1px solid var(--line-soft); }
.cal-days__day.is-today h3 { color: var(--orange); }
.cal-days__day h3 { margin: 0 0 6px; font-size: .875rem; }
.cal-year { display: grid; gap: 12px; padding: 16px 20px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.cal-year__month { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--line); text-decoration: none; }
.cal-year__month:hover { border-color: var(--ink); }
.plan__bar--off { background: var(--bg-soft); color: var(--muted); }

.board { display: grid; gap: 16px; padding: 16px 20px; }
@media (min-width: 1024px) { .board { grid-template-columns: 260px 1fr; align-items: start; } }
.board__pool { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 1024px) { .board__pool { position: sticky; top: calc(var(--topbar-h) + 12px); max-height: calc(100vh - var(--topbar-h) - 24px); overflow-y: auto; } }
.board__pool h3 { margin: 6px 0 0; color: var(--muted); }
.board__list { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.board-chip { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); background: var(--white);
              cursor: grab; font-size: .8125rem; }
.board-chip--firma { border-color: var(--ink); }
.board-chip:hover { border-color: var(--ink); box-shadow: var(--shadow-1); }
.board__jobs { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.board-job { padding: 12px; border: 1px solid var(--line); border-top: 3px solid var(--job, var(--ink)); background: var(--white); }
.board-job--confirm { border-color: var(--orange); }
.board-job__head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.board-job__head a { text-decoration: none; }
.board-job__slots { display: flex; flex-direction: column; gap: 4px; min-height: 40px; margin: 0; padding: 0; list-style: none; }
.board-slot { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 5px 8px; background: var(--bg-soft);
              font-size: .8125rem; }
.board-slot[data-kind] { cursor: grab; background: var(--white); border: 1px solid var(--line); }
.board-slot--gebucht[data-kind], .board-slot--bestaetigt[data-kind] { border-left: 3px solid var(--green); }
.board-slot--vorgeschlagen, .board-slot--angefragt { border-left: 3px solid var(--orange); }
.board-slot--target { justify-content: center; border: 1px dashed var(--line); background: transparent; }
.board-job__slots .board-chip { display: none; }

/* Platzanfragen aus Sicht der Firma: Karte mit Job-Infos, Plätzen, einheitlicher Aktionsleiste */
.request-card__facts { display: grid; gap: 10px 20px; margin: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .request-card__facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.request-card__facts dt { color: var(--muted); font-size: .75rem; }
.request-card__facts dd { margin: 0; font-weight: 500; }
.request-card__slots { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.request-slot { display: grid; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line-soft); }
.request-slot:last-child { border-bottom: 0; padding-bottom: 0; }
.request-slot.has-issue { border-left: 3px solid var(--orange); padding-left: 10px; }
@media (min-width: 768px) { .request-slot { grid-template-columns: minmax(220px, 320px) 1fr; align-items: start; } }
.request-card__actions { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
@media (min-width: 768px) { .request-card__actions { flex-direction: row; flex-wrap: wrap; align-items: flex-start; } }
.request-card__decline > summary { list-style: none; cursor: pointer; }
.request-card__decline > summary::-webkit-details-marker { display: none; }
@media (min-width: 768px) { .request-card__decline { margin-left: auto; } }

/* Jobansicht: Belegung und Plätze (eine Zeile je Platz, am Handy Karte) */
.job-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0 0 16px; }
.slot-table__person { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.slot-table__actions { justify-content: flex-end; flex-wrap: wrap; }
.slot-table td { vertical-align: middle; }
.slot-billing { display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 719px) { .slot-table__person { align-items: flex-end; text-align: right; } }
.cal-job__apps { float: right; margin-left: 4px; padding: 0 4px; background: var(--blue-bg); color: var(--blue); font-weight: 600; }

/* Navigation (Umbau 23.11.2026): Brotkrumen, Aufgaben, untere Leiste am Handy */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; font-size: .8125rem; }
.crumbs li + li::before { content: "›"; margin-right: 6px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a[aria-current] { color: var(--ink); font-weight: 500; }
.task-section > summary { list-style: none; cursor: pointer; }
.task-section > summary::-webkit-details-marker { display: none; }
.bottombar { display: none; }
@media (max-width: 1023px) {
  .bottombar { position: fixed; right: 0; bottom: 0; left: 0; z-index: 30; display: grid; grid-auto-flow: column;
               grid-auto-columns: 1fr; padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--line);
               background: var(--white); }
  .bottombar__link { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
                     padding: 8px 4px; color: var(--muted); font-size: .6875rem; text-decoration: none; }
  .bottombar__link.is-active { color: var(--ink); font-weight: 600; }
  .bottombar__link .nav__badge { position: absolute; top: 4px; right: 22%; }
  .app-body .main { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
}

/* Einstellungen: einheitliches Kachelraster, Symbol-Kreis fester Größe, Pfeil innerhalb, Text bricht um */
.settings-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.settings-tile { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 16px 18px; color: var(--ink);
                 text-decoration: none; transition: box-shadow .2s, transform .2s; }
.settings-tile:hover, .settings-tile:focus-visible { box-shadow: var(--shadow-2); color: var(--ink); transform: translateY(-2px); }
.settings-tile__icon { display: grid; flex: 0 0 44px; place-items: center; width: 44px; height: 44px; border-radius: 50%;
                       background: var(--ink); color: var(--white); }
.settings-tile__text { display: flex; flex: 1 1 auto; flex-direction: column; gap: 2px; min-width: 0;
                       overflow-wrap: anywhere; }
.settings-tile__arrow { flex: 0 0 auto; color: var(--muted); }
.plan__bar--away { background: var(--blue-bg); color: var(--blue); }
.plan__bar--away.is-requested { background: transparent; border: 1px dashed var(--blue); }
.clock__buttons .btn { min-height: 44px; }
