/* ===============================================
   DATABASE UI STYLES - Tabelle, Controls, Filter
   =============================================== */

/* Database Controls */
.database-controls {
  flex-shrink: 0;
  padding-bottom: 4px; /* 🔧 REDUZIERT: Minimaler Abstand zur Tabelle */
  margin-bottom: 0;
  margin-top: 0;
  /* Normale Breite ohne Erweiterung */
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
  overflow: visible; /* Wichtig für Hover-Effekte */
  padding-top: 0; /* Kein zusätzliches padding-top mehr nötig */
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 4px; /* 🔧 REDUZIERT: Kompaktere Abstände zwischen Controls */
}

.database-buttons {
  display: flex;
  justify-content: center; /* Buttons mittig ausrichten */
  gap: var(--spacing-sm);
  margin-bottom: 0px; /* Kein zusätzlicher margin - gap in .database-controls reicht völlig */
  margin-top: 0px; /* 🔧 REDUZIERT: Kein oberer Abstand */
}

.database-button {
  padding: 8px 15px;
  border: 1px solid var(--border-color);
  background: white;
  color: var(--text-color);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  font-size: 14px;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0; /* 🔧 NEU: Verhindert Schrumpfen in Flex-Container */
  white-space: nowrap; /* 🔧 NEU: Verhindert Textumbruch */
}

.database-button:hover {
  background: var(--secondary-color);
  border-color: var(--primary-color);
}

.database-button svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.database-button.danger {
  border-color: var(--error-color);
  color: var(--error-color);
}

.database-button.danger:hover {
  background: rgba(211, 47, 47, 0.1);
}

.database-button.danger svg {
  fill: var(--error-color);
}

/* Database Search */
.database-search {
  display: flex;
  flex-direction: row; /* 🔧 NEU: Explizit row für horizontale Anordnung */
  gap: var(--spacing-sm);
  margin-bottom: 0px; /* 🔧 REDUZIERT: Kein Abstand - gap in .database-controls reicht */
  margin-top: 0; /* 🔧 ANGEPASST: Kein zusätzlicher oberer Abstand */
  padding-bottom: 0;
  align-items: center; /* 🔧 NEU: Zentriere alle Elemente vertikal */
  flex-wrap: nowrap; /* 🔧 NEU: Verhindert Umbruch, damit Button immer sichtbar bleibt */
  min-width: 0; /* 🔧 NEU: Ermöglicht korrektes Shrinking */
  overflow: visible; /* 🔧 ANGEPASST: Kein Scrollen, Button soll immer sichtbar sein */
  width: 100%; /* 🔧 NEU: Volle Breite nutzen */
  box-sizing: border-box; /* 🔧 NEU: Padding in Breite einrechnen */
}

.database-search input {
  flex: 1 1 0% !important; /* 🔧 WICHTIG: Flex-Basis 0%, kann wachsen und schrumpfen - Prozentangabe wichtig */
  min-width: 150px !important; /* 🔧 WICHTIG: Mindestbreite für Suchfeld */
  max-width: none; /* 🔧 NEU: Keine maximale Breite - Flexbox soll es handhaben */
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: 14px;
  box-sizing: border-box; /* 🔧 NEU: Padding in Breite einrechnen */
  flex-shrink: 1 !important; /* 🔧 WICHTIG: Kann schrumpfen um Platz für Button zu schaffen */
  overflow: hidden; /* 🔧 WICHTIG: Verhindert Overflow im Input-Feld */
  text-overflow: ellipsis; /* 🔧 WICHTIG: Zeigt "..." bei zu langem Text */
  white-space: nowrap; /* 🔧 WICHTIG: Verhindert Textumbruch - Text wird mit "..." abgeschnitten */
  order: 1 !important; /* 🔧 NEU: Suchfeld kommt zuerst (ganz links) */
}

.database-search input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(211, 47, 47, 0.1);
}

.database-search button {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  background: white;
  color: var(--text-color);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all var(--transition-normal);
}

/* 🔧 WICHTIG: search-action-button hat höhere Priorität als .database-search button */
.database-search .search-action-button {
  /* Explizit überschreiben, um sicherzustellen, dass der Button sichtbar bleibt */
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  width: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  box-sizing: border-box !important;
  order: 2 !important; /* 🔧 NEU: Kommt direkt nach dem Input-Feld */
}

.database-search button:hover {
  background: var(--secondary-color);
  border-color: var(--primary-color);
}

.database-search button svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Notizen-Button in Suchzeile */
.database-search .notizen-button {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  flex-grow: 0; /* 🔧 NEU: Verhindert dass Button wächst */
  order: 3 !important; /* 🔧 NEU: Kommt nach Suchfeld und Search-Button */
}

/* Excel-Button in Suchzeile */
.database-search .excel-button {
  flex-shrink: 0;
  flex-grow: 0; /* 🔧 NEU: Verhindert dass Button wächst */
  order: 5 !important; /* 🔧 ANGEPASST: Kommt ganz nach rechts */
}

/* Cleanup-Button (Ausverkaufte Reduzierte) in Suchzeile */
.database-search .cleanup-button {
  white-space: nowrap;
  flex-shrink: 0;
  flex-grow: 0; /* 🔧 NEU: Verhindert dass Button wächst */
  order: 4 !important; /* 🔧 ANGEPASST: Kommt nach Notizen-Button, vor Excel */
}

.database-search .cleanup-button.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.database-search .cleanup-button:hover {
  background: var(--secondary-color);
  border-color: var(--primary-color);
}

.database-search .notizen-count-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  background-color: #ff4444;
  color: #000000;
  border-radius: 10px;
  font-size: 11px;
  font-weight: bold;
  line-height: 1.1;
}

.database-search .notizen-button.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.database-search .notizen-button.active .notizen-count-circle {
  background-color: #ffffff;
  color: #000000;
}

.search-action-button {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  background: white;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex !important; /* 🔧 NEU: Explizit sichtbar machen */
  align-items: center;
  justify-content: center; /* 🔧 NEU: Zentriere Icon im Button */
  gap: 5px;
  flex-shrink: 0 !important; /* 🔧 WICHTIG: Button darf NIE schrumpfen */
  flex-grow: 0 !important; /* 🔧 WICHTIG: Button darf NIE wachsen */
  white-space: nowrap; /* 🔧 NEU: Verhindert Textumbruch */
  min-width: 44px !important; /* 🔧 WICHTIG: Mindestbreite für Button - immer sichtbar */
  max-width: 44px !important; /* 🔧 WICHTIG: Maximale Breite für Button (nur Icon) */
  width: 44px !important; /* 🔧 WICHTIG: Feste Breite für Button - immer gleich */
  height: auto; /* 🔧 NEU: Automatische Höhe */
  visibility: visible !important; /* 🔧 WICHTIG: Immer sichtbar */
  opacity: 1 !important; /* 🔧 WICHTIG: Immer sichtbar */
  box-sizing: border-box; /* 🔧 NEU: Padding in Breite einrechnen */
  position: relative; /* 🔧 NEU: Position für z-index */
  z-index: 10; /* 🔧 NEU: Über anderen Elementen */
  order: 2 !important; /* 🔧 ANGEPASST: Button kommt direkt nach dem Input-Feld (links) */
}

.search-action-button:hover {
  background: var(--secondary-color);
  border-color: var(--primary-color);
}

.search-action-button svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  display: none; /* 🔧 WICHTIG: Standardmäßig versteckt - wird durch Modus-Regeln überschrieben */
}

/* Icon-Wechsel: Lupen-Icon in search-mode, X-Icon in clear-mode */
.search-action-button.search-mode svg.search-icon {
  display: block !important; /* 🔧 WICHTIG: Zeige Lupen-Icon im Search-Modus */
}

.search-action-button.search-mode svg.clear-icon {
  display: none !important; /* 🔧 WICHTIG: Verstecke X-Icon im Search-Modus */
}

.search-action-button.clear-mode svg.search-icon {
  display: none !important; /* 🔧 WICHTIG: Verstecke Lupen-Icon im Clear-Modus */
}

.search-action-button.clear-mode svg.clear-icon {
  display: block !important; /* 🔧 WICHTIG: Zeige X-Icon im Clear-Modus */
}

/* 🎯 NEUE UX-VERBESSERUNG: Aktive Suche Highlighting */
.search-action-button.clear-mode.search-active {
  background-color: #ff6b6b !important;
  border-color: #ff4757 !important;
  color: white !important;
  animation: searchPulse 2s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(229, 115, 115, 0.3);
}

.search-action-button.clear-mode.search-active svg {
  fill: white !important;
}

.search-action-button.clear-mode.search-active:hover {
  background-color: #ff4757 !important;
  transform: scale(1.05);
}

/* Suchfeld-Highlighting für aktive Suche */
#databaseSearchInput.search-active {
  background-color: rgba(229, 115, 115, 0.05) !important;
  border-color: rgba(229, 115, 115, 0.3) !important;
  box-shadow: 0 0 5px rgba(229, 115, 115, 0.2) !important;
}

/* Pulsieren-Animation */
@keyframes searchPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.02);
  }
}

/* Department Filters */
.department-filters {
  margin-bottom: 0px; /* 🔧 REDUZIERT: Kein Abstand - gap in .database-controls reicht */
  position: relative;
  z-index: 10;
  overflow: visible; /* 🔧 WICHTIG: Badges müssen sichtbar bleiben */
  padding-top: 4px; /* 🔧 REDUZIERT: Weniger Platz für Hover-Rahmen */
  padding-right: 2px; /* 🔧 MINIMAL: Kleiner Abstand rechts für Badge-Platz */
}

/* 🏷️ Spezielle Regel für Warengruppenfilter - gleicher Abstand wie Abteilungsfilter */
#productGroupFilters {
  margin-bottom: 0px; /* 🔧 REDUZIERT: Kein Abstand - gap in .database-controls reicht */
  transition: all 0.3s ease; /* Smooth Animation für Einblenden */
}

/* 🌟 HIGHLIGHT-ANIMATION: Gelber Hinweis für Warengruppenfilter-BUTTON */
.warengruppen-button-highlight {
  animation: warengruppenButtonHighlight 2s ease-out;
  background-color: #ffeb3b !important; /* Gelber Hintergrund */
  color: #000 !important; /* Schwarzer Text auf gelbem Hintergrund für Kontrast */
}

@keyframes warengruppenButtonHighlight {
  0% {
    border-color: var(--border-color);
    box-shadow: 0 0 4px rgba(255, 235, 59, 0.6);
    background-color: #ffeb3b; /* Gelb */
  }
  30% {
    border-color: #fbc02d; /* Gelber Rahmen */
    box-shadow: 0 0 12px rgba(255, 235, 59, 0.9); /* Starkes gelbes Glühen */
    background-color: #ffeb3b; /* Gelb */
  }
  60% {
    border-color: #fbc02d;
    box-shadow: 0 0 8px rgba(255, 235, 59, 0.8);
    background-color: #ffeb3b; /* Gelb */
  }
  100% {
    border-color: #fbc02d;
    box-shadow: 0 0 6px rgba(255, 235, 59, 0.7);
    background-color: #ffeb3b; /* Gelb bleibt */
  }
}

/* Filter-Sektion Container - Reset-Button + Abteilungsbuttons */
.filters-section {
  display: grid;
  grid-template-columns: auto 1fr; /* Reset-Button auto-width, Buttons nehmen Rest */
  gap: 12px;
  align-items: start; /* Start-Alignment damit Reset-Button von oben beginnt */
  min-height: 60px; /* Mindesthöhe für kleine Bildschirme */
}

/* Entfernt: Container-Höhe wird nicht mehr benötigt - Reset-Button hat feste Höhe */

/* TH-Zelle für Sort-Reset-Button - erzwingt kompakte Größe */
.database-table th:nth-child(1) {
  width: 15px !important;
  min-width: 15px !important;
  max-width: 15px !important;
  padding: 0 !important;
  vertical-align: top !important; /* Oben ausrichten für vollständige Füllung */
  overflow: hidden;
  border-bottom: none !important; /* Entfernt unteren Border */
  border-top: none !important; /* Entfernt oberen Border */
  border-left: none !important; /* Entfernt linken Border */
  border-right: none !important; /* Entfernt rechten Border */
  position: relative; /* Für absolute Positionierung des Buttons */
  background: transparent !important; /* Transparenter Hintergrund */
}

/* Sort-Reset-Button im Tabellenkopf - kompakt und zellenfüllend */
.sort-reset-button {
  writing-mode: vertical-lr;
  text-orientation: mixed;
  background: #c8e6c9 !important; /* Gleiches Pastellgrün wie Filter-Reset */
  border: none !important; /* Entfernt alle Borders um schwarzen Strich zu vermeiden */
  border-radius: 0;
  color: #2e7d32 !important;
  cursor: pointer;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 1px; /* Direkt am Button */
  transition: background-color 0.3s ease; /* Nur Hintergrundfarbe animieren, keine Position */
  box-shadow: none !important; /* Entfernt alle Schatten die dunkle Bereiche verursachen könnten */
  position: absolute; /* Absolute Positionierung für komplette Füllung */
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  overflow: hidden;
  width: 100% !important;
  height: 100% !important; /* Füllt die komplette TH-Zelle aus */
  padding: 0;
  margin: 0;
  display: flex; /* Flex für bessere Textzentrierung */
  align-items: center; /* Vertikal zentrieren */
  justify-content: center; /* Horizontal zentrieren */
  flex-shrink: 0;
  z-index: 10 !important; /* Stellt sicher, dass der Button über allem anderen liegt */
  text-shadow: none !important; /* Entfernt jegliche Text-Schatten vom Button */
  text-decoration: none !important; /* Entfernt Textdekoration */
  /* Zusätzliche Browser-Reset-Properties */
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -webkit-font-smoothing: antialiased !important;
}

.sort-reset-button:hover {
  background: #a5d6a7 !important;
  /* transform: translateY(-1px); ENTFERNT - Button soll sich nicht bewegen */
  box-shadow: none !important; /* Auch beim Hover keine Schatten */
  text-shadow: none !important; /* Auch beim Hover keine Text-Schatten */
  text-decoration: none !important;
}

.sort-reset-button:active {
  /* transform: translateY(0); ENTFERNT - Button soll sich nicht bewegen */
  background: #81c784 !important;
  box-shadow: none !important; /* Auch beim Klick keine Schatten */
  text-shadow: none !important; /* Auch beim Klick keine Text-Schatten */
  text-decoration: none !important;
}

/* Entferne alle möglichen Pseudo-Elemente die dunkle Bereiche verursachen könnten */
.sort-reset-button::before,
.sort-reset-button::after {
  display: none !important;
  content: none !important;
  background: transparent !important;
}


/* Ripple-Effekt deaktiviert - könnte dunkle Bereiche verursachen */
.sort-reset-button::after {
  display: none !important;
}

.sort-reset-button.clicked::after {
  display: none !important;
}

/* Processing-Zustand */
.sort-reset-button.processing {
  cursor: wait;
  pointer-events: none;
}

.sort-reset-button:disabled {
  cursor: not-allowed;
  opacity: 0.7 !important;
}

  /* Reset-Button (hochkant, passt sich an Abteilungsbuttons an) */
.filters-reset-button {
  writing-mode: vertical-lr;
  text-orientation: mixed;
  background: #c8e6c9; /* Pastellgrün */
  border: 1px solid #a5d6a7;
  border-radius: 8px;
  padding: 6px 6px; /* Gleiches padding-top/bottom wie department-filter-buttons */
  color: #2e7d32;
  font-weight: 500;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
  /* Grid-Item: Exakte Ausrichtung mit AbtNr-Buttons */
  grid-row: 1; /* Erste (und einzige) Grid-Reihe */
  align-self: stretch; /* Streckt sich über Grid-Höhe */
  margin-top: 8px; /* Gleich wie department-filter-buttons: 4px margin-top + 4px padding-top */
  margin-bottom: 8px; /* Gleich wie department-filter-buttons margin-bottom */
}

.filters-reset-button:hover {
  background: #a5d6a7;
  border-color: #81c784;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.filters-reset-button:active {
  transform: translateY(0);
  background: #81c784;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.filters-reset-button .reset-text {
  letter-spacing: 1px;
  font-weight: 600;
}

/* Ripple-Effekt beim Klick */
.filters-reset-button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s;
}

.filters-reset-button.clicked::after {
  width: 40px;
  height: 40px;
}

/* Processing-Zustand */
.filters-reset-button.processing {
  cursor: wait;
  pointer-events: none;
}

.filters-reset-button:disabled {
  cursor: not-allowed;
  opacity: 0.7 !important;
}

#departmentFilters {
  width: 100%;
}

#departmentFiltersContent {
  /* Entfernt flex-basierte Höhe - normales Layout */
}

#departmentFilterButtons {
  flex: 1;
}

.filter-label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 500;
  font-size: 14px;
}

.department-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
  margin-bottom: 8px; /* Kleiner Abstand zur nächsten Sektion */
  margin-top: 4px;
  position: relative;
  padding-top: 4px;
  overflow: visible; /* 🔧 WICHTIG: Badges können außerhalb liegen */
  padding-bottom: 2px;
  padding-right: 3px; /* 🔧 MINIMAL: Kleiner Abstand rechts für Badge-Platz */
}

.department-filter-button {
  padding: 6px 12px; /* 🔧 ZURÜCK: Original-Padding */
  border: 2px solid var(--border-color);
  background: white;
  color: var(--text-color);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  font-size: 12px;
  transition: all var(--transition-normal);
  white-space: nowrap;
  box-sizing: border-box;
}

.department-filter-button:hover {
  background: var(--secondary-color);
  border-color: var(--primary-color);
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.department-filter-button.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Container für Button + Badge (analog zu manueller Eingabe) */
.department-filter-button-container {
  position: relative;
  display: inline-block;
  margin-right: 2px; /* 🔧 MINIMAL: Kleiner Abstand rechts für Badge-Platz */
}

/* Badge für Altware-Anzahl (analog zu abt-circle-count) */
.department-filter-badge {
  position: absolute;
  top: -6px; /* 🔧 ANGEPASST: Von -8px auf -6px, damit weniger außerhalb liegt */
  right: -6px; /* 🔧 ANGEPASST: Von -8px auf -6px, damit weniger außerhalb liegt */
  background-color: #ff4444; /* Standard: rot */
  color: #000000; /* Schwarzer Text für bessere Lesbarkeit */
  border-radius: 10px; /* Oval-fähig statt perfekt rund */
  min-width: 20px;
  height: 20px;
  padding: 0 4px; /* Horizontaler Padding für mehrstellige Zahlen */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  line-height: 1.1; /* Leicht erhöht für bessere vertikale Zentrierung */
  z-index: 200; /* Hoch genug um über alle Button-Hover-Effekte zu kommen */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  border: 2px solid var(--background-color, #ffffff);
  white-space: nowrap; /* Verhindert Zeilenumbruch */
  text-align: center;
  /* Feintuning für perfekte vertikale Zentrierung */
  padding-top: 2px;
  /* Smooth Transition für Hover-Effekt */
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  /* Visueller Hinweis dass Badge klickbar ist */
  user-select: none;
}

/* Rotes Badge (Standard) */
.department-filter-badge.badge-red {
  background-color: #ff4444;
}

/* Gelbes Badge */
.department-filter-badge.badge-yellow {
  background-color: #ffaa00;
}

/* Grünes Badge (wenn Indikator-Balken grün ist) */
.department-filter-badge.badge-green {
  background-color: #44aa44;
}

/* Hover-Effekt: Badge vergrößern für bessere Lesbarkeit */
.department-filter-badge:hover {
  transform: scale(1.8); /* 80% größer */
  z-index: 1000; /* Über alles andere legen */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); /* Stärkerer Schatten */
  font-size: 12px; /* Leicht größere Schrift */
}

/* Hover-Effekt für rotes Badge */
.department-filter-badge.badge-red:hover {
  background-color: #ff2222; /* Etwas heller beim Hover */
}

/* Hover-Effekt für gelbes Badge */
.department-filter-badge.badge-yellow:hover {
  background-color: #ff9900; /* Etwas heller beim Hover */
}

/* Hover-Effekt für grünes Badge */
.department-filter-badge.badge-green:hover {
  background-color: #33aa33; /* Etwas heller beim Hover */
}

/* Hover-Effekt für Badge wenn Button gehovered wird - rot */
.department-filter-button-container:hover .department-filter-badge.badge-red {
  border-color: #ff2222 !important; /* Rote Umrandung beim Button-Hover */
  border-width: 1px; /* Dünne Umrandung */
  box-shadow: 0 0 8px rgba(255, 34, 34, 0.4); /* Zusätzlicher Glow-Effekt */
}

/* Hover-Effekt für Badge wenn Button gehovered wird - gelb */
.department-filter-button-container:hover .department-filter-badge.badge-yellow {
  border-color: #ff9900 !important; /* Gelbe Umrandung beim Button-Hover */
  border-width: 1px; /* Dünne Umrandung */
  box-shadow: 0 0 8px rgba(255, 153, 0, 0.4); /* Zusätzlicher Glow-Effekt */
}

/* Hover-Effekt für Badge wenn Button gehovered wird - grün */
.department-filter-button-container:hover .department-filter-badge.badge-green {
  border-color: #33aa33 !important; /* Grüne Umrandung beim Button-Hover */
  border-width: 1px; /* Dünne Umrandung */
  box-shadow: 0 0 8px rgba(51, 170, 51, 0.4); /* Zusätzlicher Glow-Effekt */
}

/* Dark Mode Anpassung für Badge - rot */
[data-theme="dark"] .department-filter-badge.badge-red {
  border-color: var(--dark-background, #1a1a1a);
  background-color: #ff5555;
  color: #000000; /* Schwarzer Text für bessere Lesbarkeit */
}

/* Dark Mode Anpassung für Badge - gelb */
[data-theme="dark"] .department-filter-badge.badge-yellow {
  border-color: var(--dark-background, #1a1a1a);
  background-color: #ffbb33;
  color: #000000; /* Schwarzer Text für bessere Lesbarkeit */
}

/* Dark Mode Anpassung für Badge - grün */
[data-theme="dark"] .department-filter-badge.badge-green {
  border-color: var(--dark-background, #1a1a1a);
  background-color: #55bb55;
  color: #000000; /* Schwarzer Text für bessere Lesbarkeit */
}

/* Dark Mode Hover-Effekt für rotes Badge */
[data-theme="dark"] .department-filter-button-container:hover .department-filter-badge.badge-red {
  border-color: #ff3333 !important;
  box-shadow: 0 0 8px rgba(255, 51, 51, 0.4);
}

/* Dark Mode Hover-Effekt für gelbes Badge */
[data-theme="dark"] .department-filter-button-container:hover .department-filter-badge.badge-yellow {
  border-color: #ffaa00 !important;
  box-shadow: 0 0 8px rgba(255, 170, 0, 0.4);
}

/* Dark Mode Hover-Effekt für grünes Badge */
[data-theme="dark"] .department-filter-button-container:hover .department-filter-badge.badge-green {
  border-color: #44aa44 !important;
  box-shadow: 0 0 8px rgba(68, 170, 68, 0.4);
}

/* 🆕 VK_Neu Frisch-Indikator-Balken */
.department-filter-indicator-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0%;
  transition: width 0.3s ease, background-color 0.3s ease;
  border-radius: 0 0 4px 4px;
  z-index: 150;
}

.department-filter-indicator-bar.indicator-red {
  background-color: #dc3545;
}

.department-filter-indicator-bar.indicator-yellow {
  background-color: #ffc107;
}

.department-filter-indicator-bar.indicator-green {
  background-color: #28a745;
}

/* Dark Mode Anpassung für Indikator-Balken */
[data-theme="dark"] .department-filter-indicator-bar.indicator-red {
  background-color: #ff5555;
}

[data-theme="dark"] .department-filter-indicator-bar.indicator-yellow {
  background-color: #ffd700;
}

[data-theme="dark"] .department-filter-indicator-bar.indicator-green {
  background-color: #4caf50;
}

.department-filter-button.all-button {
  background: var(--info-color);
  border-color: var(--info-color);
  color: white;
}

.department-filter-button.all-button:hover {
  background: #1976d2;
  border-color: #1976d2;
}

.department-filter-button.all-button.active {
  background: #0d47a1;
  border-color: #0d47a1;
}

.department-filter-button.altware-button {
  background: #424242;
  border-color: #666;
  color: white !important;
  font-weight: 500;
  position: relative;
  overflow: hidden;
  box-shadow: none;
}

.department-filter-button.altware-button:hover {
  background: #555;
  border-color: #777;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.department-filter-button.altware-button.active {
  background: #0d47a1;
  border-color: #0d47a1;
  animation: none;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.department-filter-button.altware-button.active:hover {
  background: #1565c0;
  border-color: #1565c0;
}

/* Lager 5 Filter Button */
.department-filter-button.lager5-button {
  background: #795548;
  border-color: #5d4037;
  color: white !important;
  font-weight: 500;
  position: relative;
  overflow: hidden;
  box-shadow: none;
}

.department-filter-button.lager5-button:hover {
  background: #8d6e63;
  border-color: #6d4c41;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.department-filter-button.lager5-button.active {
  background: #d84315;
  border-color: #d84315;
  animation: none;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.department-filter-button.lager5-button.active:hover {
  background: #ff5722;
  border-color: #ff5722;
}

/* Lager 8 Filter Button */
.department-filter-button.lager8-button {
  background: #607d8b;
  border-color: #455a64;
  color: white !important;
  font-weight: 500;
  position: relative;
  overflow: hidden;
  box-shadow: none;
}

.department-filter-button.lager8-button:hover {
  background: #78909c;
  border-color: #546e7a;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.department-filter-button.lager8-button.active {
  background: #e65100;
  border-color: #e65100;
  animation: none;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.department-filter-button.lager8-button.active:hover {
  background: #ff9800;
  border-color: #ff9800;
}

/* Lager 85 Filter Button */
.department-filter-button.lager85-button {
  background: #4a148c;
  border-color: #311b92;
  color: white !important;
  font-weight: 500;
  position: relative;
  overflow: hidden;
  box-shadow: none;
}

.department-filter-button.lager85-button:hover {
  background: #6a1b9a;
  border-color: #4a148c;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.department-filter-button.lager85-button.active {
  background: #7b1fa2;
  border-color: #7b1fa2;
  animation: none;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.department-filter-button.lager85-button.active:hover {
  background: #9c27b0;
  border-color: #9c27b0;
}

/* Database Status */
.database-status-mini {
  font-size: 12px;
  color: var(--text-light);
  margin: 0;
  padding: 0;
  line-height: 1.2;
}

#databaseStatus {
  margin: 2px 0 6px 0; /* Angemessener Abstand zur Tabelle */
  padding: 0;
  text-align: left;
  float: none;
  display: block;
  line-height: 1.2;
}

#databaseStatus.info {
  background: rgba(33, 150, 243, 0.1);
  color: var(--info-color);
  border: 1px solid rgba(33, 150, 243, 0.2);
}

#databaseStatus.success {
  background: rgba(56, 142, 60, 0.1);
  color: var(--success-color);
  border: 1px solid rgba(56, 142, 60, 0.2);
}

#databaseStatus.error {
  background: rgba(211, 47, 47, 0.1);
  color: var(--error-color);
  border: 1px solid rgba(211, 47, 47, 0.2);
}

/* Database Table Container */
.database-table-container {
  flex: 1 1 auto;
  overflow-x: auto;
  overflow-y: auto !important; /* 🔧 NEU: Scrollen ermöglichen für alle 100 geladenen Artikel */
  border: none; /* Kein Border für volle Breite */
  border-radius: 0; /* Keine Rundung für rand-zu-rand Design */
  width: 100%; /* Normale Breite ohne Erweiterung */
  margin: 0; /* Keine negativen Margins */
  padding: 0;
  min-height: 0; /* 🔧 WICHTIG: Ermöglicht korrektes Flexbox-Schrumpfen */
  /* Höhe wird dynamisch per JavaScript gesetzt basierend auf displayedRows */
}

/* Database Table */
.database-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  line-height: 1.3;
}

.database-table th,
.database-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
  text-align: left;
}

.database-table th {
  background: #f8f9fa;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 10;
}

.database-table tr:hover {
  background: rgba(0, 0, 0, 0.02);
}

/* Leere Nachrichtenzeile: Nicht klickbar, keine Hover-Effekte */
.database-table tr.empty-message {
  cursor: default !important;
  pointer-events: none;
}

.database-table tr.empty-message:hover {
  background: transparent !important;
  transform: none !important;
  opacity: 1 !important;
}

.database-table .text-center {
  text-align: center;
}

.database-table .text-center .article-info {
  align-items: center;
}

/* Specific Column Styles */
.database-table th:nth-child(1),
.database-table td:nth-child(1) {
  width: 15px;
  min-width: 15px;
  max-width: 15px;
  text-align: center;
  position: sticky;
  padding: 0 !important; /* Entfernt jegliches Padding für kompakte Darstellung */
  left: 0;
  background: white;
  border-right: 1px solid var(--border-color);
  z-index: 5;
}

.database-table th:nth-child(1) {
  z-index: 15;
  background: #f8f9fa;
}

.running-number {
  font-size: 11px;
  color: var(--text-light);
}

.database-table td:nth-child(1):hover {
  background: rgba(211, 47, 47, 0.05);
  cursor: pointer;
  color: var(--primary-color);
}

.database-table tr.selected td:nth-child(1):hover {
  background: rgba(211, 47, 47, 0.15);
}

.database-table td:nth-child(1):hover .running-number {
  color: var(--primary-color);
  font-weight: 600;
}

.database-table tr.selected td:nth-child(1):hover .running-number {
  color: white;
}

/* Column Headers */
.column-header {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  gap: 1px;
}

.column-header-small {
  font-size: 11px;
  color: var(--header-small-color);
  font-weight: normal;
  display: block;
  margin-bottom: 2px;
}

.database-table th .column-header .column-header-small {
  font-size: 11px !important;
  color: var(--header-small-color) !important;
  font-weight: normal !important;
  display: block !important;
  margin-bottom: 2px !important;
}

/* Actions Column */
.actions-container {
  display: flex;
  gap: 4px;
  justify-content: center;
  align-items: center;
}

.edit-article-button,
.delete-article-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-normal), opacity 0.3s ease, visibility 0.3s ease !important; /* Sanfte Transition für Ein-/Ausblenden */
}

.edit-article-button svg,
.delete-article-button svg {
  width: 16px;
  height: 16px;
  fill: var(--text-light);
}

.actions-cell {
  width: 80px;
  text-align: center;
  white-space: nowrap;
  padding: 4px 8px;
  overflow: visible !important; /* Ermöglicht, dass Tooltip über die Spalte hinausragen kann */
  position: relative !important; /* Für absolute Positionierung des Tooltips */
}

/* Article Info */
.article-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.2;
}

.manufacturer,
.designation {
  font-size: 11px;
  color: var(--text-color);
}

.designation {
  font-weight: 500;
}

/* Table Row States */
.clickable-row {
  cursor: pointer;
}

.clickable-row:hover {
  background: rgba(0, 0, 0, 0.02);
}

.database-table tr.clickable-row:hover td {
  background: rgba(0, 0, 0, 0.02);
}

/* Out of Stock Styling - Moderne visuelle Ausgrauung für Artikel ohne Bestand */
.database-table tr.out-of-stock {
  position: relative;
  opacity: 0.6;
  background: linear-gradient(135deg, rgba(220, 220, 220, 0.08), rgba(200, 200, 200, 0.12)) !important;
  color: #999 !important;
  border-left: 3px solid rgba(229, 115, 115, 0.3);
  transition: opacity 0.2s ease, background 0.2s ease, transform 0.2s ease;
  will-change: opacity, background, transform;
}

.database-table tr.out-of-stock td {
  color: #999 !important;
  background: transparent !important;
  text-decoration: none;
  position: relative;
}

/* Subtiler Durchstrich-Effekt nur für die Artikelbezeichnung */
.database-table tr.out-of-stock .designation {
  text-decoration: line-through;
  text-decoration-color: rgba(229, 115, 115, 0.4);
  text-decoration-thickness: 1px;
  position: relative;
}

/* Alternative: Kleiner Text-Indikator in der Bezeichnung */
.database-table tr.out-of-stock .designation::after {
  content: " (kein Bestand)";
  font-size: 9px;
  color: rgba(229, 115, 115, 0.6);
  font-weight: normal;
  font-style: italic;
}

/* Moderner Hover-Effekt */
.database-table tr.out-of-stock:hover {
  opacity: 0.8;
  background: linear-gradient(135deg, rgba(229, 115, 115, 0.08), rgba(229, 115, 115, 0.12)) !important;
  border-left-color: rgba(229, 115, 115, 0.5);
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.database-table tr.out-of-stock:hover td {
  color: #777 !important;
}

/* Entfernt: Emoji-Indikator wurde durch Text-Indikator in der Bezeichnung ersetzt */

/* Dark Mode - Elegantere Ausgrauung */
.dark-mode .database-table tr.out-of-stock {
  opacity: 0.5;
  background: linear-gradient(135deg, rgba(80, 80, 80, 0.15), rgba(100, 100, 100, 0.08)) !important;
  color: #666 !important;
  border-left-color: rgba(229, 115, 115, 0.4);
}

.dark-mode .database-table tr.out-of-stock td {
  color: #666 !important;
}

.dark-mode .database-table tr.out-of-stock .designation {
  text-decoration-color: rgba(229, 115, 115, 0.3);
}

.dark-mode .database-table tr.out-of-stock:hover {
  opacity: 0.7;
  background: linear-gradient(135deg, rgba(229, 115, 115, 0.12), rgba(229, 115, 115, 0.08)) !important;
  border-left-color: rgba(229, 115, 115, 0.6);
}

.dark-mode .database-table tr.out-of-stock:hover td {
  color: #888 !important;
}

/* Out-of-Stock Text in der Statusanzeige - einfacher Text ohne Styling */
.out-of-stock-badge {
  /* Kein zusätzliches Styling - erbt die gleiche Farbe und Schrift wie der Rest */
}

/* Responsive Anpassung für kleinere Bildschirme */
@media (max-width: 1200px) {
  .database-table tr.out-of-stock:hover {
    transform: none; /* Kein Transform auf mobilen Geräten */
  }
  
  /* Text-Indikator auf mobilen Geräten verkürzen */
  .database-table tr.out-of-stock .designation::after {
    content: " (0)"; /* Verkürzte Version für "kein Bestand" */
  }
  
  /* Kein zusätzliches Styling für Badge benötigt */
}

/* Gelbe Hervorhebung für bereits ausgewählte Artikel - MITTLERE Priorität */
.database-table tr.selected:not(.active-row) {
  background: rgba(255, 255, 0, 0.3) !important;
}

.database-table tr.selected:not(.active-row):hover {
  background: rgba(255, 255, 0, 0.4) !important;
}

.database-table tr.selected-row:not(.active-row) {
  background: rgba(255, 255, 0, 0.25) !important;
}

.database-table tr.selected-row:not(.active-row):hover {
  background: rgba(255, 255, 0, 0.35) !important;
}

/* Bessere Textlesbarkeit auf gelben Hintergründen - ALLE Textelemente */
.database-table tr.selected:not(.active-row) .column-header-small,
.database-table tr.selected-row:not(.active-row) .column-header-small,
.database-table tr.selected:not(.active-row) td,
.database-table tr.selected-row:not(.active-row) td {
  color: #000 !important; /* Schwarz für optimalen Kontrast auf Gelb */
  font-weight: 500; /* Etwas fetter für bessere Lesbarkeit */
}

.database-table tr.selected:not(.active-row):hover .column-header-small,
.database-table tr.selected-row:not(.active-row):hover .column-header-small,
.database-table tr.selected:not(.active-row):hover td,
.database-table tr.selected-row:not(.active-row):hover td {
  color: #000 !important; /* Schwarz bleibt beim Hover */
  font-weight: 600; /* Noch fetter beim Hover */
}

/* Out-of-Stock Artikel die ausgewählt sind - Kombinierter Effekt */
.database-table tr.out-of-stock.selected:not(.active-row) {
  background: linear-gradient(135deg, rgba(255, 255, 0, 0.2), rgba(229, 115, 115, 0.15)) !important;
  border-left-color: rgba(255, 150, 0, 0.6);
}

.database-table tr.out-of-stock.selected:not(.active-row):hover {
  background: linear-gradient(135deg, rgba(255, 255, 0, 0.3), rgba(229, 115, 115, 0.2)) !important;
}

/* Aktive Zeile (entspricht dem aktiven Thumbnail) - HÖCHSTE Priorität */
.database-table tr.active-row {
  background: rgba(211, 47, 47, 0.15) !important;
  border: 2px dashed #ffd700 !important;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
  position: relative;
  z-index: 1; /* Niedriger als Header (z-index: 10), damit Zeile unter Header bleibt */
}

.database-table tr.active-row:hover {
  background: rgba(211, 47, 47, 0.2) !important;
}

/* Bessere Textlesbarkeit auf roten Hintergründen */
.database-table tr.active-row .column-header-small {
  color: #222 !important; /* Dunkler Text für besseren Kontrast auf Rot */
}

.database-table tr.active-row:hover .column-header-small {
  color: #000 !important; /* Schwarzer Text beim Hover */
}

/* Out-of-Stock Artikel die aktiv sind - Kombinierter Effekt */
.database-table tr.out-of-stock.active-row {
  background: linear-gradient(135deg, rgba(211, 47, 47, 0.1), rgba(229, 115, 115, 0.15)) !important;
  border: 2px dashed #ffd700 !important;
  border-left: 3px solid rgba(229, 115, 115, 0.8) !important;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.4), 0 0 4px rgba(229, 115, 115, 0.3);
}

.database-table tr.out-of-stock.active-row:hover {
  background: linear-gradient(135deg, rgba(211, 47, 47, 0.15), rgba(229, 115, 115, 0.2)) !important;
}

/* ===============================================
   ACTIVE ROW (THUMBNAIL) DARK MODE STYLES
   ===============================================
   
   Diese Styles wurden in die zentrale dark-mode.css
   verschoben für bessere Wartbarkeit und Konsistenz.
   
   Siehe: public/css/dark-mode.css
   =============================================== */

/* Pagination */
.database-pagination {
  flex-shrink: 0;
  padding-top: 4px; /* 🔧 REDUZIERT: Kompakterer Abstand */
  padding-bottom: 4px; /* 🔧 NEU: Minimaler Abstand nach unten */
  margin-top: 4px; /* 🔧 REDUZIERT: Kleinerer Abstand zur Tabelle */
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-sm);
  min-height: 32px; /* 🔧 NEU: Mindesthöhe für Sichtbarkeit */
}

.database-pagination button {
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  background: white;
  color: var(--text-color);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  font-size: 12px;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  gap: 4px;
}

.database-pagination button:hover:not(:disabled) {
  background: var(--secondary-color);
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

.database-pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.database-pagination button svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.database-pagination button.button-flash {
  animation: buttonFlash 0.6s ease-in-out;
}

.database-pagination button.button-flash svg {
  animation: buttonFlash 0.6s ease-in-out;
}

@keyframes buttonFlash {
  0% {
    background: white;
    transform: scale(1);
  }
  50% {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
  }
  100% {
    background: white;
    color: var(--text-color);
    transform: scale(1);
  }
}

.database-pagination span {
  font-size: 12px;
  color: var(--text-light);
  text-align: center;
}

/* ===============================================
   DARK MODE DATABASE STYLES
   =============================================== */

/* ===============================================
   DATABASE UI DARK MODE STYLES
   ===============================================
   
   Diese Styles wurden in die zentrale dark-mode.css
   verschoben für bessere Wartbarkeit und Konsistenz.
   
   Siehe: public/css/dark-mode.css
   =============================================== */

body.dark-mode .department-filter-button.altware-button:hover {
  background-color: #555;
  border-color: #777;
}

body.dark-mode .department-filter-button.altware-button.active {
  background-color: #ff6b6b;
  border-color: #ff6b6b;
  color: white !important;
}

body.dark-mode .department-filter-button.altware-button.active:hover {
  background-color: #ff5252;
  border-color: #ff5252;
}

body.dark-mode .database-status-mini {
  color: #aaa;
}

/* Dark Mode für Sort-Reset-Button - identisch zum Filter-Reset-Button */
body.dark-mode .database-table .sort-reset-button {
  background: #4a5d4a !important; /* Gleiches Pastellgrün wie Filter-Reset */
  color: #a8d4a8 !important; /* Gleiche Text-Farbe wie Filter-Reset */
  box-shadow: none !important;
  border: none !important;
  border-bottom: none !important;
  border-top: none !important;
  position: absolute !important; /* Absolute Positionierung für komplette Füllung */
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important; /* Füllt komplette Zellenbreite */
  height: 100% !important; /* Füllt komplette Zellenhöhe */
  display: flex !important; /* Flex für bessere Textzentrierung */
  align-items: center !important; /* Vertikal zentrieren */
  justify-content: center !important; /* Horizontal zentrieren */
  overflow: hidden !important;
  text-shadow: none !important; /* Keine Text-Schatten im Dark Mode */
  text-decoration: none !important; /* Keine Textdekoration im Dark Mode */
}

body.dark-mode .database-table .sort-reset-button:hover:not(:disabled) {
  background: #5a6d5a !important; /* Gleiches Hover-Grün wie Filter-Reset */
  box-shadow: none !important;
  border: none !important;
  border-color: transparent !important;
  text-shadow: none !important; /* Auch beim Hover keine Text-Schatten */
  text-decoration: none !important;
}

body.dark-mode .database-table .sort-reset-button:active {
  background: #6a7d6a !important; /* Gleiches Active-Grün wie Filter-Reset */
  box-shadow: none !important;
  border: none !important;
  text-shadow: none !important; /* Auch beim Klick keine Text-Schatten */
  text-decoration: none !important;
}

body.dark-mode .database-table .sort-reset-button::before,
body.dark-mode .database-table .sort-reset-button::after {
  display: none !important; /* Alle Pseudo-Elemente im Dark Mode deaktivieren */
  content: none !important;
  background: transparent !important;
}

body.dark-mode .database-table .sort-reset-button.processing {
  opacity: 0.5 !important;
}

body.dark-mode .database-table .sort-reset-button:disabled {
  opacity: 0.5 !important;
}

/* Dark Mode für Reset-Button */
body.dark-mode .filters-reset-button {
  background: #4a5d4a; /* Dunkleres Pastellgrün */
  border-color: #5a6d5a;
  color: #a8d4a8;
}

body.dark-mode .filters-reset-button:hover {
  background: #5a6d5a;
  border-color: #6a7d6a;
}

body.dark-mode .filters-reset-button:active {
  background: #6a7d6a;
}

body.dark-mode .filters-reset-button::after {
  background: rgba(168, 212, 168, 0.3);
}

body.dark-mode .filters-reset-button.processing {
  opacity: 0.5;
}

body.dark-mode .filters-reset-button:disabled {
  opacity: 0.5 !important;
}

/* Database Table Dark Mode */
body.dark-mode .database-table-container {
  border-color: #555;
}

body.dark-mode .database-table th {
  background-color: #333;
  color: #eee;
  border-bottom-color: #555;
}

body.dark-mode .database-table td {
  color: #eee;
  border-bottom-color: #444;
}

body.dark-mode .database-table tr:hover {
  background-color: #3a3a3a;
}

body.dark-mode .database-table th:nth-child(1),
body.dark-mode .database-table td:nth-child(1) {
  width: 15px;
  min-width: 15px;
  max-width: 15px;
  background-color: #333;
  border-right-color: #555;
  padding: 0 !important;
}

body.dark-mode .database-table th:nth-child(1) {
  background-color: #333;
  width: 15px !important;
  min-width: 15px !important;
  max-width: 15px !important;
  padding: 0 !important;
  border-bottom: none !important; /* Entfernt unteren Border im Dark Mode */
  border-top: none !important; /* Entfernt oberen Border im Dark Mode */
}

body.dark-mode .database-table td:nth-child(1):hover {
  background-color: rgba(229, 115, 115, 0.1);
  color: #ff6b6b;
}

body.dark-mode .database-table tr.selected td:nth-child(1):hover {
  background-color: rgba(229, 115, 115, 0.2);
}

body.dark-mode .database-table td:nth-child(1):hover .running-number {
  color: #ff6b6b;
}

body.dark-mode .database-table tr.selected td:nth-child(1):hover .running-number {
  color: white;
}

body.dark-mode .column-header-small,
body.dark-mode .database-table th .column-header .column-header-small {
  color: #999 !important;
}

/* Dark Mode - Gelbe Hervorhebung für Altware-Artikel */
body.dark-mode .database-table tr.selected:not(.active-row) {
  background-color: rgba(255, 255, 136, 0.2);
}

body.dark-mode .database-table tr.selected:not(.active-row):hover {
  background-color: rgba(255, 255, 136, 0.3);
}

/* ✨ NEU: Minimalistische Suchtreffer mit dynamischer Breitenanpassung */
.recognized-articles {
  margin: 6px 0;
  font-size: 13px;
  max-height: 120px; /* Kompakte Höhe */
  overflow-y: auto; /* Nur vertikales Scrollen */
  overflow-x: hidden; /* Kein horizontales Scrollen */
  width: 100%; /* Volle Breite nutzen */
}

.recognized-articles-label {
  color: #666;
  font-weight: 500;
  margin-bottom: 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  position: sticky;
  top: 0;
  /* Kein Background - transparent */
  z-index: 10;
  padding: 2px 0;
}

.recognized-articles-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  line-height: 1.4;
  padding-bottom: 4px;
  width: 100%; /* Volle verfügbare Breite */
  box-sizing: border-box; /* Padding wird in die Breite eingerechnet */
  word-break: break-word; /* Lange Begriffe umbrechen falls nötig */
}

/* ✨ NEU: Suchstatus-Historie (grün/rot je nach Erfolg) */
.search-status-history {
  margin: 8px 0;
  display: none; /* Wird per JS auf 'flex' gesetzt wenn Einträge vorhanden */
  flex-wrap: wrap; /* Umbrechen wenn nötig */
  gap: 6px; /* Abstand zwischen Einträgen */
  align-items: center;
}

.search-status-entry {
  display: inline-flex; /* Inline-Flex für nebeneinander */
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  transition: all 0.2s ease;
  white-space: nowrap; /* Verhindert Umbruch innerhalb eines Eintrags */
  flex-shrink: 0; /* Verhindert Shrinking */
}

.search-status-entry.search-status-success {
  background-color: #e8f5e8;
  color: #2e5d2e;
  border-left: 3px solid #4caf50;
}

.search-status-entry.search-status-error {
  background-color: #ffebee;
  color: #c62828;
  border-left: 3px solid #f44336;
}

.search-status-icon {
  font-weight: bold;
  font-size: 13px;
  flex-shrink: 0;
  line-height: 1;
}

.search-status-term {
  font-weight: 500;
  flex-shrink: 0;
  max-width: 200px; /* Max Breite für sehr lange Begriffe */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Gelbe Lichtschlange: Punkt startet oben, zieht Linie um Rahmen, dann Aufblitzen */
.search-status-entry.search-status-blink {
  position: relative;
  z-index: 1;
  border-radius: 4px;
  overflow: visible;
}

.search-status-entry.search-status-blink::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-radius: 4px;
  z-index: -1;
  animation: border-flash 0.3s ease-out forwards;
  opacity: 0;
}

/* SVG für die Lichtschlange */
.search-status-entry .snake-border-svg {
  overflow: visible;
}

.search-status-entry .snake-border-svg path {
  transition: stroke-dashoffset 0.8s linear, opacity 0.3s ease-out;
}

@keyframes border-flash {
  0% {
    opacity: 0;
    border-color: transparent;
    box-shadow: 0 0 0 0 rgba(255, 235, 59, 0);
  }
  50% {
    opacity: 1;
    border-color: #ffeb3b;
    box-shadow: 0 0 12px 3px rgba(255, 235, 59, 0.8), inset 0 0 8px rgba(255, 235, 59, 0.3);
  }
  100% {
    opacity: 0;
    border-color: transparent;
    box-shadow: 0 0 0 0 rgba(255, 235, 59, 0);
  }
}

body.dark-mode .search-status-entry.search-status-blink::after {
  border-color: #ffeb3b;
  box-shadow: 0 0 12px 3px rgba(255, 235, 59, 0.9), inset 0 0 8px rgba(255, 235, 59, 0.4);
}

/* Dark Mode Support für Suchstatus */
body.dark-mode .search-status-entry.search-status-success {
  background-color: rgba(76, 175, 80, 0.15);
  color: #81c784;
  border-left-color: #4caf50;
}

body.dark-mode .search-status-entry.search-status-error {
  background-color: rgba(244, 67, 54, 0.15);
  color: #e57373;
  border-left-color: #f44336;
}

/* Highlight für automatisch ausgewählte Zeile */
.database-table tr.search-highlight {
  background-color: rgba(255, 235, 59, 0.3) !important;
  transition: background-color 0.3s ease;
}

body.dark-mode .database-table tr.search-highlight {
  background-color: rgba(255, 235, 59, 0.2) !important;
}

.recognized-article-item {
  background: #e8f5e8;
  color: #2e5d2e;
  border: 1px solid #c8e6c9;
  padding: 4px 8px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  text-shadow: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  flex-shrink: 0; /* Chips behalten ihre Mindestgröße */
  max-width: 100%; /* Aber nie breiter als der Container */
  word-break: break-all; /* Sehr lange EANs/ArtNr können umgebrochen werden */
  min-width: 0; /* Ermöglicht Flexbox-Shrinking */
}

.recognized-article-item:hover {
  background: #d4edda;
  border-color: #a8d4a8;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.recognized-article-item:active {
  transform: translateY(0);
}

/* ✨ TOOLTIP PORTAL SYSTEM - Keine CSS-Tooltips mehr nötig */
/* Alle Tooltips werden jetzt via JavaScript-Portal im Body erstellt */

/* ✨ NEU: Out-of-Stock Styling für Chips (ausgrauen) */
.recognized-article-item.out-of-stock {
  opacity: 0.5;
  background: #f0f5f0 !important;
  color: #6b8a6b !important;
  border-color: #c8e6c9 !important;
}

.recognized-article-item.out-of-stock:hover {
  opacity: 0.7; /* Beim Hover etwas weniger transparent */
  background: #e8f0e8 !important;
  border-color: #a8d4a8 !important;
  transform: translateY(-1px);
}


/* Slide-down Animation */
@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
  }
  to {
    opacity: 1;
    max-height: 100px;
    padding-top: 8px;
    padding-bottom: 8px;
  }
}

body.dark-mode .database-table tr.selected-row:not(.active-row) {
  background-color: rgba(255, 255, 136, 0.15);
}

body.dark-mode .database-table tr.selected-row:not(.active-row):hover {
  background-color: rgba(255, 255, 136, 0.25);
}

body.dark-mode .database-table tr.clickable-row:hover {
  background-color: #3a3a3a;
}

body.dark-mode .database-table tr.clickable-row:hover td {
  background-color: #3a3a3a;
}

/* Actions Dark Mode */
body.dark-mode .edit-article-button:hover {
  background-color: rgba(229, 115, 115, 0.2);
}

body.dark-mode .delete-article-button:hover {
  background-color: rgba(229, 115, 115, 0.2);
}

body.dark-mode .edit-article-button svg,
body.dark-mode .delete-article-button svg {
  fill: #aaa;
}

body.dark-mode .edit-article-button:hover svg,
body.dark-mode .delete-article-button:hover svg {
  fill: #ff6b6b;
}

/* Pagination Dark Mode */
body.dark-mode .database-pagination button {
  background-color: #444;
  border-color: #555;
  color: #eee;
}

body.dark-mode .database-pagination button:hover:not(:disabled) {
  background-color: #555;
  border-color: #ff6b6b;
}

body.dark-mode .database-pagination button svg {
  fill: #eee;
}

body.dark-mode .database-pagination span {
  color: #aaa;
  text-align: center;
}

/* ===============================================
   BESTANDSFILTER (OUT-OF-STOCK TOGGLE)
   =============================================== */

/* Out-of-Stock Filter Button in der Datenbank-Ansicht */
.department-filter-button.outofstock-button {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 2px solid #28a745;
  color: #28a745;
  font-weight: 600;
  transition: all 0.3s ease;
}

.department-filter-button.outofstock-button:hover {
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.department-filter-button.outofstock-button.active {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border-color: #007bff;
  color: #007bff;
}

/* Verschiedene Zustände für Out-of-Stock Button */
.department-filter-button.outofstock-button[data-state="with-stock"] {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border-color: #007bff;
  color: #007bff;
}

.department-filter-button.outofstock-button[data-state="without-stock"] {
  background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
  border-color: #dc3545;
  color: #dc3545;
}

/* Dark Mode für Out-of-Stock Button */
body.dark-mode .department-filter-button.outofstock-button {
  background: linear-gradient(135deg, #2e2e2e 0%, #404040 100%);
  border-color: #4caf50;
  color: #4caf50;
}

body.dark-mode .department-filter-button.outofstock-button:hover {
  background: linear-gradient(135deg, #404040 0%, #505050 100%);
}

body.dark-mode .department-filter-button.outofstock-button.active {
  background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
  border-color: #2196f3;
  color: #2196f3;
}

body.dark-mode .department-filter-button.outofstock-button[data-state="with-stock"] {
  background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
  border-color: #2196f3;
  color: #2196f3;
}

body.dark-mode .department-filter-button.outofstock-button[data-state="without-stock"] {
  background: linear-gradient(135deg, #5f1e1e 0%, #822c2c 100%);
  border-color: #f44336;
  color: #f44336;
}

.stock-filter-container {
  padding: 10px 0;
}

.stock-filter-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: white;
  color: var(--text-color);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  min-height: 48px;
}

.stock-filter-button:hover {
  background: var(--secondary-color);
  border-color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.stock-filter-button .filter-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.stock-filter-button .filter-text {
  flex: 1;
  text-align: center;
  font-weight: 600;
}

.stock-filter-button .filter-count {
  background: var(--primary-color);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}

/* Verschiedene Button-Zustände */
.stock-filter-button.show-all {
  border-color: #28a745;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.stock-filter-button.show-all .filter-icon {
  color: #28a745;
}

.stock-filter-button.show-with-stock {
  border-color: #007bff;
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.stock-filter-button.show-with-stock .filter-icon {
  color: #007bff;
}

.stock-filter-button.show-without-stock {
  border-color: #dc3545;
  background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
}

.stock-filter-button.show-without-stock .filter-icon {
  color: #dc3545;
}

/* Dark Mode für Bestandsfilter */
body.dark-mode .stock-filter-button {
  background: #444;
  border-color: #555;
  color: #eee;
}

body.dark-mode .stock-filter-button:hover {
  background: #555;
  border-color: #ff6b6b;
}

body.dark-mode .stock-filter-button.show-all {
  border-color: #4caf50;
  background: linear-gradient(135deg, #2e2e2e 0%, #404040 100%);
}

body.dark-mode .stock-filter-button.show-with-stock {
  border-color: #2196f3;
  background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
}

body.dark-mode .stock-filter-button.show-without-stock {
  border-color: #f44336;
  background: linear-gradient(135deg, #5f1e1e 0%, #822c2c 100%);
} 

/* ========================================
   SOFT-DELETE STYLES
   ======================================== */

.deleted-row {
  opacity: 0.6;
  background-color: #f8f9fa;
  position: relative;
}

.deleted-row::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #dc3545;
  z-index: 1;
}

.deleted-row td {
  color: #6c757d;
}

.deleted-badge {
  background: #dc3545;
  color: white;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 10px;
  margin-left: 8px;
  display: inline-block;
}

.restore-btn {
  background: #28a745 !important;
  color: white !important;
  border: 1px solid #28a745 !important;
}

.restore-btn:hover {
  background: #218838 !important;
  border-color: #218838 !important;
}

.delete-btn {
  background: #dc3545 !important;
  color: white !important;
  border: 1px solid #dc3545 !important;
}

.delete-btn:hover {
  background: #c82333 !important;
  border-color: #c82333 !important;
}

.soft-delete-filter {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 15px;
}

.soft-delete-filter .filter-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 500;
  color: #856404;
}

.soft-delete-filter .filter-checkbox {
  width: 16px;
  height: 16px;
  accent-color: #ffc107;
}

.soft-delete-filter .filter-text {
  font-size: 0.9rem;
}

/* Dark Mode Anpassungen für Soft-Delete */
[data-theme="dark"] .deleted-row {
  background-color: #2d3748;
  opacity: 0.7;
}

[data-theme="dark"] .deleted-row td {
  color: #a0aec0;
}

[data-theme="dark"] .deleted-row::before {
  background: #e53e3e;
}

[data-theme="dark"] .soft-delete-filter {
  background: #2d3748;
  border-color: #4a5568;
}

[data-theme="dark"] .soft-delete-filter .filter-label {
  color: #e2e8f0;
}

/* ========================================
   ACTION BUTTONS VERBESSERUNGEN
   ======================================== */

.action-buttons {
  display: flex;
  gap: 4px;
  justify-content: center;
}

.action-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.action-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.action-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.edit-btn {
  background: #007bff !important;
  color: white !important;
}

.edit-btn:hover {
  background: #0056b3 !important;
}

/* =====================================================
   SOFT-DELETE UI STYLES
   ===================================================== */

/* ==== SOFT-DELETE CONTROLS: LESBARKEIT LIGHT & DARK MODE ==== */
.soft-delete-controls {
  background: #f8f9fa;
  border: 1.5px solid #d1d5db;
  color: #222;
}
.soft-delete-checkbox {
  color: #222;
}
.soft-delete-stats, .stats-label, .stats-value {
  color: #222;
}

/* DARK MODE Anpassungen */
body.dark-mode .soft-delete-controls {
  background: #23272e;
  border: 1.5px solid #444c56;
  color: #f3f6fa;
}
body.dark-mode .soft-delete-checkbox {
  color: #f3f6fa;
}
body.dark-mode .soft-delete-stats, 
body.dark-mode .stats-label, 
body.dark-mode .stats-value {
  color: #f3f6fa;
}
body.dark-mode .soft-delete-checkbox .checkmark {
  background: #23272e;
  border: 2px solid #555;
}
body.dark-mode .soft-delete-checkbox input[type="checkbox"]:checked + .checkmark {
  background: #ff6b6b;
  border-color: #ff6b6b;
}
body.dark-mode .soft-delete-checkbox input[type="checkbox"]:checked + .checkmark::after {
  color: #fff;
}

/* Soft-Delete Controls */
.soft-delete-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  gap: 16px;
}

.soft-delete-toggle {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.soft-delete-checkbox {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  font-weight: 500;
  color: #495057;
}

.soft-delete-checkbox input[type="checkbox"] {
  display: none;
}

.soft-delete-checkbox .checkmark {
  width: 20px;
  height: 20px;
  background: #fff;
  border: 2px solid #dee2e6;
  border-radius: 4px;
  margin-right: 8px;
  position: relative;
  transition: all 0.2s ease;
}

.soft-delete-checkbox input[type="checkbox"]:checked + .checkmark {
  background: #007bff;
  border-color: #007bff;
}

.soft-delete-checkbox input[type="checkbox"]:checked + .checkmark::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.soft-delete-checkbox:hover .checkmark {
  border-color: #007bff;
}

.soft-delete-stats {
  display: flex;
  gap: 16px;
  font-size: 13px;
}

.stats-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.stats-label {
  color: #6c757d;
  font-weight: 500;
}

.stats-value {
  font-weight: 600;
  color: #495057;
}

/* Gelöschte Artikel Styles */
.database-table tr.deleted {
  /* Keine speziellen Styles - identisch zu normalen Artikeln */
}

.database-table tr.deleted td {
  /* Keine speziellen Styles - identisch zu normalen Artikeln */
}

/* Gelöschte Artikel: Roter Hintergrund für gesamte Zeile */
.database-table tr.deleted {
  background: rgba(220, 53, 69, 0.1) !important;
}

/* Laufnummer bei gelöschten Artikeln: Roter Hintergrund */
.database-table tr.deleted td:nth-child(1) {
  background: rgba(220, 53, 69, 0.1) !important;
}

/* Dark Mode: Laufnummer bei gelöschten Artikeln: Roter Hintergrund */
body.dark-mode .database-table tr.deleted td:nth-child(1) {
  background: rgba(220, 53, 69, 0.15) !important;
}

/* Zusätzliche Styles für .deleted Klasse (ohne database-table tr) */
tr.deleted {
  /* Keine speziellen Styles - identisch zu normalen Artikeln */
}

tr.deleted td {
  /* Keine speziellen Styles - identisch zu normalen Artikeln */
}

.database-table tr.deleted .article-deleted-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #dc3545;
  color: white;
  padding: 2px 6px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.database-table tr.deleted .article-deleted-badge svg {
  width: 12px;
  height: 12px;
}

/* Soft-Delete Action Buttons */
.soft-delete-actions {
  display: flex;
  gap: 4px;
  justify-content: center;
}

.btn-restore {
  background: #28a745;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: background-color 0.2s ease;
}

.btn-restore:hover {
  background: #218838;
}

.btn-restore svg {
  width: 12px;
  height: 12px;
}

.btn-delete-permanent {
  background: #dc3545;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: background-color 0.2s ease;
}

.btn-delete-permanent:hover {
  background: #c82333;
}

.btn-delete-permanent svg {
  width: 12px;
  height: 12px;
}

/* Soft-Delete Button für aktive Artikel */
.btn-soft-delete {
  background: #6c757d;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: background-color 0.2s ease;
}

.btn-soft-delete:hover {
  background: #5a6268;
}

.btn-soft-delete svg {
  width: 12px;
  height: 12px;
}

/* Artikel-Aktionen Container */
.article-actions {
  display: flex;
  gap: 4px;
  justify-content: center;
}

/* Soft-Delete Status Indicator */
.soft-delete-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-active {
  color: #28a745;
}

.status-deleted {
  color: #dc3545;
}

/* Responsive Design für Soft-Delete */
@media (max-width: 768px) {
  .soft-delete-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .soft-delete-stats {
    justify-content: space-between;
  }
  
  .soft-delete-actions {
    flex-direction: column;
    gap: 2px;
  }
  
  .btn-restore,
  .btn-delete-permanent {
    font-size: 10px;
    padding: 3px 6px;
  }
} 

/* ========================================
   RESPONSIVE SOFT-DELETE
   ======================================== */

@media (max-width: 768px) {
  .deleted-badge {
    font-size: 8px;
    padding: 1px 4px;
    margin-left: 4px;
  }
  
  .action-btn {
    width: 24px;
    height: 24px;
  }
  
  .action-btn svg {
    width: 14px;
    height: 14px;
  }
  
  .soft-delete-filter {
    padding: 8px;
    margin-bottom: 10px;
  }
} 

#databaseStatus, .database-status-mini {
  margin: 2px 0 6px 0 !important; /* Angemessener Abstand zur Tabelle */
  padding: 0 !important;
  line-height: 1 !important;
  min-height: 0 !important;
  height: auto !important;
  display: flex !important;
  align-items: flex-start !important;
  box-sizing: border-box !important;
}

/* Dark Mode Styles für gelöschte Artikel */
body.dark-mode tr.deleted {
  /* Keine speziellen Styles - identisch zu normalen Artikeln */
}

body.dark-mode tr.deleted td {
  /* Keine speziellen Styles - identisch zu normalen Artikeln */
}

body.dark-mode .database-table tr.deleted {
  /* Keine speziellen Styles - identisch zu normalen Artikeln */
}

body.dark-mode .database-table tr.deleted td {
  /* Keine speziellen Styles - identisch zu normalen Artikeln */
}

/* Dark Mode: Gelöschte Artikel: Roter Hintergrund für gesamte Zeile */
body.dark-mode tr.deleted {
  background: rgba(220, 53, 69, 0.15) !important;
}

/* Dark Mode: Gelöschte Artikel verwenden normale Spaltenbreiten */
/* Dark Mode: Gelöschte Artikel verwenden normale Spaltenbreiten */

/* Optimierte Styles für gelöschte Artikel */
.deleted-info-compact {
  color: white !important;
  font-size: 10px !important;
  margin-top: 1px !important;
  font-style: italic !important;
  opacity: 0.9;
  line-height: 1.2;
}

body.dark-mode .deleted-info-compact {
  color: white !important;
}

/* Kompakte Soft-Delete Actions */
.soft-delete-actions-compact {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 32px;
}

.btn-restore-compact {
  background: #28a745 !important;
  color: white !important;
  border: none !important;
  padding: 4px !important;
  border-radius: 3px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background-color 0.2s;
  width: 28px;
  height: 28px;
}

.btn-restore-compact:hover {
  background: #218838 !important;
}

.btn-delete-permanent-compact {
  background: #dc3545 !important;
  color: white !important;
  border: none !important;
  padding: 4px !important;
  border-radius: 3px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background-color 0.2s;
  width: 28px;
  height: 28px;
}

.btn-delete-permanent-compact:hover {
  background: #c82333 !important;
}

/* Gelöschte Artikel verwenden normale Darstellung */

/* Gelöschte Artikel: Roter Hintergrund für gesamte Zeile */
tr.deleted {
  background: rgba(220, 53, 69, 0.1) !important;
}

/* Dark Mode: Keine speziellen Styles für gelöschte Artikel */

/* Gelöschte Artikel verwenden normale Spaltenbreiten */
/* Gelöschte Artikel verwenden normale Spaltenbreiten */ 

/* ===============================================
   LOCK BADGE STYLES - Für gesperrte Artikel
   =============================================== */

.lock-indicator {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 4px 6px;
  margin-top: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(4px);
  transition: all 0.2s ease;
}

.lock-indicator:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.lock-timer {
  font-size: 8px !important;
  font-weight: 600;
  text-align: center;
  margin-bottom: 2px !important;
  opacity: 0.9;
  color: #333;
  letter-spacing: 0.5px;
}

.lock-user {
  display: flex;
  align-items: center;
  gap: 3px;
  justify-content: center;
}

.lock-icon {
  color: #f39c12 !important;
  font-size: 11px !important;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.lock-name {
  font-size: 10px !important;
  font-weight: 600;
  color: #333;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

/* Dark Mode Styles für Lock-Badges */
body.dark-mode .lock-indicator {
  background: rgba(45, 45, 45, 0.95);
  border: 1px solid #555;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

body.dark-mode .lock-indicator:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  border-color: #666;
}

body.dark-mode .lock-timer {
  color: #2c3e50 !important;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
  font-weight: 700;
}

/* Höhere Spezifität für Dark Mode Timer */
body.dark-mode .lock-indicator .lock-timer {
  color: #2c3e50 !important;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
  font-weight: 700;
}

/* Maximale Spezifität für Dark Mode Timer in Datenbank-Tabelle */
body.dark-mode .database-table .lock-indicator .lock-timer {
  color: #2c3e50 !important;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
  font-weight: 700;
}

body.dark-mode .lock-icon {
  color: #ffd700 !important;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

body.dark-mode .lock-name {
  color: #2c3e50 !important;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
  font-weight: 700;
}

/* Höhere Spezifität für Dark Mode Benutzername */
body.dark-mode .lock-indicator .lock-name {
  color: #2c3e50 !important;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
  font-weight: 700;
}

/* Maximale Spezifität für Dark Mode Benutzername in Datenbank-Tabelle */
body.dark-mode .database-table .lock-indicator .lock-name {
  color: #2c3e50 !important;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
  font-weight: 700;
}

/* Timer-Farben für verschiedene Zustände */
.lock-timer.timer-critical {
  color: #e74c3c !important;
  font-weight: 700;
}

.lock-timer.timer-warning {
  color: #f39c12 !important;
  font-weight: 600;
}

.lock-timer.timer-normal {
  color: #27ae60 !important;
  font-weight: 600;
}

body.dark-mode .lock-timer.timer-critical {
  color: #2c3e50 !important;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
  font-weight: 700;
}

body.dark-mode .lock-timer.timer-warning {
  color: #2c3e50 !important;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
  font-weight: 700;
}

body.dark-mode .lock-timer.timer-normal {
  color: #2c3e50 !important;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
  font-weight: 700;
}

/* Höhere Spezifität für Dark Mode Timer-Zustände */
body.dark-mode .lock-indicator .lock-timer.timer-critical {
  color: #2c3e50 !important;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
  font-weight: 700;
}

body.dark-mode .lock-indicator .lock-timer.timer-warning {
  color: #2c3e50 !important;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
  font-weight: 700;
}

body.dark-mode .lock-indicator .lock-timer.timer-normal {
  color: #2c3e50 !important;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
  font-weight: 700;
}

/* Lock-Zeile Hervorhebung */
.database-table tr.locked-by-other {
  background: rgba(255, 193, 7, 0.05);
  border-left: 3px solid #f39c12;
}

body.dark-mode .database-table tr.locked-by-other {
  background: rgba(255, 193, 7, 0.1);
  border-left: 3px solid #ffd700;
}

.database-table tr.locked-by-other:hover {
  background: rgba(255, 193, 7, 0.1);
}

body.dark-mode .database-table tr.locked-by-other:hover {
  background: rgba(255, 193, 7, 0.15);
}

/* Admin & Debug Monitor Panel */
.admin-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.admin-panel .admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 2px solid #e9ecef;
  padding-bottom: 15px;
}

.admin-panel .admin-header h3 {
  margin: 0;
  color: #2c3e50;
  font-size: 1.5em;
}

.close-admin-btn {
  background: #dc3545;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.close-admin-btn:hover {
  background: #c82333;
  transform: scale(1.1);
}

.close-admin-btn svg {
  width: 20px;
  height: 20px;
  fill: white;
}

.admin-content {
  background: white;
  border-radius: 12px;
  padding: 30px;
  max-width: 1200px;
  max-height: 90vh;
  width: 100%;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stats-card {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
  transition: all 0.3s ease;
}

.stats-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.stats-card h4 {
  margin: 0 0 15px 0;
  color: #2c3e50;
  font-size: 1.2em;
  border-bottom: 2px solid #007bff;
  padding-bottom: 8px;
}

.quality-card h4 { border-bottom-color: #28a745; }
.trends-card h4 { border-bottom-color: #ffc107; }
.performance-card h4 { border-bottom-color: #17a2b8; }
.departments-card h4 { border-bottom-color: #6f42c1; }
.products-card h4 { border-bottom-color: #fd7e14; }

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #e9ecef;
}

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

.stat-label {
  color: #6c757d;
  font-weight: 500;
}

.stat-value {
  color: #2c3e50;
  font-weight: bold;
  background: #e9ecef;
  padding: 4px 8px;
  border-radius: 4px;
  min-width: 50px;
  text-align: center;
}

.trends-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.trend-section h5 {
  margin: 0 0 8px 0;
  color: #495057;
  font-size: 1em;
}

.trend-list {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 10px;
  min-height: 60px;
  max-height: 120px;
  overflow-y: auto;
}

.trend-item {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid #f8f9fa;
}

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

.department-list, .product-group-list {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 10px;
  max-height: 200px;
  overflow-y: auto;
}

.department-item, .product-group-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f8f9fa;
}

.department-item:last-child, .product-group-item:last-child {
  border-bottom: none;
}

.department-name, .product-group-name {
  font-weight: 500;
  color: #2c3e50;
}

.department-stats, .product-group-stats {
  color: #6c757d;
  font-size: 0.9em;
}

.admin-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.analytics-button, .admin-button {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.analytics-button:hover, .admin-button:hover {
  background: linear-gradient(135deg, #0056b3, #004085);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.analytics-button svg, .admin-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Dark Mode Styles */
body.dark-mode .admin-content {
  background: #2c3e50;
  color: #ecf0f1;
}

body.dark-mode .admin-panel .admin-header h3 {
  color: #ecf0f1;
}

body.dark-mode .admin-panel .admin-header {
  border-bottom-color: #34495e;
}

body.dark-mode .stats-card {
  background: #34495e;
  border-color: #4a5f7a;
  color: #ecf0f1;
}

body.dark-mode .stats-card h4 {
  color: #ecf0f1;
}

body.dark-mode .stat-label {
  color: #bdc3c7;
}

body.dark-mode .stat-value {
  background: #4a5f7a;
  color: #ecf0f1;
}

body.dark-mode .trend-list,
body.dark-mode .department-list,
body.dark-mode .product-group-list {
  background: #4a5f7a;
  border-color: #5a6f8a;
  color: #ecf0f1;
}

body.dark-mode .department-name,
body.dark-mode .product-group-name {
  color: #ecf0f1;
}

body.dark-mode .department-stats,
body.dark-mode .product-group-stats {
  color: #bdc3c7;
}

/* Responsive Design */
@media (max-width: 768px) {
  .admin-panel {
    padding: 10px;
  }
  
  .admin-content {
    padding: 20px;
    max-height: 95vh;
  }
  
  .admin-stats-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .trends-content {
    gap: 10px;
  }
} 

/* Price History Section */
.price-history-section {
  margin: 20px 0;
  padding: 20px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
}

.price-history-section h4 {
  margin: 0 0 15px 0;
  color: #2c3e50;
  font-size: 1.1em;
  border-bottom: 2px solid #007bff;
  padding-bottom: 8px;
}

.price-history-container {
  max-height: 300px;
  overflow-y: auto;
}

.price-history-loading {
  text-align: center;
  color: #6c757d;
  padding: 20px;
  font-style: italic;
}

.price-history-error {
  display: flex;
  align-items: center;
  color: #dc3545;
  background: #f8d7da;
  border: 1px solid #f1aeb5;
  border-radius: 4px;
  padding: 12px;
  margin: 10px 0;
}

.price-history-empty {
  text-align: center;
  color: #6c757d;
  padding: 20px;
}

.price-history-empty svg {
  display: block;
  margin: 0 auto 8px auto;
}

.price-history-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 15px;
  padding: 15px;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 6px;
}

.summary-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.summary-stat .stat-label {
  font-size: 0.85em;
  color: #6c757d;
  margin-bottom: 4px;
}

.summary-stat .stat-value {
  font-weight: bold;
  color: #2c3e50;
  font-size: 1.1em;
}

.summary-stat .stat-value.vk-neu {
  color: #28a745;
}

.price-history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.price-history-entry {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 15px;
  transition: all 0.3s ease;
}

.price-history-entry:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.price-history-entry.current {
  border-color: #007bff;
  background: linear-gradient(135deg, #f8f9ff, #ffffff);
}

.price-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.price-history-date {
  font-weight: bold;
  color: #2c3e50;
  font-size: 0.95em;
}

.price-history-source {
  background: #e9ecef;
  color: #495057;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: 500;
}

.price-history-entry.current .price-history-source {
  background: #007bff;
  color: white;
}

.price-history-prices {
  display: flex;
  gap: 15px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.price-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
}

.price-label {
  font-size: 0.8em;
  color: #6c757d;
  margin-bottom: 2px;
}

.price-value {
  font-weight: bold;
  color: #2c3e50;
  background: #f8f9fa;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.9em;
}

.price-item.vk-neu .price-value {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.price-history-user {
  font-size: 0.8em;
  color: #6c757d;
  text-align: right;
  font-style: italic;
}

/* Dark Mode Styles */
body.dark-mode .price-history-section {
  background: #34495e;
  border-color: #4a5f7a;
}

body.dark-mode .price-history-section h4 {
  color: #ecf0f1;
}

body.dark-mode .price-history-summary {
  background: #4a5f7a;
  border-color: #5a6f8a;
}

body.dark-mode .summary-stat .stat-label {
  color: #bdc3c7;
}

body.dark-mode .summary-stat .stat-value {
  color: #ecf0f1;
}

body.dark-mode .price-history-entry {
  background: #4a5f7a;
  border-color: #5a6f8a;
  color: #ecf0f1;
}

body.dark-mode .price-history-entry.current {
  border-color: #3498db;
  background: linear-gradient(135deg, #2c3e50, #34495e);
}

body.dark-mode .price-history-date {
  color: #ecf0f1;
}

body.dark-mode .price-history-source {
  background: #5a6f8a;
  color: #ecf0f1;
}

body.dark-mode .price-history-entry.current .price-history-source {
  background: #3498db;
  color: white;
}

body.dark-mode .price-label {
  color: #bdc3c7;
}

body.dark-mode .price-value {
  background: #5a6f8a;
  color: #ecf0f1;
}

body.dark-mode .price-item.vk-neu .price-value {
  background: #27ae60;
  color: white;
  border-color: #229954;
}

body.dark-mode .price-history-user {
  color: #bdc3c7;
}

body.dark-mode .price-history-error {
  background: #e74c3c;
  border-color: #c0392b;
  color: white;
}

body.dark-mode .price-history-empty {
  color: #bdc3c7;
}

/* Responsive Design */
@media (max-width: 768px) {
  .price-history-summary {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  
  .price-history-prices {
    flex-direction: column;
    gap: 8px;
  }
  
  .price-item {
    flex-direction: row;
    justify-content: space-between;
    min-width: auto;
    width: 100%;
  }
} 

/* ===== TOOLTIP SYSTEM FÜR ZEITANGABEN ===== */

/* Tooltip Container */
.time-tooltip {
  position: absolute;
  background: #1a252f;
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  z-index: 10000;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  border: 1px solid #34495e;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.time-tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

/* Tooltip Pfeil */
.time-tooltip::before {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #1a252f;
}

/* Dark Mode Anpassungen */
body.dark-mode .time-tooltip {
  background: #f8f9fa;
  color: #1a1a1a;
  border: 1px solid #dee2e6;
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.15);
}

body.dark-mode .time-tooltip::before {
  border-top-color: #f8f9fa;
  border-left-width: 8px;
  border-right-width: 8px;
  border-top-width: 8px;
}

/* Hover-Zustand für Zeitangaben */
.time-display {
  cursor: help;
  position: relative;
  display: inline-block;
}

.time-display:hover {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}

/* Responsive Tooltip */
@media (max-width: 768px) {
  .time-tooltip {
    font-size: 11px;
    padding: 6px 10px;
    max-width: 200px;
    white-space: normal;
    word-wrap: break-word;
  }
} 

/* ===== CUSTOM TOOLTIP FÜR ZEITANGABEN (JavaScript-generiert) ===== */

/* Tooltip Container */
.custom-tooltip {
  position: fixed;
  background: #1a252f;
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  z-index: 10000;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  border: 1px solid #34495e;
  pointer-events: none;
  opacity: 1;
  transform: translateY(-5px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Tooltip Pfeil */
.custom-tooltip::before {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #1a252f;
}

/* Dark Mode Anpassungen */
body.dark-mode .custom-tooltip {
  background: #f8f9fa;
  color: #1a1a1a;
  border: 1px solid #dee2e6;
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.15);
}

body.dark-mode .custom-tooltip::before {
  border-top-color: #f8f9fa;
  border-left-width: 8px;
  border-right-width: 8px;
  border-top-width: 8px;
}

/* Responsive Tooltip */
@media (max-width: 768px) {
  .custom-tooltip {
    font-size: 11px;
    padding: 6px 10px;
    max-width: 200px;
    white-space: normal;
    word-wrap: break-word;
  }
}

/* ===== EURO-TOOLTIP FÜR PROZENTSPALTE ===== */

/* Hover-Zustand für Prozentangaben mit Euro-Tooltip */
.percent-cell[data-euro-tooltip] {
  cursor: help;
  position: relative;
  transition: opacity 0.2s ease;
}

.percent-cell[data-euro-tooltip]:hover {
  opacity: 0.8;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}

/* ===== ALT-TEXT FORMATIERUNG ===== */

/* Rote Formatierung für Alt-Werte (wenn vorhanden) - VERBESSERTE LESBARKEIT */
.alt-text.has-alt {
  color: #ffffff;
  background-color: #c62828;
  border-radius: 4px;
  padding: 3px 6px;
  display: inline-block;
  width: fit-content;
  max-width: fit-content;
  font-weight: bold;
  opacity: 1 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.3px;
  border: 1px solid #8b0000;
}

/* Dark Mode für Alt-Text - Weißer Text auf dunkelrotem Hintergrund */
body.dark-mode .alt-text.has-alt {
  color: #ffffff;
  background-color: #b71c1c;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  border: 1px solid #7f0000;
  opacity: 1 !important;
}

/* ===== ALT-TEXT AUF MARKIERTEN ZEILEN (BESSERE LESBARKEIT) ===== */

/* GELBE MARKIERUNG (selected/selected-row) - Weißer Text auf schwarzem Hintergrund für MAXIMALEN Kontrast */
.database-table tr.selected:not(.active-row) .alt-text.has-alt,
.database-table tr.selected-row:not(.active-row) .alt-text.has-alt {
  color: #ffffff !important;
  background-color: #222222 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9) !important;
  border: 2px solid #000000;
  padding: 3px 6px !important;
}

/* ROTE MARKIERUNG (active-row) - Weißer Text auf dunklem Hintergrund für maximalen Kontrast */
.database-table tr.active-row .alt-text.has-alt {
  color: #ffffff !important;
  background-color: rgba(50, 0, 0, 0.9) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9) !important;
  border: 2px solid #ffffff;
  padding: 3px 6px !important;
}

/* Dark Mode: GELBE MARKIERUNG - Weißer Text auf schwarzem Hintergrund */
body.dark-mode .database-table tr.selected:not(.active-row) .alt-text.has-alt,
body.dark-mode .database-table tr.selected-row:not(.active-row) .alt-text.has-alt {
  color: #ffffff !important;
  background-color: #1a1a1a !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9) !important;
  border: 2px solid #444444;
  padding: 3px 6px !important;
}

/* Dark Mode: ROTE MARKIERUNG - Gelber Text auf dunklem Hintergrund */
body.dark-mode .database-table tr.active-row .alt-text.has-alt {
  color: #ffff00 !important;
  background-color: #1a0000 !important;
  text-shadow: 0 0 4px rgba(255, 255, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.9) !important;
  border: 2px solid #ffff00;
  padding: 3px 6px !important;
}

/* 🆕 GEÄNDERT-SPALTE: Rote Hinterlegung für alte Werte (ähnlich wie Alt-Spalte) */
.changed-text.has-old-changed {
  color: #ffffff;
  background-color: #c62828;
  border-radius: 4px;
  padding: 3px 6px;
  display: inline-block;
  width: fit-content;
  max-width: fit-content;
  font-weight: bold;
  opacity: 1 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.3px;
  border: 1px solid #8b0000;
}

/* Dark Mode für Geändert-Text - Weißer Text auf dunkelrotem Hintergrund */
body.dark-mode .changed-text.has-old-changed {
  color: #ffffff;
  background-color: #b71c1c;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  border: 1px solid #7f0000;
  opacity: 1 !important;
}

/* Geändert-Text auf markierten Zeilen */
.database-table tr.selected:not(.active-row) .changed-text.has-old-changed,
.database-table tr.selected-row:not(.active-row) .changed-text.has-old-changed {
  color: #ffffff !important;
  background-color: #222222 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9) !important;
  border: 2px solid #000000;
  padding: 3px 6px !important;
}

.database-table tr.active-row .changed-text.has-old-changed {
  color: #ffffff !important;
  background-color: rgba(50, 0, 0, 0.9) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9) !important;
  border: 2px solid #ffffff;
  padding: 3px 6px !important;
}

/* Dark Mode: Geändert-Text auf markierten Zeilen */
body.dark-mode .database-table tr.selected:not(.active-row) .changed-text.has-old-changed,
body.dark-mode .database-table tr.selected-row:not(.active-row) .changed-text.has-old-changed {
  color: #ffffff !important;
  background-color: #1a1a1a !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9) !important;
  border: 2px solid #444444;
  padding: 3px 6px !important;
}

body.dark-mode .database-table tr.active-row .changed-text.has-old-changed {
  color: #ffff00 !important;
  background-color: #1a0000 !important;
  text-shadow: 0 0 4px rgba(255, 255, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.9) !important;
  border: 2px solid #ffffff;
  padding: 3px 6px !important;
}

 