.storage {
  text-decoration: underline;
  text-decoration-style: dashed;
  text-decoration-color: gray;
  text-decoration-thickness: 2px;
}

.reiter {
  display: inline-block;
  padding: 3px 8px;
  margin: 4px;
  border-radius: 3px;
  cursor: pointer;
  user-select: none;
  background: #f5f5f5;
  transition: all 0.2s ease;
}

.reiter:hover {
  background: #eaeaea;
}

.reiter.active {
  background: #52ad31;
  color: white;
  border-color: #52ad31;
}

.sub_title {
  font-size: 1.2rem;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
}
#alert-container {
  display: none;
  margin-top: 1.25rem;
}

#alert-container .alert {
  border: none;
  border-left: 4px solid transparent;
  border-radius: 5px;
  padding: 0.85rem 1.1rem;
  font-size: 0.9rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

#alert-container .alert-success {
  background-color: #eef7ea;
  border-left-color: var(--bs-primary, #52ad31);
  color: #2f5720;
}

#alert-container .alert-danger {
  background-color: #fdecec;
  border-left-color: #d9534f;
  color: #7a2e2b;
}

#alert-container .alert .btn-close {
  width: 0.65em;
  height: 0.65em;
  padding: 0.45em;
  border-radius: 50%;
  opacity: 0.55;
}

#alert-container .alert .btn-close:hover {
  opacity: 1;
}

/* Container-Tabelle: Zeile aufklappen zeigt enthaltene Artikel */
.container-expand-toggle {
  display: inline-flex;
  color: #adb5bd;
  transition: transform 0.15s ease, color 0.15s ease;
}

tr.container-row-expanded {
  cursor: pointer;
}

tr.container-row-expanded .container-expand-toggle {
  color: var(--bs-primary, #52ad31);
  transform: rotate(90deg);
}

table.dataTable.container-table tbody tr {
  cursor: pointer;
}

/* Lagerbestand-Tabelle: gleiches Verhalten wie Container */
.location-expand-toggle {
  display: inline-flex;
  color: #adb5bd;
  transition: transform 0.15s ease, color 0.15s ease;
}

tr.location-row-expanded .location-expand-toggle {
  color: var(--bs-primary, #52ad31);
  transform: rotate(90deg);
}

table.dataTable.location-table tbody tr {
  cursor: pointer;
}

.location-bulk-bar {
  background: #f4f8f3;
  border: 1px solid #d7e8d0;
  border-radius: 5px;
  padding: 0.35rem 0.7rem;
}

.location-item-checkbox {
  accent-color: var(--bs-primary, #52ad31);
}

/* Produktionen-Tabelle: gleiches Verhalten wie Container/Lagerbestand */
.production-expand-toggle {
  display: inline-flex;
  color: #adb5bd;
  transition: transform 0.15s ease, color 0.15s ease;
}

tr.container-row-expanded .production-expand-toggle {
  color: var(--bs-primary, #52ad31);
  transform: rotate(90deg);
}

table.dataTable.production-table tbody tr {
  cursor: pointer;
}

/* Scan-Fortschritt (Produktion packen/lagern) */
.scan-progress .progress-bar {
  background-color: var(--bs-primary, #52ad31);
  transition: width 0.3s ease;
}

/* Erfolgsmeldung: alle Produkte einer Produktion erfasst */
.scan-success-banner {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: linear-gradient(135deg, rgba(82, 173, 49, 0.12), rgba(82, 173, 49, 0.05));
  border: 1px solid rgba(82, 173, 49, 0.35);
  border-radius: 5px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.scan-success-banner i {
  font-size: 2rem;
  color: var(--bs-primary, #52ad31);
}

.scan-success-banner strong {
  font-size: 1.05rem;
  color: #212529;
}

.scan-success-banner-in {
  animation: scanSuccessIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scanSuccessIn {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(-8px);
  }
  60% {
    opacity: 1;
    transform: scale(1.02) translateY(0);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.scan-success-banner-in i {
  animation: scanSuccessIconPop 0.5s ease-out 0.1s both;
}

@keyframes scanSuccessIconPop {
  0% {
    transform: scale(0.4) rotate(-15deg);
    opacity: 0;
  }
  70% {
    transform: scale(1.15) rotate(5deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

/* Fehlermeldung: falsches Produkt gescannt */
.scan-error-banner {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: linear-gradient(135deg, rgba(220, 53, 69, 0.12), rgba(220, 53, 69, 0.05));
  border: 1px solid rgba(220, 53, 69, 0.4);
  border-radius: 5px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  font-weight: 500;
  color: #842029;
}

.scan-error-banner i {
  font-size: 1.75rem;
  color: #dc3545;
  flex-shrink: 0;
}

.scan-error-banner-in {
  animation: scanErrorShake 0.4s ease-in-out;
}

@keyframes scanErrorShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* "Als Nächstes scannen" - deutlich sichtbar oberhalb der Kamera */
.scan-next-up {
  background: #fff;
  border: 2px solid var(--bs-primary, #52ad31);
  border-radius: 5px;
  padding: 0.85rem 1.1rem;
  margin-bottom: 1rem;
  text-align: center;
}

.scan-next-up-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6c757d;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.scan-next-up-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #212529;
}


/* Scan-Checkliste */
.container-content-list .checklist-done {
  background-color: #f4f8f3;
}

.checklist-check {
  color: var(--bs-primary, #52ad31);
  margin-left: auto;
  font-size: 1.1rem;
}

.container-content-list li i.bi-circle {
  margin-left: auto;
  font-size: 1.1rem;
}

#pack-reader,
#store-reader {
  border-radius: 5px;
  overflow: hidden;
}

.container-expand-loading {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.25rem;
  color: #6c757d;
  font-size: 0.9rem;
  white-space: normal;
  animation: containerExpandFadeIn 0.2s ease-out;
}

.container-expand-loading .spinner-border {
  color: var(--bs-primary, #52ad31);
  width: 1.1rem;
  height: 1.1rem;
}

.container-expand-content {
  padding: 0.9rem 1.25rem 1.1rem;
  background: #fafbfc;
  white-space: normal;
  animation: containerExpandFadeIn 0.2s ease-out;
}

/* Meta-Block im Aufklapp-Fenster (Standort + Aktion-Buttons) - nur am Handy relevant,
   da dort die entsprechenden Spalten sonst unsichtbar sind */
.container-expand-meta {
  padding: 0.9rem 1.25rem;
  background: #fafbfc;
  border-bottom: 1px solid #eef0f2;
}

.container-expand-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.container-expand-meta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.container-expand-meta-actions .btn {
  flex: 1 1 auto;
}

@keyframes containerExpandFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.container-content-header {
  font-size: 0.72rem;
  font-weight: 700;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
}

.container-content-list {
  border: 1px solid #eef0f2;
  border-radius: 5px;
  background: #fff;
  overflow: hidden;
}

.container-content-list .list-group-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.9rem;
  transition: background-color 0.15s ease;
  flex-wrap: wrap;
}

.container-content-list .list-group-item:hover {
  background-color: #f4f8f3;
}

.container-content-icon {
  color: #adb5bd;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.container-content-id {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  color: #52ad31;
  background: rgba(82, 173, 49, 0.1);
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
  min-width: 3.2rem;
  text-align: center;
  flex-shrink: 0;
}

.container-content-product {
  flex: 1 1 auto;
  min-width: 0;
  word-break: break-word;
}

.container-content-product a {
  color: #212529;
  text-decoration: none;
  font-weight: 500;
}

.container-content-product a:hover {
  color: #52ad31;
  text-decoration: underline;
}

.container-content-serial {
  white-space: nowrap;
}

.btn-container-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-left: 0.5rem;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #adb5bd;
  font-size: 0.8rem;
  transition: background-color 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}

.btn-container-remove:hover {
  background-color: #fdecec;
  color: #d9534f;
}

.btn-container-remove:disabled {
  opacity: 0.5;
}

.containerListTable {
  width: 100%;
  max-width: 100%;
  margin: 0.75rem 0;
  display: block;
  max-height: 339px;
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  border: 1px solid #eef0f2;
  border-radius: 5px;
  background: #fff;
}

.containerListTable input {
  pointer-events: none;
  text-align: center;
}

.containerListTable input[type="checkbox"] {
  width: 1.35rem;
  height: 1.35rem;
  accent-color: var(--bs-primary, #52ad31);
  border: none;
  box-shadow: none;
}

.containerListTable tr {
  font-size: 0.88rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.containerListTable tr:hover {
  background-color: #f4f8f3;
}

.containerListTable tr td:first-child {
  text-align: center;
}

.containerListTable th {
  border: none;
  border-bottom: 1px solid #eef0f2;
  background: #fafbfc;
  color: #6c757d;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.6rem 0.9rem;
  white-space: nowrap;
}
.containerListTable td {
  border: none;
  border-bottom: 1px solid #f2f3f5;
  padding: 0.55rem 0.9rem;
}

.containerListTable tr:last-child td {
  border-bottom: none;
}
.logo-big_disappear {
  opacity: 0 !important;
  transition: opacity 0.3s ease-in-out;
  display: none !important;
}
.logo-short_appear {
  opacity: 1 !important;
  transition: opacity 0.3s ease-in-out;
  display: inline-block !important;
}
.user-footer {
  text-align: center;
}

.user-footer a {
  border: none !important;
  box-shadow: none !important;
}

.btn-actions {
  padding: 5px 8px !important;
}

/* =========================================================
   Redesign / CI-Feinschliff (Produkte-Seite)
   – nur zusätzliche Regeln auf bestehende Klassen/IDs,
     keine Farben, Schriften, Klassen oder IDs geändert –
   ========================================================= */

/* Cards allgemein: ruhiger, moderner Look mit weichem Schatten */
.card {
  border: none;
  border-radius: 5px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.card-header {
  background: #fff;
  border-bottom: 1px solid #eef0f2;
  padding: 1.1rem 1.5rem;
}

.card-header .card-title {
  position: relative;
  padding-left: 16px;
}

.card-header .card-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 22px;
  border-radius: 3px;
  background: var(--bs-primary, #52ad31);
}

.card-body {
  padding: 1.5rem;
}

.card-body hr {
  margin: 1.25rem 0;
  opacity: 0.08;
}

/* Reiter-Bereich: eigener ruhiger Kasten statt offen im Card-Body */
.reiterliste {
  background: #f8f9fa;
  border: 1px solid #eef0f2;
  border-radius: 5px;
  padding: 1rem 1.25rem;
}

.reiterliste .sub_title {
  margin-bottom: 2px;
  font-weight: 700;
}

.reiterliste p {
  color: #6c757d;
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.reiter_sort {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Reiter-Chips selbst etwas feiner, moderner */
.reiter {
  margin: 0;
  padding: 5px 13px;
  border-radius: 5px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid #e3e5e8;
}

.reiter:hover {
  border-color: #d5d5d5;
}

.reiter.active {
  border-color: #52ad31;
  box-shadow: 0 2px 8px rgba(82, 173, 49, 0.25);
}

/* Produkte-Tabelle: aufgeräumtere Kopfzeile, ruhigeres Hover */
table.dataTable thead th {
  background: #fafbfc;
  color: #6c757d;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 2px solid #eef0f2 !important;
  white-space: nowrap;
}

/* Platz für die Sortier-Pfeile reservieren, sonst überlappen sie den Spaltentext.
   Gilt für JEDE DataTables-Tabelle (nicht nur table.dataTable), erkannt an der von
   DataTables automatisch vergebenen Klasse "dataTable" - damit ist das Styling
   unabhängig vom jeweiligen Tabellen-ID immer konsistent. */
table.dataTable thead th.sorting,
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
  padding-right: 1.75rem !important;
}

/* Sortier-Pfeile dezent statt Standard-Bootstrap-Blau */
table.dataTable thead th.sorting::before,
table.dataTable thead th.sorting::after,
table.dataTable thead th.sorting_asc::before,
table.dataTable thead th.sorting_asc::after,
table.dataTable thead th.sorting_desc::before,
table.dataTable thead th.sorting_desc::after {
  color: #adb5bd;
}

table.dataTable thead th.sorting_asc::before,
table.dataTable thead th.sorting_desc::after {
  color: var(--bs-primary, #52ad31);
}

table.dataTable tbody tr {
  transition: background-color 0.15s ease;
}

table.dataTable tbody tr:hover {
  background-color: #f4f8f3 !important;
}

table.dataTable td,
table.dataTable th {
  vertical-align: middle;
  padding: 0.65rem 0.9rem;
}

/* Item-Tabelle Desktop: Reiter-Tabs steuern die Spalten, dazu simples horizontales Scrollen */
.items-table-scroll {
  border-radius: 5px;
  -webkit-overflow-scrolling: touch;
}

/* Gruppen-, Container- & Item-Tabelle: immer horizontal scrollbar, auf allen Bildschirmgrößen */
.table-responsive {
  -webkit-overflow-scrolling: touch;
}

.table-responsive table.dataTable td,
.table-responsive table.dataTable th {
  white-space: nowrap;
}

/* Tabellen, die am Handy NICHT scrollen, sondern über DataTables-Responsive
   Spalten einklappen und per Antippen der Zeile wieder aufklappen
   (Produkte, Container, Gruppen) */
@media (max-width: 767.98px) {
  .mobile-collapse-table,
  .items-table-scroll {
    overflow-x: visible;
  }

  .mobile-collapse-table table.dataTable td,
  .mobile-collapse-table table.dataTable th,
  .items-table-scroll table.dataTable td,
  .items-table-scroll table.dataTable th {
    white-space: normal;
  }

  /* Reiter-Leiste nur am Desktop - am Handy übernimmt DataTables-Responsive */
  .reiterliste {
    display: none;
  }
}

/* Ganze Zeile als Klick-Ziel (Gruppen/Container/Log/Verleih) – Cursor als Hinweis */
table.dtr-inline.collapsed tbody tr {
  cursor: pointer;
}

table.dataTable td.dtr-control,
table.dataTable th.dtr-control {
  position: relative !important;
  padding-left: 30px !important;
  cursor: pointer;
}

table.dataTable td.dtr-control::before,
table.dataTable th.dtr-control::before {
  top: 50%;
  left: 6px;
  height: 16px;
  width: 16px;
  margin-top: -8px;
  display: block;
  position: absolute;
  content: "";
  border: none;
  border-radius: 0;
  box-shadow: none;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2352ad31' viewBox='0 0 16 16'%3E%3Cpath d='m12.14 8.753-5.482 4.796c-.646.566-1.658.106-1.658-.753V3.204a1 1 0 0 1 1.659-.753l5.48 4.796a1 1 0 0 1 0 1.506z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
  transition: transform 0.15s ease;
}

table.dataTable tr.parent td.dtr-control::before,
table.dataTable tr.parent th.dtr-control::before {
  content: "";
  background-color: transparent;
  transform: rotate(90deg);
}

/* Aufgeklappte Detail-Zeile: eigener, ruhiger Look statt Standard-Bootstrap-Tabelle */
table.dataTable tr.child {
  background-color: #fafbfc;
}

table.dataTable tr.child td {
  white-space: normal;
  padding: 0.9rem 1.1rem;
}

table.dataTable tr.child ul.dtr-details {
  width: 100%;
}

table.dataTable tr.child ul.dtr-details > li {
  border-bottom: 1px solid #eef0f2;
  padding: 0.4rem 0;
}

table.dataTable tr.child ul.dtr-details > li:last-child {
  border-bottom: none;
}

table.dataTable tr.child span.dtr-title {
  font-weight: 700;
  color: #6c757d;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Action-Buttons (Edit/Copy/Label/Delete) – kompakt & immer in einer Reihe */
table.dataTable td:last-child {
  white-space: nowrap;
}

table.dataTable td .btn {
  padding: 0.25rem 0.5rem !important;
  font-size: 0.85rem !important;
  margin-right: 4px;
}

table.dataTable td .btn:last-child {
  margin-right: 0;
}

.btn-actions {
  padding: 0.25rem 0.5rem !important;
}

/* Modals: eigenständiger CI-Look statt Standard-Bootstrap */
.modal-content {
  border: none;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.modal-header {
  position: relative;
  background: #f8f9fa;
  border-bottom: 1px solid #eef0f2;
  padding: 1.1rem 1.5rem 1.1rem 1.75rem;
}

.modal-header::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.9rem;
  bottom: 0.9rem;
  width: 4px;
  border-radius: 3px;
  background: var(--bs-primary, #52ad31);
}

.modal-title {
  font-weight: 700;
  font-size: 1.1rem;
}

.modal-header .btn-close {
  width: 0.7em;
  height: 0.7em;
  padding: 0.5em;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.04);
  opacity: 1;
  transition: background-color 0.15s ease;
}

.modal-header .btn-close:hover {
  background-color: rgba(0, 0, 0, 0.09);
}

.modal-body {
  padding: 1.5rem 1.75rem;
}

.modal-footer {
  border-top: 1px solid #eef0f2;
  padding: 1rem 1.75rem;
}

/* Sanftere, weniger "bootstrap-y" Öffnen-Animation */
.modal.fade .modal-dialog {
  transform: scale(0.96) translateY(-8px);
  transition: transform 0.2s ease-out, opacity 0.2s ease-out;
}

.modal.show .modal-dialog {
  transform: scale(1) translateY(0);
}

.modal-backdrop.show {
  opacity: 0.45;
}

/* Readonly/disabled Felder (z.B. Posten-Preview) optisch als "System-generiert" abheben */
.form-control:disabled,
.form-control[readonly] {
  background-color: #f8f9fa;
  color: #6c757d;
}

/* Abbrechen-Button in Modals: dezenter Ghost-Style statt hartem Bootstrap-Grau */
.modal-footer .btn-secondary {
  background: transparent;
  border-color: #dee2e6;
  color: #6c757d;
}

.modal-footer .btn-secondary:hover {
  background: #f1f3f5;
  border-color: #ced4da;
  color: #495057;
}

/* Ladeindikator beim Nachladen von Modal-Daten (edit/copy/etc.) */
.dt-loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.75);
  z-index: 5;
  border-radius: 5px;
}

.dt-loading-overlay .spinner-border {
  width: 2rem;
  height: 2rem;
  color: var(--bs-primary, #52ad31);
}

/* Dashboard: Fristen- und Aktivitäten-Listen */
.list-group-item {
  border-color: #eef0f2;
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
}

.list-group-item:first-child {
  border-top: none;
}

.list-group-item:last-child {
  border-bottom: none;
}

/* Formulare in den Modals */
.form-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 0.3rem;
}

.form-control,
.form-select {
  border-radius: 5px;
  border-color: #dfe2e6;
}

.form-control:focus,
.form-select:focus {
  border-color: #52ad31;
  box-shadow: 0 0 0 0.2rem rgba(82, 173, 49, 0.15);
}

/* Buttons: einheitlich weicher, dezenter Schatten auf Primary */
.btn {
  border-radius: 5px;
  font-weight: 500;
}

.btn-primary {
  box-shadow: 0 2px 8px rgba(82, 173, 49, 0.25);
}

/* =========================================================
   Fixierte Nav/Sidebar beim Scrollen
   – .app-wrapper ist ein CSS-Grid mit nur min-height:100vh,
     wodurch das ganze Grid (inkl. Header/Sidebar) mitwächst.
     Wir begrenzen es auf die Viewport-Höhe und lassen nur
     den Content-Bereich selbst scrollen. –
   ========================================================= */
html, body {
  height: 100%;
}

.app-wrapper {
  height: 100vh;
  overflow: hidden;
}

.app-content {
  height: 100%;
  overflow-y: auto;
}

/* Breadcrumb neben dem Nav-Toggler */
.app-breadcrumb {
  margin-left: 4px;
}

.app-breadcrumb .breadcrumb {
  font-size: 0.85rem;
}

.app-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  color: #adb5bd;
}

.app-breadcrumb .breadcrumb-item a {
  color: #6c757d;
  text-decoration: none;
}

.app-breadcrumb .breadcrumb-item a:hover {
  color: var(--bs-primary, #52ad31);
}

.app-breadcrumb .breadcrumb-item.active {
  color: #212529;
  font-weight: 600;
}

/* DataTables: Such-Feld über der Tabelle größer & schöner */
.dataTables_wrapper .dataTables_filter {
  margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
  .dataTables_wrapper .dataTables_filter {
    text-align: right;
  }
}

.dataTables_wrapper .dataTables_filter label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #6c757d;
}

.dataTables_wrapper .dataTables_filter input {
  position: relative;
  min-width: 260px;
  margin-left: 0 !important;
  padding: 0.55rem 0.9rem 0.55rem 2.2rem !important;
  font-size: 0.95rem;
  border: 1px solid #dfe2e6;
  border-radius: 5px;
  background: #fff url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat 0.7rem center;
  background-size: 15px 15px;
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dataTables_wrapper .dataTables_filter input:focus {
  outline: none;
  border-color: #52ad31;
  box-shadow: 0 0 0 0.2rem rgba(82, 173, 49, 0.15);
}

@media (max-width: 767.98px) {
  .dataTables_wrapper .dataTables_filter {
    text-align: left;
  }

  .dataTables_wrapper .dataTables_filter label {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
  }

  .dataTables_wrapper .dataTables_filter input {
    min-width: 0;
    width: 100%;
    flex: 1 1 auto;
    margin-top: 6px;
  }
}

.dataTables_wrapper .dataTables_length select {
  border-radius: 5px;
  padding: 0.35rem 1.8rem 0.35rem 0.6rem;
  border-color: #dfe2e6;
}

.dataTables_wrapper .dt-buttons {
  display: flex;
  gap: 6px;
  margin-bottom: 0.5rem;
}

.dataTables_wrapper .dt-buttons .btn {
  display: inline-flex;
  align-items: center;
}

/* DataTables vergibt diese Klassen automatisch (buttons-csv / buttons-excel) –
   darüber stylen ist zuverlässiger als eine eigene className, die manchmal
   nicht richtig durchgereicht wird. */
.dataTables_wrapper .dt-buttons button.buttons-csv,
.dataTables_wrapper .dt-buttons .buttons-csv {
  background-color: #fff !important;
  border-color: #dfe2e6 !important;
  color: #6c757d !important;
}

.dataTables_wrapper .dt-buttons button.buttons-csv:hover,
.dataTables_wrapper .dt-buttons .buttons-csv:hover {
  background-color: #f4f5f6 !important;
  border-color: #ced4da !important;
  color: #495057 !important;
}

.dataTables_wrapper .dt-buttons button.buttons-excel,
.dataTables_wrapper .dt-buttons .buttons-excel {
  background-color: #fff !important;
  border-color: #bcdfcb !important;
  color: #1d6f42 !important;
}

.dataTables_wrapper .dt-buttons button.buttons-excel:hover,
.dataTables_wrapper .dt-buttons .buttons-excel:hover {
  background-color: #eaf6ee !important;
  border-color: #1d6f42 !important;
  color: #1d6f42 !important;
}

#qr-reader {
  border-radius: 5px;
  overflow: hidden;
}

/* Durchsuchbares Produkt-Dropdown (Tom Select) ans CI anpassen */
.ts-wrapper.form-select .ts-control,
.ts-control {
  border-radius: 5px;
  border-color: #dfe2e6;
}

.ts-wrapper.focus .ts-control {
  border-color: #52ad31;
  box-shadow: 0 0 0 0.2rem rgba(82, 173, 49, 0.15);
}

.ts-dropdown {
  border-radius: 5px;
  border-color: #dfe2e6;
}

.ts-dropdown .active {
  background-color: rgba(82, 173, 49, 0.12);
  color: #212529;
}

/* Tom Select im Dark Mode - Standard-Styling hatte zu dunklen Text auf dunklem Grund
   (z.B. Artikelnummer in Klammern kaum lesbar) */
[data-bs-theme="dark"] .ts-control,
[data-bs-theme="dark"] .ts-control input,
[data-bs-theme="dark"] .ts-control > div {
  color: var(--bs-body-color);
  background-color: var(--bs-body-bg);
}

[data-bs-theme="dark"] .ts-dropdown {
  background-color: var(--bs-body-bg);
  border-color: var(--bs-border-color);
  color: var(--bs-body-color);
}

[data-bs-theme="dark"] .ts-dropdown .option {
  color: var(--bs-body-color);
}

[data-bs-theme="dark"] .ts-dropdown .active {
  background-color: rgba(82, 173, 49, 0.2);
  color: #ffffff;
}

[data-bs-theme="dark"] .ts-control .item {
  color: var(--bs-body-color);
}

/* Datepicker (Flatpickr) ans CI anpassen */
.flatpickr-calendar {
  border-radius: 5px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
  background: var(--bs-primary, #52ad31);
  border-color: var(--bs-primary, #52ad31);
}

.flatpickr-day.today {
  border-color: var(--bs-primary, #52ad31);
}

.flatpickr-months .flatpickr-month,
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-weekdays {
  background: #fafbfc;
}

/* Bulk-Aktionsleiste (Items-Seite) */
.bulk-action-bar {
  background: #f4f8f3;
  border: 1px solid #d7e8d0;
  border-radius: 5px;
  padding: 0.6rem 1rem;
}

.bulk-action-bar .form-select {
  border-radius: 5px;
}

/* Verleih: Kalender-Ansicht (FullCalendar) ans CI anpassen */
.fc {
  --fc-border-color: #eef0f2;
  --fc-today-bg-color: rgba(82, 173, 49, 0.08);
  --fc-button-bg-color: #fff;
  --fc-button-border-color: #dfe2e6;
  --fc-button-text-color: #6c757d;
  --fc-button-hover-bg-color: #f4f8f3;
  --fc-button-hover-border-color: #d7e8d0;
  --fc-button-active-bg-color: var(--bs-primary, #52ad31);
  --fc-button-active-border-color: var(--bs-primary, #52ad31);
  font-family: inherit;
}

.fc .fc-button {
  border-radius: 5px !important;
  text-transform: none;
  font-weight: 500;
  box-shadow: none !important;
}

.fc .fc-toolbar-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.fc .fc-daygrid-day-number,
.fc .fc-col-header-cell-cushion {
  color: #495057;
  text-decoration: none;
}

.fc-event {
  border: none;
  border-radius: 4px;
  font-size: 0.8rem;
  padding: 1px 4px;
  cursor: default;
}

/* DataTables: Pagination (Zurück/Weiter/Seitenzahlen) dezent statt Standard-Bootstrap-Blau */
.dataTables_wrapper .dataTables_paginate {
  margin-top: 1rem;
}

.dataTables_wrapper .dataTables_paginate .pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.dataTables_wrapper .dataTables_paginate .page-link {
  margin-left: 0 !important;
  border: 1px solid #eef0f2;
  border-radius: 5px !important;
  color: #6c757d;
  font-size: 0.85rem;
  padding: 0.4rem 0.75rem;
  background-color: #fff;
  box-shadow: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.dataTables_wrapper .dataTables_paginate .page-link:hover {
  background-color: #f4f8f3;
  border-color: #d7e8d0;
  color: #3d8a24;
}

.dataTables_wrapper .dataTables_paginate .page-item.active .page-link {
  background-color: var(--bs-primary, #52ad31);
  border-color: var(--bs-primary, #52ad31);
  color: #fff;
}

.dataTables_wrapper .dataTables_paginate .page-item.disabled .page-link {
  color: #ced4da;
  background-color: #fff;
  border-color: #eef0f2;
}

/* =========================================================
   Navbar / Sidebar (nav.php) – gilt seitenübergreifend
   ========================================================= */
.app-header {
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.05);
}

.app-header .nav-link {
  border-radius: 5px;
}

.sidebar-brand {
  padding: 0.75rem 0;
}

.nav-sidebar > .nav-item > .nav-link {
  border-radius: 5px;
  margin: 2px 8px;
  width: auto;
}

.nav-sidebar > .nav-item > .nav-link:hover {
  background-color: rgba(82, 173, 49, 0.12);
}

.nav-sidebar > .nav-item > .nav-link.active {
  background-color: var(--bs-primary, #52ad31);
}

.nav-header {
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  opacity: 0.6;
}

/* User-Dropdown im Header */
.user-menu .dropdown-menu {
  border: none;
  border-radius: 5px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.user-menu .user-header img {
  border-radius: 5px;
}

.user-menu .nav-link img.user-image {
  border-radius: 5px;
}

/* =========================================================
   Dashboard Kennzahlen-Boxen (index.php)
   ========================================================= */
.small-box {
  border-radius: 5px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.small-box .inner h3 {
  font-weight: 700;
}

/* =========================================================
   Login-Seite (login.php)
   – weißer Hintergrund, gleicher Card-Stil wie im Rest
     des Systems, grüner Akzent nur gezielt eingesetzt –
   ========================================================= */
.login-page {
  background: #fff;
  display: flex;
  align-items: center;
  min-height: 100vh;
}

.login-box {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  padding: 24px;
}

.login-brand {
  text-align: center;
  margin-bottom: 1.75rem;
}

.login-brand-text {
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: 0.01em;
  color: var(--bs-primary, #52ad31);
}

.login-card {
  border: 1px solid #eef0f2;
  border-radius: 5px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.login-card .card-body {
  padding: 2rem;
}

.login-box-msg {
  text-align: center;
  color: #6c757d;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.login-box .form-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.login-box .form-check-label {
  font-size: 0.85rem;
  color: #6c757d;
}

.login-box .btn-primary {
  padding: 0.55rem 0;
  font-weight: 600;
}

.login-footer {
  text-align: center;
  color: #adb5bd;
  font-size: 0.8rem;
  margin-top: 1.25rem;
}

/* =========================================================
   Desktop: Sidebar auf Viewport-Höhe begrenzen und scrollbar machen
   – ohne das würde die Sidebar bei vielen Menüpunkten (wie jetzt mit
     "Sets" dazugekommen) einfach unten aus dem Bildschirm rauswachsen,
     ohne dass man weiter runterscrollen kann.
   ========================================================= */
@media (min-width: 768px) {
  .app-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
  }

  .app-sidebar .sidebar-brand {
    flex: 0 0 auto;
  }

  .app-sidebar .sidebar-wrapper {
    flex: 1 1 auto;
    min-height: 0;
    height: auto !important;
    overflow-y: auto !important;
  }
}

/* =========================================================
   Mobile: Sidebar als Vollbild-Overlay statt schmaler Streifen
   – reine CSS-Lösung, hängt sich an die Klassen "sidebar-open"
     und "sidebar-collapse", die euer toggleSidebar() in
     custom.js bereits zuverlässig togglet. toggleSidebar()
     selbst wird nicht verändert. –
   ========================================================= */
@media (max-width: 767.98px) {
  /* Menu-Toggle-Button größer und besser antippbar */
  .app-header .navbar-nav > .nav-item:first-child > .nav-link {
    padding: 0.5rem 0.75rem;
  }

  .app-header .navbar-nav > .nav-item:first-child .bi-list {
    font-size: 1.6rem;
  }

  /* Sidebar aus dem Grid rausnehmen (sie ist eh position:fixed und liegt
     als Overlay drüber) – so bekommen Header und Inhalt garantiert die
     volle Breite, unabhängig davon, wie der Browser die "auto"-Spalte
     einer fixed-position-Sidebar berechnen würde. */
  .app-wrapper {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "lte-app-header"
      "lte-app-main"
      "lte-app-footer" !important;
  }

  .app-sidebar {
    position: fixed !important;
    top: 3.5rem !important;
    left: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: calc(100vh - 3.5rem) !important;
    height: calc(100dvh - 3.5rem) !important;
    max-height: calc(100vh - 3.5rem) !important;
    max-height: calc(100dvh - 3.5rem) !important;
    min-width: 0 !important;
    z-index: 1030;
    transform: translateX(-100%);
    transition: transform 0.25s ease-in-out !important;
    display: flex !important;
    flex-direction: column !important;
  }

  body.sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  body.sidebar-collapse .app-sidebar {
    transform: translateX(-100%);
  }

  .app-sidebar .sidebar-brand {
    flex: 0 0 auto;
  }

  .app-sidebar .sidebar-wrapper {
    flex: 1 1 auto;
    min-height: 0;
    height: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }

  /* Solange die Vollbild-Nav offen ist, nicht zusätzlich den Inhalt dahinter scrollen */
  body.sidebar-open .app-content {
    overflow: hidden;
  }

  /* Menüpunkte in der Vollbild-Nav etwas großzügiger antippbar */
  /* Am Handy: kein verschachtelter interner Scroll-Container mehr (siehe .app-wrapper/
     .app-content weiter oben) - iOS behandelt das unzuverlässig (Scrollen "hängt" kurz).
     Stattdessen scrollt hier ganz normal die Seite selbst, der Header bleibt über
     position:sticky oben (AdminLTE-Standard) - einfacher und robuster. */
  .app-wrapper {
    height: auto !important;
    min-height: 100dvh !important;
    overflow: visible !important;
  }

  .app-content {
    height: auto !important;
    overflow: visible !important;
  }

  .app-sidebar .nav-link {
    padding: 0.85rem 1rem;
    font-size: 1rem;
  }
}

/* =========================================================
   Dark Mode – Overrides für alle Custom-Komponenten
   Aktiviert über data-bs-theme="dark" auf <html> (Toggle in nav.php).
   Bootstrap 5.3 deckt die meisten Standard-Komponenten schon selbst
   ab; hier geht es nur um unsere Custom-Farben, die fest verdrahtet
   waren (Cards, Modals, Tabelle, Suche, Pagination, Login etc.).
   ========================================================= */
[data-bs-theme="dark"] body {
  background-color: #1a1d20;
}

[data-bs-theme="dark"] .card {
  background-color: #22262a;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

[data-bs-theme="dark"] .card-header {
  background: #22262a;
  border-bottom-color: #33383d;
}

[data-bs-theme="dark"] .card-body hr {
  border-color: #444;
  opacity: 0.2;
}

[data-bs-theme="dark"] .reiterliste {
  background: #26292d;
  border-color: #33383d;
}

[data-bs-theme="dark"] .reiterliste p {
  color: #9aa0a6;
}

[data-bs-theme="dark"] .reiter {
  background: #2c3034;
  border-color: #3a3f44;
  color: #cfd3d6;
}

[data-bs-theme="dark"] .reiter:hover {
  border-color: #4a4f54;
}

[data-bs-theme="dark"] .reiter.active {
  border-color: #52ad31;
}

[data-bs-theme="dark"] table.dataTable thead th {
  background: #26292d;
  color: #9aa0a6;
  border-bottom-color: #33383d !important;
}

[data-bs-theme="dark"] table.dataTable tbody tr:hover {
  background-color: rgba(82, 173, 49, 0.14) !important;
}

[data-bs-theme="dark"] table.dataTable tr.child {
  background-color: #202327;
}

[data-bs-theme="dark"] table.dataTable tr.child ul.dtr-details > li {
  border-bottom-color: #33383d;
}

[data-bs-theme="dark"] .modal-content {
  background-color: #22262a;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}

[data-bs-theme="dark"] .modal-header,
[data-bs-theme="dark"] .modal-footer {
  background: #22262a;
  border-color: #33383d;
}

[data-bs-theme="dark"] .modal-header .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
  background-color: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .modal-header .btn-close:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

[data-bs-theme="dark"] .form-control:disabled,
[data-bs-theme="dark"] .form-control[readonly] {
  background-color: #2a2f34;
  color: #9aa0a6;
}

[data-bs-theme="dark"] .modal-footer .btn-secondary {
  border-color: #3a3f44;
  color: #9aa0a6;
}

[data-bs-theme="dark"] .modal-footer .btn-secondary:hover {
  background: #2c3034;
  border-color: #4a4f54;
  color: #cfd3d6;
}

[data-bs-theme="dark"] .list-group-item {
  border-color: #33383d;
}

[data-bs-theme="dark"] .dt-loading-overlay {
  background: rgba(34, 38, 42, 0.85);
}

[data-bs-theme="dark"] .dataTables_wrapper .dataTables_filter input {
  background-color: #22262a;
  border-color: #3a3f44;
  color: #e9ecef;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa0a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
}

[data-bs-theme="dark"] .dataTables_wrapper .dataTables_length select {
  background-color: #22262a;
  border-color: #3a3f44;
  color: #e9ecef;
}

[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .page-link {
  background-color: #22262a;
  border-color: #3a3f44;
  color: #9aa0a6;
}

[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .page-link:hover {
  background-color: #2c3034;
  border-color: #4a4f54;
  color: #7fc95f;
}

[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .page-item.disabled .page-link {
  background-color: #22262a;
  border-color: #33383d;
  color: #55595d;
}

[data-bs-theme="dark"] .container-expand-content {
  background: #202327;
}

[data-bs-theme="dark"] .container-expand-meta {
  background: #202327;
  border-bottom-color: #2f3338;
}

[data-bs-theme="dark"] .container-content-header {
  color: #9aa0a6;
}

[data-bs-theme="dark"] .container-content-list {
  background: #22262a;
  border-color: #33383d;
}

[data-bs-theme="dark"] .container-content-list .list-group-item:hover {
  background-color: rgba(82, 173, 49, 0.1);
}

[data-bs-theme="dark"] .container-content-product a {
  color: #e9ecef;
}

[data-bs-theme="dark"] .container-content-id {
  background: rgba(82, 173, 49, 0.18);
}

[data-bs-theme="dark"] .btn-container-remove:hover {
  background-color: rgba(217, 83, 79, 0.15);
  color: #f0a8a6;
}

[data-bs-theme="dark"] .container-expand-loading {
  color: #9aa0a6;
}

[data-bs-theme="dark"] .containerListTable {
  border-color: #33383d;
  background: #22262a;
}

[data-bs-theme="dark"] .containerListTable th {
  background: #26292d;
  color: #9aa0a6;
  border-bottom-color: #33383d;
}

[data-bs-theme="dark"] .containerListTable td {
  border-bottom-color: #2c3034;
}

[data-bs-theme="dark"] .containerListTable tr:hover {
  background-color: rgba(82, 173, 49, 0.14);
}

[data-bs-theme="dark"] .login-page {
  background: #1a1d20;
}

[data-bs-theme="dark"] .login-card {
  border-color: #33383d;
}

[data-bs-theme="dark"] .login-box-msg,
[data-bs-theme="dark"] .login-footer {
  color: #9aa0a6;
}

[data-bs-theme="dark"] .app-breadcrumb .breadcrumb-item a {
  color: #9aa0a6;
}

[data-bs-theme="dark"] .app-breadcrumb .breadcrumb-item.active {
  color: #e9ecef;
}

[data-bs-theme="dark"] .nav-sidebar > .nav-item > .nav-link:hover {
  background-color: rgba(82, 173, 49, 0.18);
}

[data-bs-theme="dark"] #alert-container .alert-success {
  background-color: rgba(82, 173, 49, 0.12);
  color: #a8dd8f;
}

[data-bs-theme="dark"] #alert-container .alert-danger {
  background-color: rgba(217, 83, 79, 0.15);
  color: #f0a8a6;
}

[data-bs-theme="dark"] #alert-container .alert .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

[data-bs-theme="dark"] .fc {
  --fc-border-color: #33383d;
  --fc-page-bg-color: #22262a;
  --fc-neutral-bg-color: #26292d;
  --fc-list-event-hover-bg-color: #2c3034;
  --fc-button-bg-color: #22262a;
  --fc-button-border-color: #3a3f44;
  --fc-button-text-color: #cfd3d6;
  --fc-button-hover-bg-color: #2c3034;
  --fc-button-hover-border-color: #4a4f54;
}

[data-bs-theme="dark"] .fc .fc-daygrid-day-number,
[data-bs-theme="dark"] .fc .fc-col-header-cell-cushion {
  color: #cfd3d6;
}

[data-bs-theme="dark"] .bulk-action-bar {
  background: rgba(82, 173, 49, 0.1);
  border-color: rgba(82, 173, 49, 0.3);
}

[data-bs-theme="dark"] .location-bulk-bar {
  background: rgba(82, 173, 49, 0.1);
  border-color: rgba(82, 173, 49, 0.3);
}

[data-bs-theme="dark"] .container-content-list .checklist-done {
  background-color: rgba(82, 173, 49, 0.1);
}

[data-bs-theme="dark"] .scan-success-banner {
  background: linear-gradient(135deg, rgba(82, 173, 49, 0.18), rgba(82, 173, 49, 0.08));
  border-color: rgba(82, 173, 49, 0.4);
}

[data-bs-theme="dark"] .scan-success-banner strong {
  color: #e9ecef;
}

[data-bs-theme="dark"] .scan-error-banner {
  background: linear-gradient(135deg, rgba(220, 53, 69, 0.18), rgba(220, 53, 69, 0.08));
  border-color: rgba(220, 53, 69, 0.45);
  color: #f1aeb5;
}

[data-bs-theme="dark"] .scan-next-up {
  background: rgba(82, 173, 49, 0.08);
}

[data-bs-theme="dark"] .scan-next-up-name {
  color: #e9ecef;
}

/* Produktionen-Liste (Packen/Lagern): am Handy als Karten statt Tabelle,
   rein CSS-basiert -> unabhängig von DataTables und daher zuverlässig */
@media (max-width: 767.98px) {
  .production-list-table thead {
    display: none;
  }

  /* DataTables setzt teils eigene inline width-Attribute auf Tabelle/Spalten -
     hier hart überschreiben, damit nichts über den Kartenrand hinausragt.
     WICHTIG: nur für die Produktions-Kartenansicht scoped, NICHT global auf
     dataTables_wrapper - das würde das Scrollen bei allen anderen Tabellen blockieren. */
  #packTableCard div.dataTables_wrapper,
  #storeTableCard div.dataTables_wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    padding: 0 !important;
  }

  .production-list-table {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-collapse: separate !important;
  }

  .production-list-table tbody {
    display: block !important;
    width: 100% !important;
  }

  .production-list-table tr {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 0 0.75rem 0 !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 5px !important;
    padding: 0.75rem !important;
    background: #fff;
  }

  .production-list-table td {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    border: none !important;
    padding: 0.3rem 0 !important;
    text-align: left !important;
    white-space: normal !important;
    word-break: break-word;
    float: none !important;
    background-color: transparent !important;
  }

  .production-list-table td[data-label]:not([data-label=""])::before {
    content: attr(data-label);
    display: block;
    font-weight: 600;
    color: #6c757d;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.1rem;
  }

  .production-list-table td[data-label=""] {
    margin-top: 0.4rem !important;
  }

  .production-list-table .btn {
    width: 100%;
    box-sizing: border-box;
  }
}

[data-bs-theme="dark"] .production-list-table tr {
  border-color: #3a3f44;
}

/* Checkliste (Container-Inhalt, Kunden-Historie, Scan-Checkliste bei Produktionen):
   am Handy Produktname auf eigene Zeile, damit nichts seitlich rausragt */
@media (max-width: 575.98px) {
  .container-content-list .list-group-item {
    padding: 0.6rem 0.75rem;
  }

  .container-content-product {
    flex-basis: 100%;
    order: 3;
    margin-top: 0.2rem;
  }

  .container-content-list .list-group-item .badge {
    margin-top: 0.2rem;
  }
}

/* Karten-Header mit Titel + Aktions-Button(s) (Neu erstellen, Barcode-Scan, ...):
   am Handy untereinander statt gequetscht nebeneinander. Betrifft alle Seiten,
   die dieses Muster nutzen (Produkte, Gruppen, Container, Verleih, Kunden,
   Lagerorte, Produktionen, ...). */
@media (max-width: 575.98px) {
  .card-header.d-flex.align-items-center {
    flex-wrap: wrap;
    row-gap: 0.6rem;
  }

  .card-header.d-flex.align-items-center > .card-title {
    flex: 1 1 100%;
  }

  .card-header.d-flex.align-items-center > .ms-auto {
    margin-left: 0 !important;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .card-header.d-flex.align-items-center > .ms-auto .btn,
  .card-header.d-flex.align-items-center > .ms-auto > a {
    flex: 1 1 auto;
    text-align: center;
  }
}

/* Produkt-Zustand: defekte/in Reparatur befindliche Zeilen dezent hervorheben */
table.dataTable tr.item-condition-bad {
  background-color: rgba(220, 53, 69, 0.06) !important;
}

table.dataTable tr.item-condition-warn {
  background-color: rgba(255, 193, 7, 0.08) !important;
}

[data-bs-theme="dark"] table.dataTable tr.item-condition-bad {
  background-color: rgba(220, 53, 69, 0.12) !important;
}

[data-bs-theme="dark"] table.dataTable tr.item-condition-warn {
  background-color: rgba(255, 193, 7, 0.12) !important;
}
