/*
 * bs5-compat.css – Bootstrap-5-Utility-Klassen auf Bootstrap 4.6 abbilden
 * ------------------------------------------------------------------------
 * Die Seite läuft auf Bootstrap 4.6.2. Viele Content-Seiten verwenden aber
 * BS5-Klassennamen (ms-*, me-*, gap-*, badge bg-*, form-select, ...).
 * Ohne dieses Shim sind diese Klassen wirkungslos → kaputte Abstände/Layouts.
 *
 * Wird in index.php direkt NACH bootstrap.min.css geladen.
 */

/* ── Margin/Padding: start/end (BS5) → left/right (BS4) ─────────────────── */
.ms-0{margin-left:0!important}       .me-0{margin-right:0!important}
.ms-1{margin-left:.25rem!important}  .me-1{margin-right:.25rem!important}
.ms-2{margin-left:.5rem!important}   .me-2{margin-right:.5rem!important}
.ms-3{margin-left:1rem!important}    .me-3{margin-right:1rem!important}
.ms-4{margin-left:1.5rem!important}  .me-4{margin-right:1.5rem!important}
.ms-5{margin-left:3rem!important}    .me-5{margin-right:3rem!important}
.ms-auto{margin-left:auto!important} .me-auto{margin-right:auto!important}

.ps-0{padding-left:0!important}      .pe-0{padding-right:0!important}
.ps-1{padding-left:.25rem!important} .pe-1{padding-right:.25rem!important}
.ps-2{padding-left:.5rem!important}  .pe-2{padding-right:.5rem!important}
.ps-3{padding-left:1rem!important}   .pe-3{padding-right:1rem!important}
.ps-4{padding-left:1.5rem!important} .pe-4{padding-right:1.5rem!important}
.ps-5{padding-left:3rem!important}   .pe-5{padding-right:3rem!important}

/* ── Flex-Gap ───────────────────────────────────────────────────────────── */
.gap-0{gap:0!important}
.gap-1{gap:.25rem!important}
.gap-2{gap:.5rem!important}
.gap-3{gap:1rem!important}
.gap-4{gap:1.5rem!important}
.gap-5{gap:3rem!important}

/* ── Row-Gutters (row g-*) ───────────────────────────────────────────────── */
.row.g-0{margin-right:0;margin-left:0}
.row.g-0>*{padding-right:0;padding-left:0}
.row.g-1{margin-right:-.125rem;margin-left:-.125rem}
.row.g-1>*{padding-right:.125rem;padding-left:.125rem;margin-bottom:.25rem}
.row.g-2{margin-right:-.25rem;margin-left:-.25rem}
.row.g-2>*{padding-right:.25rem;padding-left:.25rem;margin-bottom:.5rem}
.row.g-3{margin-right:-.5rem;margin-left:-.5rem}
.row.g-3>*{padding-right:.5rem;padding-left:.5rem;margin-bottom:1rem}
.row.g-4{margin-right:-.75rem;margin-left:-.75rem}
.row.g-4>*{padding-right:.75rem;padding-left:.75rem;margin-bottom:1.5rem}
.row.g-5{margin-right:-1.5rem;margin-left:-1.5rem}
.row.g-5>*{padding-right:1.5rem;padding-left:1.5rem;margin-bottom:3rem}

/* ── Font-Size-Utilities ─────────────────────────────────────────────────── */
.fs-1{font-size:2.5rem!important}
.fs-2{font-size:2rem!important}
.fs-3{font-size:1.75rem!important}
.fs-4{font-size:1.5rem!important}
.fs-5{font-size:1.25rem!important}
.fs-6{font-size:1rem!important}
.fw-bold{font-weight:700!important}
.fw-semibold{font-weight:600!important}
.fw-normal{font-weight:400!important}
.fw-light{font-weight:300!important}
.text-start{text-align:left!important}
.text-end{text-align:right!important}
.float-start{float:left!important}
.float-end{float:right!important}
.rounded-start{border-top-left-radius:.25rem!important;border-bottom-left-radius:.25rem!important}
.rounded-end{border-top-right-radius:.25rem!important;border-bottom-right-radius:.25rem!important}
.border-start{border-left:1px solid #dee2e6!important}
.border-end{border-right:1px solid #dee2e6!important}

/* ── Badges: BS5 "badge bg-*" → BS4 "badge badge-*" Optik ───────────────── */
.badge.bg-primary  {background-color:#007bff!important;color:#fff}
.badge.bg-secondary{background-color:#6c757d!important;color:#fff}
.badge.bg-success  {background-color:#28a745!important;color:#fff}
.badge.bg-danger   {background-color:#dc3545!important;color:#fff}
.badge.bg-warning  {background-color:#ffc107!important;color:#212529}
.badge.bg-info     {background-color:#17a2b8!important;color:#fff}
.badge.bg-light    {background-color:#f8f9fa!important;color:#212529}
.badge.bg-dark     {background-color:#343a40!important;color:#fff}
.badge.rounded-pill{border-radius:10rem}

/* text-bg-* (BS5.2) */
.text-bg-primary  {background-color:#007bff!important;color:#fff!important}
.text-bg-secondary{background-color:#6c757d!important;color:#fff!important}
.text-bg-success  {background-color:#28a745!important;color:#fff!important}
.text-bg-danger   {background-color:#dc3545!important;color:#fff!important}
.text-bg-warning  {background-color:#ffc107!important;color:#212529!important}
.text-bg-info     {background-color:#17a2b8!important;color:#fff!important}
.text-bg-light    {background-color:#f8f9fa!important;color:#212529!important}
.text-bg-dark     {background-color:#343a40!important;color:#fff!important}

/* ── Formulare ──────────────────────────────────────────────────────────── */
.form-select{
  display:block;width:100%;height:calc(1.5em + .75rem + 2px);
  padding:.375rem 2.25rem .375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;
  color:#495057;background-color:#fff;
  background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat:no-repeat;background-position:right .75rem center;background-size:16px 12px;
  border:1px solid #ced4da;border-radius:.25rem;appearance:none;-webkit-appearance:none;
}
.form-select-sm{height:calc(1.5em + .5rem + 2px);padding:.25rem 2rem .25rem .5rem;font-size:.875rem}
.form-select:focus{border-color:#80bdff;outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}
.form-label{margin-bottom:.5rem;display:inline-block}
.form-text{display:block;margin-top:.25rem;font-size:80%;color:#6c757d}
.form-check-input{margin-top:.3rem}
.input-group-text{white-space:nowrap}

/* ── Buttons / Close ────────────────────────────────────────────────────── */
.btn-close{
  box-sizing:content-box;width:1em;height:1em;padding:.25em;color:#000;
  background:transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
  border:0;border-radius:.25rem;opacity:.5;cursor:pointer;
}
.btn-close:hover{opacity:.75}
.btn-close-white{filter:invert(1) grayscale(100%) brightness(200%)}
.modal-header .btn-close{padding:.5rem;margin:-.5rem -.5rem -.5rem auto}

/* ── Layout ─────────────────────────────────────────────────────────────── */
.d-grid{display:grid!important}
.d-grid.gap-2>.btn{width:100%}
.vstack{display:flex;flex:1 1 auto;flex-direction:column;align-self:stretch}
.hstack{display:flex;flex-direction:row;align-items:center;align-self:stretch}
.visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.opacity-25{opacity:.25!important}.opacity-50{opacity:.5!important}.opacity-75{opacity:.75!important}
.shadow-none{box-shadow:none!important}
.lh-1{line-height:1!important}.lh-sm{line-height:1.25!important}.lh-base{line-height:1.5!important}
.object-fit-cover{object-fit:cover!important}
.small,small{font-size:80%}

/* ── Table / Cards ──────────────────────────────────────────────────────── */
.table>:not(caption)>*>*{padding:.75rem}
.card-header-tabs{margin-bottom:-.75rem}
