/* =================================================================
   📝 ARTIKEL-NOTIZEN - Notizzettel-Design
   ================================================================= */

/* Notizen-Lasche: Immer sichtbar am Bildschirmrand */
.notizen-lasche {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: 50px;
  height: 50px;
  background: var(--accent-color, #ffcc00);
  border-top: 2px solid var(--border-color, #ddd);
  border-left: 2px solid var(--border-color, #ddd);
  border-right: 2px solid var(--border-color, #ddd);
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: move;
  z-index: 1001; /* Höher als Resizer (1000), damit Notiz-Button über verschiebbarem Mittelbalken liegt */
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);
  margin-left: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease; /* ⚡ Nur transform/shadow, schneller! */
  user-select: none;
  touch-action: none;
  will-change: transform; /* ⚡ GPU-Beschleunigung */
}

.notizen-lasche.dragging {
  cursor: grabbing !important;
  opacity: 0.9;
  transition: none !important; /* ⚡ Keine Transition beim Ziehen = instant! */
  z-index: 1002; /* Höher als normal, damit beim Ziehen auch über Resizer liegt */
  will-change: transform, left; /* ⚡ GPU-Optimierung während Drag */
}

.notizen-lasche.dragging:hover {
  transform: none; /* Kein Hover-Effekt beim Ziehen */
}

.notizen-lasche:hover {
  background: var(--accent-hover, #ffd700);
  /* ⚡ KEIN transform mehr - kein Springen! */
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.2);
}

.notizen-lasche::before {
  content: '📝';
  font-size: 24px;
  transition: transform 0.3s ease;
}

.notizen-lasche.collapsed::before {
  transform: rotate(180deg);
}

/* Badge für Notizen-Anzahl (analog zu department-filter-badge) */
.notizen-lasche-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: #ff4444;
  color: white;
  border-radius: 10px;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  line-height: 1.1;
  z-index: 1002; /* Höher als Lasche (1001), damit Badge über allem liegt */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  border: 2px solid var(--background-color, #ffffff);
  white-space: nowrap;
  text-align: center;
  padding-top: 2px;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  user-select: none;
}

.notizen-lasche-badge:hover {
  transform: scale(1.8);
  z-index: 1003; /* Noch höher beim Hover */
  background-color: #ff2222;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  font-size: 12px;
}

.notizen-lasche:hover .notizen-lasche-badge {
  border-color: #ff2222;
  border-width: 1px;
  box-shadow: 0 0 8px rgba(255, 34, 34, 0.4);
}

/* ⚡ Notizen-Hinweis Animation: Badge pulsiert & leuchtet (Kombiniert) */
@keyframes notizHintPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    background-color: #ff4444;
  }
  25% {
    transform: scale(1.3);
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.8), 0 0 30px rgba(255, 204, 0, 0.6);
    background-color: #ffcc00;
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.6), 0 0 25px rgba(255, 204, 0, 0.4);
    background-color: #ffaa00;
  }
  75% {
    transform: scale(1.3);
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.8), 0 0 30px rgba(255, 204, 0, 0.6);
    background-color: #ffcc00;
  }
  100% {
    transform: scale(1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    background-color: #ff4444;
  }
}

.notizen-lasche-badge.notiz-hint-pulse {
  animation: notizHintPulse 1.5s ease-in-out;
  animation-iteration-count: 1;
  z-index: 1003; /* ⚡ Badge über allem während Animation (höher als Resizer 1000) */
}

/* Dark Mode Anpassung für Badge */
body.dark-mode .notizen-lasche-badge {
  border-color: var(--dark-background, #1a1a1a);
  background-color: #ff5555;
}

body.dark-mode .notizen-lasche:hover .notizen-lasche-badge {
  border-color: #ff3333;
  box-shadow: 0 0 8px rgba(255, 51, 51, 0.4);
}

/* Notizen-Container: Am unteren Rand rechts neben der Mittellinie */
.notizen-container {
  position: fixed;
  left: calc(50% + 10px + 50px); /* Starte rechts neben der Lasche */
  right: 0;
  bottom: 0;
  width: 350px;
  max-height: 40vh;
  background: var(--bg-secondary, #f5f5f5);
  border-top: 2px solid var(--border-color, #ddd);
  border-left: 2px solid var(--border-color, #ddd);
  display: flex;
  flex-direction: column;
  z-index: 1001; /* Höher als Resizer (1000), damit Container über verschiebbarem Mittelbalken liegt */
  overflow-y: auto;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.15s ease-out, left 0.15s ease-out; /* ⚡ Noch schneller! */
  will-change: transform, left; /* ⚡ GPU-Beschleunigung */
}

.notizen-container.dragging {
  transition: none !important; /* ⚡ Keine Transition beim Ziehen = instant! */
  will-change: transform, left; /* ⚡ GPU während Drag */
  z-index: 1002; /* Höher als normal, damit beim Ziehen auch über Resizer liegt */
}

/* Kollabierbar: Versteckt den Container */
.notizen-container.collapsed {
  transform: translateY(100%);
}

/* Notizen-Header */
.notizen-header {
  padding: 16px;
  background: var(--bg-primary, #fff);
  border-bottom: 2px solid var(--border-color, #ddd);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}

.notizen-title {
  font-size: 18px;
  font-weight: bold;
  color: var(--text-primary, #333);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.notizen-title::before {
  content: attr(data-count);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--text-color, #333);
  color: var(--bg-primary, #fff);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  line-height: 1;
  margin-right: 8px;
}

.notizen-title:not([data-count])::before,
.notizen-title[data-count="0"]::before {
  content: '0';
}

.notizen-header-actions {
  display: flex;
  gap: 8px;
}

.notizen-toggle-btn {
  background: transparent;
  border: 1px solid var(--border-color, #ddd);
  border-radius: 4px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 20px;
  color: var(--text-primary, #333);
  transition: transform 0.1s ease, background 0.15s ease, color 0.15s ease; /* ⚡ Schneller! */
  min-width: 32px;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  line-height: 1;
  will-change: transform; /* ⚡ GPU */
}

.notizen-toggle-btn:hover {
  background: var(--bg-hover, #e0e0e0);
  color: #d32f2f;
  border-color: #d32f2f;
}

.notizen-toggle-btn:active {
  transform: scale(0.92) !important; /* ⚡ Sofortiges visuelles Feedback */
  transition: transform 0.05s ease !important; /* ⚡ Instant! */
}

/* Historie-Button (gleich groß wie + Button) */
.notizen-history-btn {
  background: var(--bg-secondary, #f5f5f5) !important;
  border: 2px solid var(--border-color, #ddd) !important;
  color: var(--text-primary, #333) !important;
  font-weight: bold;
  font-size: 18px !important;
  padding: 8px 14px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
  border-radius: 6px !important;
  transition: transform 0.1s ease, background 0.15s ease, box-shadow 0.15s ease; /* ⚡ Schneller! */
  cursor: pointer;
  line-height: 1;
  will-change: transform; /* ⚡ GPU */
}

.notizen-history-btn:hover {
  background: #e8f5e9 !important;
  border-color: #4CAF50 !important;
  color: #4CAF50 !important;
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3) !important;
}

.notizen-history-btn:active {
  transform: scale(0.92) !important; /* ⚡ Sofortiges visuelles Feedback */
  transition: transform 0.05s ease !important; /* ⚡ Instant! */
}

/* Add-Button (Grün für "Hinzufügen") */
.notizen-add-btn {
  background: #4CAF50 !important;
  border: 2px solid #4CAF50 !important;
  color: white !important;
  font-weight: bold;
  font-size: 24px !important;
  padding: 8px 14px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 2px 6px rgba(76, 175, 80, 0.4) !important;
  border-radius: 6px !important;
  transition: transform 0.1s ease, background 0.15s ease, box-shadow 0.15s ease; /* ⚡ Schneller! */
  cursor: pointer;
  line-height: 1;
  will-change: transform; /* ⚡ GPU */
}

.notizen-add-btn:hover {
  background: #45a049 !important;
  border-color: #45a049 !important;
  color: white !important;
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.6) !important;
}

.notizen-add-btn:active {
  transform: scale(0.92) !important; /* ⚡ Sofortiges visuelles Feedback */
  transition: transform 0.05s ease !important; /* ⚡ Instant! */
}

.notizen-add-btn.disabled,
.notizen-add-btn:disabled {
  background: #cccccc !important;
  border-color: #cccccc !important;
  color: #666666 !important;
  cursor: not-allowed !important;
  opacity: 0.5 !important;
  transform: none !important;
  box-shadow: none !important;
}

.notizen-add-btn.disabled:hover,
.notizen-add-btn:disabled:hover {
  background: #cccccc !important;
  border-color: #cccccc !important;
  transform: none !important;
  box-shadow: none !important;
}

/* Notizen-Liste */
.notizen-list {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.notizen-list.empty {
  justify-content: center;
  align-items: center;
  color: var(--text-secondary, #999);
  font-style: italic;
}

/* Notizzettel-Design */
.notiz-item {
  background: white; /* Standard-Hintergrund, wird durch nth-child überschrieben */
  border: 1px solid #eee;
  border-radius: 4px;
  padding: 12px;
  position: relative;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  transform: rotate(calc(var(--rotation, 0) * 1deg));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  max-width: 100%;
  word-wrap: break-word;
}

/* Zufällige Rotation für Notizzettel-Effekt */
.notiz-item.notiz-color-0 {
  --rotation: -1.5;
  background: #f0f4f8; /* Bläulich */
  border-color: #d0d8e0;
}

.notiz-item.notiz-color-1 {
  --rotation: 1.5;
  background: #f8f0f4; /* Rötlich */
  border-color: #e0d0d8;
}

.notiz-item.notiz-color-2 {
  --rotation: -1;
  background: #f0f8f4; /* Grünlich */
  border-color: #d0e0d8;
}

.notiz-item.notiz-color-3 {
  --rotation: 0.5;
  background: #f8f8f0; /* Gelblich */
  border-color: #e0e0d0;
}

.notiz-item.notiz-color-4 {
  --rotation: -0.5;
  background: #f4f0f8; /* Lila */
  border-color: #d8d0e0;
}

.notiz-item.notiz-color-5 {
  --rotation: 1;
  background: #f8f4f0; /* Orange */
  border-color: #e0d8d0;
}

.notiz-item:nth-child(3n) {
  --rotation: -1;
}

.notiz-item:hover {
  transform: rotate(0deg) scale(1.02);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 5;
}

/* Notiz-Header (Erstellt von, Datum) */
.notiz-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.notiz-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--text-secondary, #666);
}

.notiz-erstellt-von {
  font-weight: bold;
  color: var(--text-primary, #333);
}

.notiz-datum {
  color: var(--text-secondary, #666);
}

.notiz-bearbeitet {
  font-size: 10px;
  color: var(--text-secondary, #999);
  font-style: italic;
  margin-top: 2px;
}

/* Notiz-Actions (Bearbeiten, Löschen) */
.notiz-actions {
  display: flex;
  gap: 4px;
}

.notiz-action-btn {
  background: transparent;
  border: none;
  padding: 4px 6px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary, #666);
  border-radius: 3px;
  transition: all 0.2s ease;
  opacity: 0.7;
}

.notiz-item:hover .notiz-action-btn {
  opacity: 1;
}

.notiz-action-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--text-primary, #333);
}

.notiz-action-btn.delete:hover {
  color: #d32f2f;
  background: rgba(211, 47, 47, 0.1);
}

/* Notiz-Text */
.notiz-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary, #333);
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 0;
}

/* Notiz-Editor (Modal/Dialog) */
.notiz-editor-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.notiz-editor {
  background: var(--bg-primary, #fff);
  border-radius: 8px;
  padding: 24px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.notiz-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.notiz-editor-title {
  font-size: 20px;
  font-weight: bold;
  color: var(--text-primary, #333);
  margin: 0;
}

.notiz-editor-close {
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-secondary, #666);
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.notiz-editor-close:hover {
  background: var(--bg-hover, #e0e0e0);
  color: var(--text-primary, #333);
}

.notiz-editor-textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  border: 2px solid var(--border-color, #ddd);
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  color: var(--text-primary, #333);
  background: var(--bg-primary, #fff);
}

.notiz-editor-textarea:focus {
  outline: none;
  border-color: var(--accent-color, #ffcc00);
}

.notiz-editor-textarea:disabled {
  background: var(--bg-secondary, #f5f5f5);
  cursor: not-allowed;
}

.notiz-editor-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.notiz-editor-counter {
  font-size: 12px;
  color: var(--text-secondary, #666);
}

.notiz-editor-counter.warning {
  color: #f57c00;
}

.notiz-editor-counter.error {
  color: #d32f2f;
  font-weight: bold;
}

.notiz-editor-actions {
  display: flex;
  gap: 8px;
}

.notiz-editor-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

.notiz-editor-btn.cancel {
  background: var(--bg-secondary, #f5f5f5);
  color: var(--text-primary, #333);
  border: 1px solid var(--border-color, #ddd);
}

.notiz-editor-btn.cancel:hover {
  background: var(--bg-hover, #e0e0e0);
}

.notiz-editor-btn.save {
  background: var(--accent-color, #ffcc00);
  color: var(--text-primary, #333);
}

.notiz-editor-btn.save:hover {
  background: var(--accent-hover, #ffd700);
}

.notiz-editor-btn.save:disabled {
  background: var(--bg-secondary, #f5f5f5);
  color: var(--text-secondary, #999);
  cursor: not-allowed;
}

/* Loading State */
.notizen-loading {
  padding: 24px;
  text-align: center;
  color: var(--text-secondary, #999);
}

.notizen-error {
  padding: 24px;
  text-align: center;
  color: #d32f2f;
  background: rgba(211, 47, 47, 0.1);
  border-radius: 4px;
  margin: 16px;
}

/* Notiz-Icon in Datenbankansicht */
.database-table-row .notiz-icon {
  display: none; /* Standardmäßig versteckt */
  margin-left: 6px;
  font-size: 14px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  vertical-align: middle;
}

.database-table-row .notiz-icon.has-notes {
  display: inline-block; /* Zeige nur wenn Notizen vorhanden */
  color: #ffcc00;
  opacity: 1;
}

.database-table-row:hover .notiz-icon.has-notes {
  opacity: 1;
  transform: scale(1.1);
}

/* Dark Mode Support */
body.dark-mode .notizen-lasche {
  background: var(--accent-color, #ffcc00);
  border-color: var(--border-color-dark, #444);
}

body.dark-mode .notizen-lasche:hover {
  background: var(--accent-hover, #ffd700);
}

body.dark-mode .notizen-container {
  background: var(--bg-secondary-dark, #2a2a2a);
  border-top-color: var(--border-color-dark, #444);
  border-left-color: var(--border-color-dark, #444);
}

body.dark-mode .notizen-header {
  background: var(--bg-primary-dark, #1e1e1e);
  border-bottom-color: var(--border-color-dark, #444);
}

body.dark-mode .notiz-item {
  background: #2a2a2a;
  border-color: #444;
  color: var(--text-primary-dark, #fff);
}

body.dark-mode .notiz-item.notiz-color-0 {
  background: #2a2f35; /* Bläulich */
  border-color: #3a4a55;
}

body.dark-mode .notiz-item.notiz-color-1 {
  background: #352a2f; /* Rötlich */
  border-color: #554a3a;
}

body.dark-mode .notiz-item.notiz-color-2 {
  background: #2a352f; /* Grünlich */
  border-color: #3a554a;
}

body.dark-mode .notiz-item.notiz-color-3 {
  background: #35352a; /* Gelblich */
  border-color: #55553a;
}

body.dark-mode .notiz-item.notiz-color-4 {
  background: #2f2a35; /* Lila */
  border-color: #4a3a55;
}

body.dark-mode .notiz-item.notiz-color-5 {
  background: #352f2a; /* Orange */
  border-color: #554a3a;
}

body.dark-mode .notiz-meta {
  color: var(--text-secondary-dark, #aaa);
}

body.dark-mode .notiz-editor {
  background: var(--bg-primary-dark, #1e1e1e);
  color: var(--text-primary-dark, #fff);
}

body.dark-mode .notiz-editor-textarea {
  background: var(--bg-secondary-dark, #2a2a2a);
  border-color: var(--border-color-dark, #444);
  color: var(--text-primary-dark, #fff);
}

body.dark-mode .notizen-history-btn {
  background: var(--bg-secondary-dark, #2a2a2a) !important;
  border-color: var(--border-color-dark, #444) !important;
  color: var(--text-primary-dark, #fff) !important;
}

body.dark-mode .notizen-history-btn:hover {
  background: #1b5e20 !important;
  border-color: #4CAF50 !important;
  color: #4CAF50 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .notizen-lasche {
    left: 50% !important; /* Überschreibe gespeicherte Position auf mobil */
    transform: translateX(-50%);
    margin-left: 0 !important;
  }
  
  .notizen-container {
    width: 100%;
    max-width: 100%;
    left: 0 !important;
    right: 0;
    margin-left: 0;
    max-height: 50vh;
  }
  
  .notizen-container.collapsed {
    transform: translateY(100%);
  }
}

/* Print: Notizen verstecken */
@media print {
  .notizen-lasche {
    display: none !important;
  }
  
  .notizen-container {
    display: none !important;
  }
  
  .notiz-icon {
    display: none !important;
  }
}

/* =================================================================
   📝 NOTIZEN-PANEL (Filter-Button)
   ================================================================= */

/* Notizen Filter Button - Kreis mit Anzahl */
.notizen-button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}

.notizen-count-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--text-color, #333);
  color: var(--bg-primary, #fff);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  line-height: 1;
  flex-shrink: 0;
}

body.dark-mode .notizen-count-circle {
  background: var(--text-color, #fff);
  color: var(--bg-primary, #333);
}

.notizen-button.active .notizen-count-circle {
  background: var(--bg-primary, #fff);
  color: var(--primary-color, #333);
}

/* 🔧 FIX: Notizen-Panel als echtes Modal-Overlay */
.notizen-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10500; /* Höher als Kollaborationsliste */
  display: none;
  justify-content: center;
  align-items: center;
  cursor: pointer; /* Zeigt an, dass man auf Overlay klicken kann */
}

/* Inner Content Box */
.notizen-panel > .notizen-panel-header,
.notizen-panel > .notizen-panel-content {
  /* Diese werden in einem Wrapper sein */
}

/* Wrapper für Panel-Inhalt (verschiebbar wie Windows-Fenster) */
.notizen-panel-wrapper {
  background: var(--bg-primary, #fff);
  border: 2px solid var(--border-color, #ddd);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: default;
  /* Transition für sanftes Erscheinen */
  transition: box-shadow 0.2s ease;
}

/* Beim Ziehen: Schatten verstärken */
.notizen-panel-wrapper.dragging {
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
  opacity: 0.95;
  transition: none;
}

/* Fallback: Wenn Header direkt im Panel (ohne Wrapper) */
.notizen-panel > .notizen-panel-header {
  background: var(--bg-primary, #fff);
  border-radius: 8px 8px 0 0;
  cursor: default;
}

.notizen-panel > .notizen-panel-content {
  background: var(--bg-primary, #fff);
  border-radius: 0 0 8px 8px;
  cursor: default;
}

/* Verhindere, dass Klicks auf Content das Panel schließen */
.notizen-panel-header,
.notizen-panel-content {
  cursor: default;
}

.notizen-panel-header {
  padding: 16px 20px;
  background: var(--bg-secondary, #f5f5f5);
  border-bottom: 2px solid var(--border-color, #ddd);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  cursor: move;
  user-select: none;
  border-radius: 6px 6px 0 0;
}

/* Hover-Effekt für Header (zeigt an dass verschiebbar) */
.notizen-panel-header:hover {
  background: var(--bg-hover, #e8e8e8);
}

/* Beim Ziehen */
.notizen-panel-wrapper.dragging .notizen-panel-header {
  background: var(--bg-hover, #e0e0e0);
  cursor: grabbing;
}

/* Drag-Indikator im Header */
.notizen-panel-drag-indicator {
  color: var(--text-secondary, #999);
  font-size: 16px;
  letter-spacing: -2px;
  margin-right: 8px;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.notizen-panel-header:hover .notizen-panel-drag-indicator {
  opacity: 1;
  color: var(--text-primary, #666);
}

body.dark-mode .notizen-panel-drag-indicator {
  color: var(--text-secondary-dark, #777);
}

body.dark-mode .notizen-panel-header:hover .notizen-panel-drag-indicator {
  color: var(--text-primary-dark, #ccc);
}

.notizen-panel-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: bold;
  color: var(--text-primary, #333);
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.notizen-panel-close {
  background: transparent;
  border: 2px solid transparent;
  font-size: 28px;
  cursor: pointer;
  color: var(--text-secondary, #666);
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.15s ease;
  line-height: 1;
  font-weight: bold;
}

.notizen-panel-close:hover {
  background: rgba(211, 47, 47, 0.1);
  color: #d32f2f;
  border-color: #d32f2f;
  transform: scale(1.1);
}

.notizen-panel-close:active {
  transform: scale(0.95);
  background: rgba(211, 47, 47, 0.2);
}

.notizen-panel-close:focus {
  outline: none;
  border-color: #d32f2f;
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.3);
}

/* Dark Mode Close Button */
body.dark-mode .notizen-panel-close {
  color: var(--text-secondary-dark, #aaa);
}

body.dark-mode .notizen-panel-close:hover {
  background: rgba(255, 68, 68, 0.2);
  color: #ff6b6b;
  border-color: #ff6b6b;
}

body.dark-mode .notizen-panel-close:focus {
  border-color: #ff6b6b;
  box-shadow: 0 0 0 3px rgba(255, 68, 68, 0.3);
}

.notizen-panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  /* Pinnwand/Kork-Hintergrund */
  background: 
    linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(135deg, #f5f0e6 0%, #e8e0d0 100%);
  background-size: 20px 20px, 20px 20px, 100% 100%;
}

body.dark-mode .notizen-panel-content {
  background: 
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(135deg, #2a2520 0%, #1f1a15 100%);
  background-size: 20px 20px, 20px 20px, 100% 100%;
}

.notizen-loading,
.notizen-empty,
.notizen-error {
  padding: 24px;
  text-align: center;
  color: var(--text-secondary, #999);
}

.notizen-error {
  color: #d32f2f;
  background: rgba(211, 47, 47, 0.1);
  border-radius: 4px;
}

/* Notizen-Liste im Panel - Grid für Sticky Notes */
.notizen-panel-content .notizen-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
  padding: 16px;
}

/* =================================================================
   🗒️ STICKY NOTE DESIGN - Post-it-Zettel-Look
   ================================================================= */

.notiz-item-card {
  position: relative;
  padding: 28px 20px 20px 20px;
  min-height: 180px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  /* Leichte Rotation für authentischen Look */
  transform: rotate(calc(var(--rotation, 0) * 1deg));
  /* Sticky Note Schatten - wie angeklebt */
  box-shadow: 
    3px 4px 12px rgba(0, 0, 0, 0.18),
    0 0 1px rgba(0, 0, 0, 0.1);
  /* Linierte Papier-Optik */
  background-image: 
    repeating-linear-gradient(
      transparent,
      transparent 27px,
      rgba(0, 0, 0, 0.03) 27px,
      rgba(0, 0, 0, 0.03) 28px
    );
  background-position: 0 70px;
}


/* AbtNr Badge - oben links (klickbar für Filter) */
.notiz-abtnr-badge {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 14px;
  font-weight: 800;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.15);
  color: inherit;
  opacity: 0.85;
  z-index: 2;
  border-radius: 3px 0 8px 0;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.notiz-abtnr-badge:hover {
  background: rgba(0, 0, 0, 0.3);
  opacity: 1;
}

.notiz-abtnr-badge.active-filter {
  background: rgba(255, 255, 255, 0.3);
  color: #fff;
  opacity: 1;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

/* Filter-Info Banner */
.notizen-filter-info {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  margin-bottom: 8px;
  color: #fff;
  font-size: 14px;
}

.notizen-filter-info span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notizen-filter-clear {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
}

.notizen-filter-clear:hover {
  background: rgba(255, 100, 100, 0.4);
}

/* Klebeband-Streifen oben (Standard) */
.notiz-item-card::after {
  content: '';
  position: absolute;
  top: -6px;
  height: 20px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0.25) 50%,
    rgba(255, 255, 255, 0.4) 100%
  );
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  transform: rotate(var(--tape-rotation, 0deg));
}

/* 🎉 Witzige Befestigungen (Dino-Pflaster, Sticker, etc.) */
.notiz-item-card.notiz-funny-attachment::after {
  content: attr(data-funny);
  background: none !important;
  box-shadow: none !important;
  width: auto !important;
  height: auto !important;
  font-size: 28px;
  top: -14px;
  left: 50% !important;
  transform: translateX(-50%) rotate(calc(var(--notiz-hue, 0) * 0.1deg - 5deg)) !important;
  filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.3));
  animation: funny-wobble 3s ease-in-out infinite;
  z-index: 5;
}

@keyframes funny-wobble {
  0%, 100% { transform: translateX(-50%) rotate(calc(var(--notiz-hue, 0) * 0.1deg - 5deg)) scale(1); }
  25% { transform: translateX(-50%) rotate(calc(var(--notiz-hue, 0) * 0.1deg - 2deg)) scale(1.05); }
  50% { transform: translateX(-50%) rotate(calc(var(--notiz-hue, 0) * 0.1deg - 8deg)) scale(1); }
  75% { transform: translateX(-50%) rotate(calc(var(--notiz-hue, 0) * 0.1deg - 3deg)) scale(1.03); }
}

/* Verschiedene Klebeband-Varianten */
.notiz-item-card.notiz-color-0::after {
  --tape-rotation: -2deg;
  left: 35%;
  width: 70px;
}

.notiz-item-card.notiz-color-1::after {
  --tape-rotation: 3deg;
  left: 55%;
  width: 55px;
  transform: translateX(-50%) rotate(var(--tape-rotation));
}

.notiz-item-card.notiz-color-2::after {
  --tape-rotation: -1deg;
  left: 25%;
  width: 80px;
}

.notiz-item-card.notiz-color-3::after {
  --tape-rotation: 2deg;
  left: 45%;
  width: 60px;
}

.notiz-item-card.notiz-color-4::after {
  --tape-rotation: -3deg;
  left: 60%;
  width: 50px;
  transform: translateX(-50%) rotate(var(--tape-rotation));
}

.notiz-item-card.notiz-color-5::after {
  --tape-rotation: 1deg;
  left: 30%;
  width: 75px;
}

.notiz-item-card.notiz-color-6::after {
  --tape-rotation: -1.5deg;
  left: 40%;
  width: 65px;
}

.notiz-item-card.notiz-color-7::after {
  --tape-rotation: 2.5deg;
  left: 50%;
  width: 58px;
  transform: translateX(-50%) rotate(var(--tape-rotation));
}

.notiz-item-card.notiz-color-8::after {
  --tape-rotation: -0.5deg;
  left: 35%;
  width: 72px;
}

.notiz-item-card.notiz-color-9::after {
  --tape-rotation: 1.8deg;
  left: 55%;
  width: 52px;
  transform: translateX(-50%) rotate(var(--tape-rotation));
}

.notiz-item-card.notiz-color-10::after {
  --tape-rotation: -2.5deg;
  left: 28%;
  width: 68px;
}

.notiz-item-card.notiz-color-11::after {
  --tape-rotation: 0.8deg;
  left: 48%;
  width: 62px;
}

/* 🎨 Dynamische Sticky Note Farben - basierend auf AbtNr */
.notiz-item-card.notiz-dynamic-color {
  background-color: var(--notiz-bg, #fff59d);
  background-image: 
    repeating-linear-gradient(
      transparent,
      transparent 27px,
      rgba(0, 0, 0, 0.04) 27px,
      rgba(0, 0, 0, 0.04) 28px
    );
  color: var(--notiz-text, #4a4000);
  --rotation: calc(sin(var(--notiz-hue, 0) * 0.1) * 2deg);
}

body.dark-mode .notiz-item-card.notiz-dynamic-color {
  background-color: var(--notiz-bg-dark, #5c5520);
  color: var(--notiz-text-dark, #fff9c4);
}

/* Klebeband für dynamische Farben */
.notiz-item-card.notiz-dynamic-color::after {
  --tape-rotation: calc(sin(var(--notiz-hue, 0) * 0.05) * 3deg);
  left: calc(30% + sin(var(--notiz-hue, 0) * 0.1) * 20%);
  width: calc(55px + sin(var(--notiz-hue, 0) * 0.08) * 20px);
}

/* 🎨 Fallback: Klassische Post-it Farben für Kompatibilität */
.notiz-item-card.notiz-color-0 {
  --rotation: -1.2;
  background-color: #fff59d; /* Klassisch Gelb */
  background-image: 
    repeating-linear-gradient(
      transparent,
      transparent 27px,
      rgba(0, 0, 0, 0.04) 27px,
      rgba(0, 0, 0, 0.04) 28px
    );
  color: #4a4000;
}

.notiz-item-card.notiz-color-1 {
  --rotation: 0.8;
  background-color: #f8bbd9; /* Rosa */
  background-image: 
    repeating-linear-gradient(
      transparent,
      transparent 27px,
      rgba(0, 0, 0, 0.04) 27px,
      rgba(0, 0, 0, 0.04) 28px
    );
  color: #6a1039;
}

.notiz-item-card.notiz-color-2 {
  --rotation: -0.6;
  background-color: #c5e1a5; /* Grün */
  background-image: 
    repeating-linear-gradient(
      transparent,
      transparent 27px,
      rgba(0, 0, 0, 0.04) 27px,
      rgba(0, 0, 0, 0.04) 28px
    );
  color: #2d5016;
}

.notiz-item-card.notiz-color-3 {
  --rotation: 0.5;
  background-color: #81d4fa; /* Blau */
  background-image: 
    repeating-linear-gradient(
      transparent,
      transparent 27px,
      rgba(0, 0, 0, 0.04) 27px,
      rgba(0, 0, 0, 0.04) 28px
    );
  color: #01579b;
}

.notiz-item-card.notiz-color-4 {
  --rotation: -0.9;
  background-color: #ce93d8; /* Lila */
  background-image: 
    repeating-linear-gradient(
      transparent,
      transparent 27px,
      rgba(0, 0, 0, 0.04) 27px,
      rgba(0, 0, 0, 0.04) 28px
    );
  color: #4a1259;
}

.notiz-item-card.notiz-color-5 {
  --rotation: 1.1;
  background-color: #ffcc80; /* Orange */
  background-image: 
    repeating-linear-gradient(
      transparent,
      transparent 27px,
      rgba(0, 0, 0, 0.04) 27px,
      rgba(0, 0, 0, 0.04) 28px
    );
  color: #e65100;
}

.notiz-item-card.notiz-color-6 {
  --rotation: -0.7;
  background-color: #b0bec5; /* Grau-Blau */
  background-image: 
    repeating-linear-gradient(
      transparent,
      transparent 27px,
      rgba(0, 0, 0, 0.04) 27px,
      rgba(0, 0, 0, 0.04) 28px
    );
  color: #37474f;
}

.notiz-item-card.notiz-color-7 {
  --rotation: 0.9;
  background-color: #f48fb1; /* Pink */
  background-image: 
    repeating-linear-gradient(
      transparent,
      transparent 27px,
      rgba(0, 0, 0, 0.04) 27px,
      rgba(0, 0, 0, 0.04) 28px
    );
  color: #880e4f;
}

.notiz-item-card.notiz-color-8 {
  --rotation: -1.3;
  background-color: #a5d6a7; /* Hell-Grün */
  background-image: 
    repeating-linear-gradient(
      transparent,
      transparent 27px,
      rgba(0, 0, 0, 0.04) 27px,
      rgba(0, 0, 0, 0.04) 28px
    );
  color: #1b5e20;
}

.notiz-item-card.notiz-color-9 {
  --rotation: 0.4;
  background-color: #90caf9; /* Hell-Blau */
  background-image: 
    repeating-linear-gradient(
      transparent,
      transparent 27px,
      rgba(0, 0, 0, 0.04) 27px,
      rgba(0, 0, 0, 0.04) 28px
    );
  color: #0d47a1;
}

.notiz-item-card.notiz-color-10 {
  --rotation: -0.5;
  background-color: #ffe082; /* Bernstein */
  background-image: 
    repeating-linear-gradient(
      transparent,
      transparent 27px,
      rgba(0, 0, 0, 0.04) 27px,
      rgba(0, 0, 0, 0.04) 28px
    );
  color: #ff6f00;
}

.notiz-item-card.notiz-color-11 {
  --rotation: 1.4;
  background-color: #b39ddb; /* Hell-Lila */
  background-image: 
    repeating-linear-gradient(
      transparent,
      transparent 27px,
      rgba(0, 0, 0, 0.04) 27px,
      rgba(0, 0, 0, 0.04) 28px
    );
  color: #4527a0;
}

/* Hover: Zettel "hebt sich" */
.notiz-item-card:hover {
  transform: rotate(0deg) scale(1.02) translateY(-6px);
  box-shadow: 
    6px 8px 24px rgba(0, 0, 0, 0.22),
    0 0 2px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.notiz-item-card:active {
  transform: rotate(0deg) scale(1.01) translateY(-3px);
}

/* Ausgewählte Notiz-Karte */
.notiz-item-card.notiz-selected {
  transform: rotate(0deg) scale(1.03) translateY(-6px);
  box-shadow: 
    0 0 0 3px #4caf50,
    6px 8px 24px rgba(0, 0, 0, 0.3);
  z-index: 20;
}

/* Grünes Häkchen oben rechts */
.notiz-item-card.notiz-selected::after {
  content: '✓';
  position: absolute;
  top: -8px;
  right: -8px;
  width: 32px;
  height: 32px;
  background: #4caf50;
  color: #fff;
  border-radius: 50%;
  font-size: 20px;
  font-weight: bold;
  font-style: normal;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  border: 3px solid #fff;
}

/* Text-Styling für Sticky Notes */
.notiz-item-card .notiz-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.notiz-item-card .notiz-header-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.notiz-item-card .notiz-artnr {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.3px;
}

.notiz-item-card .notiz-ean {
  font-size: 14px;
  opacity: 0.9;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* Warengruppe - volle Breite unter dem Header */
.notiz-item-card > .notiz-warengruppe {
  font-size: 13px;
  opacity: 0.9;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  color: #ffffff;
}

/* Bezeichnung - volle Breite unter dem Header */
.notiz-item-card > .notiz-bezeichnung {
  font-size: 14px;
  opacity: 1;
  line-height: 1.4;
  word-break: break-word;
  margin: 0 0 12px 0;
  color: #ffffff;
  font-weight: 500;
  width: 100%;
}

.notiz-item-card .notiz-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
  margin-left: 16px;
  margin-top: 2px;
}

.notiz-item-card .notiz-date {
  font-size: 11px;
  opacity: 0.8;
  text-align: right;
  white-space: nowrap;
  font-weight: 500;
}

.notiz-item-card .notiz-author {
  font-size: 11px;
  opacity: 0.7;
  text-align: right;
  font-style: italic;
}

/* Container für alle Notizen eines Artikels */
.notiz-item-card .notiz-entries {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Einzelne Notiz innerhalb eines Artikels */
.notiz-item-card .notiz-entry {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  border-left: 4px solid rgba(255, 255, 255, 0.4);
  padding: 12px 14px;
}

.notiz-item-card .notiz-entry-additional {
  border-top: 1px dashed rgba(255, 255, 255, 0.3);
}

.notiz-item-card .notiz-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 11px;
  opacity: 0.8;
}

.notiz-item-card .notiz-entry-author {
  font-style: italic;
}

.notiz-item-card .notiz-entry-date {
  opacity: 0.7;
}

.notiz-item-card .notiz-text {
  font-size: 16px;
  line-height: 1.5;
  font-weight: 600;
  word-break: break-word;
  font-style: italic;
  letter-spacing: 0.2px;
  color: #ffffff;
}

/* Anzeige wenn mehrere Notizen */
.notiz-item-card .notiz-count {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 600;
}

.notiz-item-card .notiz-meta {
  font-size: 11px;
  opacity: 0.6;
  border-top: 2px solid rgba(0, 0, 0, 0.1);
  padding-top: 10px;
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.notiz-item-card .notiz-meta span {
  opacity: 0.9;
  font-style: italic;
}

.notiz-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.notiz-artnr {
  font-weight: bold;
  font-size: 16px;
  color: var(--text-primary, #333);
}

.notiz-date {
  font-size: 12px;
  color: var(--text-secondary, #666);
}

.notiz-bezeichnung {
  font-size: 14px;
  color: var(--text-secondary, #666);
  margin-bottom: 8px;
  font-style: italic;
}

.notiz-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary, #333);
  white-space: pre-wrap;
  word-wrap: break-word;
  margin-bottom: 12px;
}

.notiz-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--text-secondary, #666);
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.notiz-meta span {
  display: block;
}

/* Dark Mode für Notizen-Panel */
body.dark-mode .notizen-panel {
  background: rgba(0, 0, 0, 0.7);
}

body.dark-mode .notizen-panel-wrapper {
  background: var(--bg-primary-dark, #1e1e1e);
  border-color: var(--border-color-dark, #444);
}

body.dark-mode .notizen-panel-header {
  background: var(--bg-secondary-dark, #2a2a2a);
  border-bottom-color: var(--border-color-dark, #444);
}

body.dark-mode .notizen-panel-header:hover {
  background: #383838;
}

body.dark-mode .notizen-panel-wrapper.dragging .notizen-panel-header {
  background: #404040;
}

/* 🌙 Dark Mode Sticky Notes - Gedämpftere aber immer noch farbige Versionen */
body.dark-mode .notiz-item-card {
  box-shadow: 
    2px 3px 12px rgba(0, 0, 0, 0.4),
    0 0 1px rgba(0, 0, 0, 0.3);
}

body.dark-mode .notiz-item-card::before {
  border-right-color: rgba(0, 0, 0, 0.2);
}

body.dark-mode .notiz-item-card::after {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
}

body.dark-mode .notiz-item-card.notiz-color-0 {
  background-color: #5c5520; /* Gedämpftes Gelb */
  color: #fff9c4;
}

body.dark-mode .notiz-item-card.notiz-color-1 {
  background-color: #5c2540; /* Gedämpftes Rosa */
  color: #fce4ec;
}

body.dark-mode .notiz-item-card.notiz-color-2 {
  background-color: #2d4a2d; /* Gedämpftes Grün */
  color: #dcedc8;
}

body.dark-mode .notiz-item-card.notiz-color-3 {
  background-color: #1a4a5c; /* Gedämpftes Blau */
  color: #b3e5fc;
}

body.dark-mode .notiz-item-card.notiz-color-4 {
  background-color: #4a2a5c; /* Gedämpftes Lila */
  color: #e1bee7;
}

body.dark-mode .notiz-item-card.notiz-color-5 {
  background-color: #5c4020; /* Gedämpftes Orange */
  color: #ffe0b2;
}

body.dark-mode .notiz-item-card.notiz-color-6 {
  background-color: #37474f; /* Gedämpftes Grau-Blau */
  color: #cfd8dc;
}

body.dark-mode .notiz-item-card.notiz-color-7 {
  background-color: #6a1b4d; /* Gedämpftes Pink */
  color: #f8bbd9;
}

body.dark-mode .notiz-item-card.notiz-color-8 {
  background-color: #2e5a30; /* Gedämpftes Hell-Grün */
  color: #c8e6c9;
}

body.dark-mode .notiz-item-card.notiz-color-9 {
  background-color: #1a4a6e; /* Gedämpftes Hell-Blau */
  color: #bbdefb;
}

body.dark-mode .notiz-item-card.notiz-color-10 {
  background-color: #5c4a20; /* Gedämpftes Bernstein */
  color: #ffecb3;
}

body.dark-mode .notiz-item-card.notiz-color-11 {
  background-color: #4a3a6e; /* Gedämpftes Hell-Lila */
  color: #d1c4e9;
}

body.dark-mode .notiz-item-card .notiz-item-header {
  border-bottom-color: rgba(255, 255, 255, 0.15);
}

body.dark-mode .notiz-item-card .notiz-meta {
  border-top-color: rgba(255, 255, 255, 0.15);
}

body.dark-mode .notiz-item-card:hover {
  box-shadow: 
    4px 6px 20px rgba(0, 0, 0, 0.5),
    0 0 2px rgba(0, 0, 0, 0.3);
}

body.dark-mode .notiz-text {
  color: var(--text-primary-dark, #fff);
}

body.dark-mode .notiz-bezeichnung {
  color: var(--text-secondary-dark, #aaa);
}

/* Responsive Design für Notizen-Panel */
@media (max-width: 768px) {
  .notizen-panel {
    width: 95%;
    max-height: 90vh;
  }
  
  .notizen-panel-header h3 {
    font-size: 18px;
  }
}

