/* Admin Panel - ilk.online (Tailwind Ergaenzungen) */

/* === Login Screen - Glassmorphism === */
.login-screen {
  position: relative;
  overflow: hidden;
  background: var(--theme-bg, #0a0e17);
}

/* Animated background orbs */
.login-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

.login-orb-1 {
  width: 300px;
  height: 300px;
  background: var(--theme-accent, #4fc3f7);
  top: -80px;
  right: -60px;
  animation: loginOrbFloat1 8s ease-in-out infinite;
}

.login-orb-2 {
  width: 250px;
  height: 250px;
  background: #a855f7;
  bottom: -60px;
  left: -50px;
  animation: loginOrbFloat2 10s ease-in-out infinite;
}

.login-orb-3 {
  width: 180px;
  height: 180px;
  background: #f472b6;
  top: 40%;
  left: 60%;
  animation: loginOrbFloat3 6s ease-in-out infinite;
}

@keyframes loginOrbFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-30px, 20px) scale(1.1); }
  66% { transform: translate(15px, -15px) scale(0.9); }
}

@keyframes loginOrbFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(20px, -25px) scale(1.15); }
  66% { transform: translate(-15px, 10px) scale(0.85); }
}

@keyframes loginOrbFloat3 {
  0%, 100% { transform: scale(1); opacity: 0.2; }
  50% { transform: scale(1.3); opacity: 0.35; }
}

/* Glass card */
.login-card {
  position: relative;
  z-index: 1;
  padding: 2.5rem 2rem 2rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(40px) saturate(1.8);
  -webkit-backdrop-filter: blur(40px) saturate(1.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 1px 0 rgba(255, 255, 255, 0.08) inset;
  animation: loginCardAppear 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes loginCardAppear {
  from {
    opacity: 0;
    transform: scale(0.85) translateY(30px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Staggered fade-up animation */
.login-fade-up {
  animation: loginFadeUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) var(--delay, 0s) both;
}

@keyframes loginFadeUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Icon wrap with spinning ring */
.login-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
}

.login-icon-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  background: conic-gradient(from 0deg, var(--theme-accent, #4fc3f7), #a855f7, #f472b6, var(--theme-accent, #4fc3f7)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: loginRingSpin 4s linear infinite;
}

@keyframes loginRingSpin {
  to { transform: rotate(360deg); }
}

.login-icon-symbol {
  font-size: 1.8rem;
  color: var(--theme-accent, #4fc3f7);
  animation: loginIconPulse 2s ease-in-out infinite;
}

@keyframes loginIconPulse {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

/* Title gradient */
.login-title-gradient {
  background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Input fields */
.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-icon {
  position: absolute;
  left: 1rem;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.85rem;
  transition: color 0.3s ease;
  z-index: 2;
  pointer-events: none;
}

.login-input {
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: #fff;
  font-family: inherit;
  outline: none;
  transition: all 0.3s ease;
}

.login-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.login-input:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--theme-accent, #4fc3f7);
  box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.12), 0 0 20px rgba(79, 195, 247, 0.08);
}

.login-input-wrap:focus-within .login-input-icon {
  color: var(--theme-accent, #4fc3f7);
}

.login-input-glow {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--theme-accent, #4fc3f7), transparent);
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.login-input:focus ~ .login-input-glow {
  opacity: 1;
}

/* Error message */
.login-error-msg {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 12px;
  color: #fca5a5;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  text-align: center;
  animation: loginShake 0.4s ease;
}

.login-error-msg.info-msg {
  background: rgba(30, 58, 95, 0.2);
  border-color: #1e3a5f;
  color: #93c5fd;
  animation: none;
}

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

/* Submit button */
.login-submit-btn {
  position: relative;
  padding: 0.75rem;
  background: linear-gradient(135deg, var(--theme-accent, #4fc3f7), #a855f7);
  border: none;
  border-radius: 14px;
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  min-height: 44px;
}

.login-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(79, 195, 247, 0.25), 0 4px 12px rgba(168, 85, 247, 0.15);
}

.login-submit-btn:active {
  transform: translateY(0) scale(0.98);
}

.login-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.login-submit-text {
  position: relative;
  z-index: 2;
}

.login-submit-shimmer {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: loginShimmer 3s ease-in-out infinite;
  z-index: 1;
}

@keyframes loginShimmer {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

/* === Breadcrumb Navigation === */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: #4fc3f7;
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: #29b6f6;
  text-decoration: underline;
}

.breadcrumb-sep {
  color: #4b5563;
  font-size: 0.7rem;
}

.breadcrumb-current {
  color: #e5e7eb;
  font-weight: 600;
}

/* === Inline Form (statt Modal) === */
.inline-form-container {
  background: #111827;
  border: 1px solid #374151;
  border-radius: 0.75rem;
  padding: 1.5rem;
  max-width: 720px;
}

.inline-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #374151;
}

/* === Toggle Buttons (statt Dropdown) === */
.btn-toggle-group {
  display: flex;
  gap: 0;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid #374151;
}

.btn-toggle {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  background: #0a0e17;
  color: #9ca3af;
  border: none;
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-toggle:not(:last-child) {
  border-right: 1px solid #374151;
}

.btn-toggle:hover {
  background: #1f2937;
  color: #e5e7eb;
}

.btn-toggle.active {
  background: #4fc3f7;
  color: #0a0e17;
  font-weight: 600;
}

/* === Reusable component classes === */
.btn-primary-tw {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  background: #4fc3f7;
  color: #0a0e17;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s;
  border: none;
}
.btn-primary-tw:hover {
  background: #29b6f6;
}

.btn-secondary-tw {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  background: #1f2937;
  color: #e5e7eb;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s;
}
.btn-secondary-tw:hover {
  background: #4b5563;
}

.btn-danger-tw {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  background: #7f1d1d;
  border: 1px solid #7f1d1d;
  color: #fca5a5;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s;
}
.btn-danger-tw:hover {
  background: #991b1b;
}

.input-tw {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: #0a0e17;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  color: #e5e7eb;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s;
}
.input-tw:focus {
  border-color: #4fc3f7;
}

/* === Modal Form Elements (JS-generiert) === */
.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  color: #9ca3af;
  font-size: 0.875rem;
  margin-bottom: 0.35rem;
  font-weight: 500;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: #0a0e17;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  color: #e5e7eb;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #4fc3f7;
}
.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

/* === Hidden attribute overrides (Tailwind hidden + flex/grid conflict) === */
.modal-overlay[hidden],
.login-screen[hidden],
.admin-app[hidden],
[hidden] {
  display: none !important;
}

/* === Nav Items === */
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.5rem;
  color: #9ca3af;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  color: #e5e7eb;
  background: #1f2937;
}
.nav-item.active {
  color: #4fc3f7;
  border-left-color: #4fc3f7;
  background: rgba(79, 195, 247, 0.05);
}
.nav-icon {
  font-size: 1rem;
  width: 1.2rem;
  text-align: center;
}

/* Nav Submenu */
.nav-group {
  position: relative;
}
.nav-children {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  background: rgba(0, 0, 0, 0.15);
}
.nav-children.open {
  max-height: 200px;
}
.nav-sub-item {
  padding-left: 2.8rem !important;
  font-size: 0.82rem;
  border-left-width: 3px;
}
.nav-sub-item .nav-icon {
  font-size: 0.7rem;
}
.nav-chevron {
  transition: transform 0.25s;
}
.nav-children.open ~ a .nav-chevron,
.nav-group:has(.nav-children.open) > a .nav-chevron {
  transform: rotate(180deg);
}

/* === Data Tables === */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.data-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  color: #9ca3af;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #374151;
}
.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #1f2937;
}
.data-table tr:hover td {
  background: rgba(79, 195, 247, 0.02);
}

/* Drag&Drop Sortierung */
.sortable-row {
  transition: opacity 0.15s;
}
.sortable-row.dragging {
  opacity: 0.4;
}
.sortable-row.drag-over td {
  border-top: 2px solid #4fc3f7;
}
.drag-handle:hover {
  color: rgba(255, 255, 255, 0.6) !important;
}

/* === Status & Badges === */
.status-active {
  color: #34d399;
}
.status-inactive {
  color: #6b7280;
}
.badge-success {
  color: #34d399;
  font-weight: 600;
}
.badge-warning {
  color: #fbbf24;
  font-weight: 600;
}
.badge-danger {
  color: #f87171;
  font-weight: 600;
}
.badge-info {
  color: #4fc3f7;
  font-weight: 600;
}

/* === Filter Chips (Game Error Logs) === */
.filter-group-label {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  color: var(--theme-text-muted, #9ca3af);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 9999px;
  border: 1px solid var(--theme-border, #374151);
  background: transparent;
  color: var(--theme-text-muted, #9ca3af);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.filter-chip:hover {
  border-color: var(--theme-accent, #4fc3f7);
  color: var(--theme-text, #e5e7eb);
}

.filter-chip-active {
  background: var(--theme-accent, #4fc3f7);
  border-color: var(--theme-accent, #4fc3f7);
  color: #000;
  font-weight: 600;
}

.filter-chip-active:hover {
  opacity: 0.85;
  color: #000;
}

.filter-chip-error.filter-chip-active {
  background: #f87171;
  border-color: #f87171;
}

.filter-chip-warning.filter-chip-active {
  background: #fbbf24;
  border-color: #fbbf24;
}

.filter-chip-info.filter-chip-active {
  background: #4fc3f7;
  border-color: #4fc3f7;
}

.filter-chip-inline {
  font-size: 0.75rem;
  color: var(--theme-text-muted, #9ca3af);
}
.badge-default {
  color: #9ca3af;
  font-weight: 600;
}
.color-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  vertical-align: middle;
}
.actions {
  display: flex;
  gap: 0.4rem;
}

/* === Button legacy classes (used in JS-generated HTML) === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.2rem;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  background: #1f2937;
  color: #e5e7eb;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn:hover {
  background: #374151;
}
.btn-primary {
  background: #4fc3f7;
  color: #0a0e17;
  border-color: #4fc3f7;
  font-weight: 600;
}
.btn-primary:hover {
  background: #29b6f6;
}
.btn-danger {
  background: #991b1b;
  border-color: #991b1b;
  color: #fca5a5;
}
.btn-danger:hover {
  background: #b91c1c;
}
.btn-sm {
  padding: 0.35rem 0.8rem;
  font-size: 0.8rem;
}

/* === Messages === */
.error-msg {
  background: rgba(127, 29, 29, 0.2);
  border: 1px solid #7f1d1d;
  color: #fca5a5;
  padding: 0.75rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}
.info-msg {
  background: rgba(30, 58, 95, 0.2);
  border: 1px solid #1e3a5f;
  color: #93c5fd;
  padding: 0.75rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

/* === Toast === */
.toast {
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  animation: toastIn 0.3s ease;
  max-width: 350px;
}
.toast-success {
  background: #064e3b;
  color: #6ee7b7;
  border: 1px solid #065f46;
}
.toast-error {
  background: #7f1d1d;
  color: #fca5a5;
  border: 1px solid #991b1b;
}
.toast-info {
  background: #1e3a5f;
  color: #93c5fd;
  border: 1px solid #1e4d8a;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Passkeys Grid (used in JS) === */
.passkeys-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.passkey-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1f2937;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #374151;
}

/* === Hamburger Menu Toggle === */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  background: #111827;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  padding: 10px;
  cursor: pointer;
  width: 44px;
  height: 44px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
}

.sidebar-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #e5e7eb;
  border-radius: 2px;
  transition: all 0.3s;
}

.sidebar-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}
.sidebar-toggle.active span:nth-child(2) {
  opacity: 0;
}
.sidebar-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
}

/* === Sidebar Overlay (Mobile) === */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
}
.sidebar-overlay.active {
  display: block;
}

/* === Responsive === */
@media (max-width: 768px) {
  .admin-app {
    grid-template-columns: 1fr !important;
  }
  .sidebar {
    position: fixed;
    left: -250px;
    z-index: 100;
    transition: left 0.3s;
    width: 250px;
  }
  .sidebar.open {
    left: 0;
  }
  .sidebar-toggle {
    display: flex;
  }
  main {
    padding: 1rem !important;
    padding-top: 60px !important;
  }

  /* Responsive Tabellen als Karten */
  .data-table thead {
    display: none;
  }
  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td {
    display: block;
    width: 100%;
  }
  .data-table tr {
    margin-bottom: 0.75rem;
    background: #111827;
    border: 1px solid #374151;
    border-radius: 0.5rem;
    padding: 0.5rem;
  }
  .data-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .data-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #9ca3af;
    font-size: 0.8rem;
    text-transform: uppercase;
    flex-shrink: 0;
    margin-right: 0.5rem;
  }

  .input-tw {
    min-height: 44px;
    font-size: 16px;
  }
  .btn,
  .btn-primary-tw,
  .btn-secondary-tw,
  .btn-danger-tw {
    min-height: 44px;
  }

  .toast {
    max-width: none;
  }
}

/* === Drop-Zone fuer Bild-Upload === */
.drop-zone {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 140px;
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
}

.drop-zone:hover {
  border-color: rgba(79, 195, 247, 0.5);
  background: rgba(79, 195, 247, 0.05);
}

.drop-zone--over {
  border-color: #4fc3f7;
  background: rgba(79, 195, 247, 0.1);
}

.drop-zone-text {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.85rem;
  text-align: center;
  line-height: 1.5;
  pointer-events: none;
}

.drop-zone-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.drop-zone-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  background: rgba(239, 83, 80, 0.9);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.drop-zone-remove:hover {
  background: #ef5350;
}

/* === Medien-Verwaltung === */
.media-upload-zone {
  margin-bottom: 1.5rem;
}

.drop-zone-media {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 160px;
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s;
  background: rgba(0, 0, 0, 0.2);
  padding: 2rem;
}

.drop-zone-media:hover {
  border-color: rgba(79, 195, 247, 0.5);
  background: rgba(79, 195, 247, 0.05);
}

.drop-zone-media.drag-over {
  border-color: #4fc3f7;
  background: rgba(79, 195, 247, 0.1);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.media-card {
  background: #111827;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  overflow: hidden;
  transition: border-color 0.2s;
}

.media-card:hover {
  border-color: #4fc3f7;
}

.media-card-preview {
  width: 100%;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0e17;
  overflow: hidden;
  position: relative;
}

.media-card-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-card-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-card-preview .media-icon {
  font-size: 2.5rem;
  color: #4b5563;
}

.media-card-info {
  padding: 0.6rem 0.75rem;
}

.media-card-name {
  font-size: 0.8rem;
  color: #e5e7eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.25rem;
}

.media-card-meta {
  font-size: 0.7rem;
  color: #6b7280;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.media-card-actions {
  padding: 0.4rem 0.75rem 0.6rem;
  display: flex;
  gap: 0.4rem;
}

.media-upload-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: #111827;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.media-upload-item .progress-bar {
  flex: 1;
  height: 6px;
  background: #1f2937;
  border-radius: 3px;
  overflow: hidden;
}

.media-upload-item .progress-bar-fill {
  height: 100%;
  background: #4fc3f7;
  border-radius: 3px;
  transition: width 0.3s;
}

@media (max-width: 768px) {
  .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

/* === Notifications === */
.notification-area-sidebar {
  position: relative;
}
.notification-bell-sidebar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: none;
  border: none;
  color: #9ca3af;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  transition:
    color 0.2s,
    background 0.2s;
  position: relative;
  text-align: left;
}
.notification-bell-sidebar:hover {
  color: #e5e7eb;
  background: rgba(79, 195, 247, 0.08);
}
.notification-bell-sidebar i {
  font-size: 0.95rem;
  width: 20px;
  text-align: center;
}
.notification-badge {
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  border-radius: 99px;
  padding: 0 4px;
  margin-left: auto;
}
.notification-dropdown-sidebar {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 8px;
  width: 320px;
  max-height: 400px;
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  z-index: 100;
}
.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #374151;
  color: #e5e7eb;
  font-size: 0.85rem;
}
.notification-clear {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 4px;
}
.notification-clear:hover {
  color: #4fc3f7;
}
.notification-list {
  max-height: 340px;
  overflow-y: auto;
}
.notification-empty {
  padding: 24px 16px;
  text-align: center;
  color: #6b7280;
  font-size: 0.85rem;
}
.notification-item {
  display: flex;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(55, 65, 81, 0.5);
  cursor: pointer;
  transition: background 0.15s;
}
.notification-item:hover {
  background: rgba(79, 195, 247, 0.05);
}
.notification-item.unread {
  background: rgba(79, 195, 247, 0.08);
}
.notification-item .notif-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}
.notification-item .notif-icon.info {
  background: rgba(79, 195, 247, 0.15);
  color: #4fc3f7;
}
.notification-item .notif-icon.warning {
  background: rgba(251, 146, 60, 0.15);
  color: #fb923c;
}
.notification-item .notif-icon.success {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
}
.notification-item .notif-text {
  flex: 1;
  min-width: 0;
}
.notification-item .notif-title {
  font-size: 0.8rem;
  color: #e5e7eb;
  margin-bottom: 2px;
}
.notification-item .notif-time {
  font-size: 0.7rem;
  color: #6b7280;
}

/* Notification Banner */
.notification-banner {
  margin-bottom: 16px;
  padding: 10px 16px;
  border-radius: 8px;
  background: rgba(79, 195, 247, 0.1);
  border: 1px solid rgba(79, 195, 247, 0.2);
  color: #e5e7eb;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: banner-slide-in 0.3s ease-out;
}
.notification-banner .banner-close {
  margin-left: auto;
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  font-size: 1rem;
  padding: 0 4px;
}
.notification-banner .banner-close:hover {
  color: #e5e7eb;
}
@keyframes banner-slide-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Theme System Overrides ===
   Mappt alle hardcoded Farben auf CSS Custom Properties aus themes.css */

/* Backgrounds */
.inline-form-container,
.media-card,
.media-upload-item,
.data-table tr@media-card {
  background: var(--theme-bg-secondary);
}

.inline-form-container {
  background: var(--theme-bg-secondary);
  border-color: var(--theme-border);
}
.btn-secondary-tw,
.btn,
.passkey-item,
.nav-item:hover {
  background: var(--theme-bg-tertiary);
}

.btn-toggle,
.input-tw,
.form-group input,
.form-group select,
.form-group textarea,
.media-card-preview {
  background: var(--theme-bg);
}

/* Borders */
.inline-form-actions,
.btn-toggle-group,
.btn-toggle:not(:last-child),
.btn-secondary-tw,
.btn,
.passkey-item,
.data-table th,
.sidebar-toggle,
.media-card,
.media-upload-item,
.notification-dropdown-sidebar,
.notification-header,
.input-tw,
.form-group input,
.form-group select,
.form-group textarea {
  border-color: var(--theme-border);
}

/* Accent */
.breadcrumb a,
.nav-item.active,
.badge-info,
.notification-clear:hover {
  color: var(--theme-accent);
}

.btn-primary-tw,
.btn-primary,
.btn-toggle.active,
.progress-bar-fill {
  background: var(--theme-accent);
}

.btn-primary {
  border-color: var(--theme-accent);
}
.btn-toggle.active {
  color: var(--theme-bg);
}
.btn-primary-tw,
.btn-primary {
  color: var(--theme-bg);
}

.nav-item.active {
  border-left-color: var(--theme-accent);
  background: var(--theme-accent-glow);
}
.data-table tr:hover td {
  background: var(--theme-accent-glow);
}
.sortable-row.drag-over td {
  border-top-color: var(--theme-accent);
}

.input-tw:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.media-card:hover {
  border-color: var(--theme-accent);
}

.drop-zone:hover,
.drop-zone-media:hover {
  border-color: color-mix(in srgb, var(--theme-accent) 50%, transparent);
}
.drop-zone--over,
.drop-zone-media.drag-over {
  border-color: var(--theme-accent);
}

.notification-bell-sidebar:hover {
  background: var(--theme-accent-glow);
}
.notification-banner {
  background: var(--theme-accent-glow);
  border-color: color-mix(in srgb, var(--theme-accent) 20%, transparent);
}
.notification-item:hover {
  background: var(--theme-accent-glow);
}
.notification-item.unread {
  background: var(--theme-accent-glow);
}
.notification-item .notif-icon.info {
  background: var(--theme-accent-glow);
  color: var(--theme-accent);
}

/* Text */
.nav-item,
.form-group label,
.data-table th,
.notification-bell-sidebar,
.data-table td::before {
  color: var(--theme-text-muted);
}

.breadcrumb-current,
.btn-toggle:hover,
.nav-item:hover,
.notification-header {
  color: var(--theme-text);
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar-toggle {
    background: var(--theme-bg-secondary);
    border-color: var(--theme-border);
  }
  .data-table tr {
    background: var(--theme-bg-secondary);
    border-color: var(--theme-border);
  }
}

/* Notification dropdown */
.notification-dropdown-sidebar {
  background: var(--theme-bg-tertiary);
}

/* Media cards */
.media-card {
  background: var(--theme-bg-secondary);
  border-color: var(--theme-border);
}
.media-upload-item {
  background: var(--theme-bg-secondary);
  border-color: var(--theme-border);
}
.media-upload-item .progress-bar {
  background: var(--theme-bg-tertiary);
}
.media-upload-item .progress-bar-fill {
  background: var(--theme-accent);
}

/* === Theme Picker === */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.theme-card {
  position: relative;
  border: 2px solid var(--theme-border);
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  transition:
    border-color 0.2s,
    transform 0.15s;
}
.theme-card:hover {
  border-color: var(--theme-text-muted);
  transform: translateY(-2px);
}
.theme-card.active {
  border-color: var(--theme-accent);
}
.theme-card.active::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: 8px;
  right: 10px;
  color: var(--theme-accent);
  font-size: 0.85rem;
}
.theme-card-name {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 8px;
}
.theme-card-colors {
  display: flex;
  gap: 4px;
  height: 24px;
  border-radius: 6px;
  overflow: hidden;
}
.theme-card-colors span {
  flex: 1;
  border-radius: 4px;
}

/* === Media Picker Modal === */
.media-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.media-picker-item {
  position: relative;
  aspect-ratio: 1;
  border: 2px solid var(--theme-border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition:
    border-color 0.2s,
    transform 0.15s;
}
.media-picker-item:hover {
  border-color: var(--theme-accent);
  transform: scale(1.03);
}
.media-picker-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-picker-item .picker-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3px 6px;
  font-size: 0.65rem;
  background: rgba(0, 0, 0, 0.7);
  color: #e5e5e5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Audio-Picker Items */
.media-picker-audio {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  aspect-ratio: 1;
  padding: 8px;
}
.media-picker-audio .media-picker-audio-icon {
  font-size: 2rem;
  color: var(--theme-accent, #4fc3f7);
}
.media-picker-audio .picker-name {
  position: static;
  background: none;
  text-align: center;
  font-size: 0.65rem;
  color: #ccc;
  word-break: break-all;
}
.media-picker-play-btn {
  background: rgba(79, 195, 247, 0.15);
  border: 1px solid rgba(79, 195, 247, 0.3);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  color: var(--theme-accent, #4fc3f7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  transition: background 0.2s;
}
.media-picker-play-btn:hover {
  background: rgba(79, 195, 247, 0.3);
}

/* === Log Viewer === */
.log-entries {
  max-height: 75vh;
  overflow-y: auto;
}
.log-entry {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.8rem;
}
.log-entry:last-child {
  border-bottom: none;
}
.log-entry-header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 4px;
}
.log-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.log-level-error .log-badge,
.log-badge.log-level-error {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}
.log-level-warning .log-badge,
.log-badge.log-level-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}
.log-level-info .log-badge,
.log-badge.log-level-info {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}
.log-entry.log-level-error {
  border-left: 3px solid #ef4444;
}
.log-entry.log-level-warning {
  border-left: 3px solid #f59e0b;
}
.log-entry.log-level-info {
  border-left: 3px solid #3b82f6;
}
.log-entry-debug {
  border-left: 3px solid #6b7280;
}
.log-category {
  color: #9ca3af;
  font-size: 0.7rem;
  font-weight: 500;
}
.log-time {
  color: #6b7280;
  font-size: 0.7rem;
  font-family: 'Courier New', monospace;
}
.log-method {
  color: #6b7280;
  font-size: 0.7rem;
  font-family: 'Courier New', monospace;
}
.log-ip {
  color: #4b5563;
  font-size: 0.65rem;
}
.log-message {
  color: #e5e7eb;
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  word-break: break-all;
}
.log-context {
  margin-top: 4px;
}
.log-context-pre {
  background: rgba(0, 0, 0, 0.3);
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 0.7rem;
  color: #9ca3af;
  overflow-x: auto;
  margin-top: 4px;
  white-space: pre-wrap;
  word-break: break-all;
}
.log-entry-debug code {
  color: #9ca3af;
  font-size: 0.75rem;
  word-break: break-all;
}

/* === Vehicle Asset Variants === */
.va-asset-card {
  position: relative;
  width: 100px;
  border: 2px solid #374151;
  border-radius: 10px;
  background: #111827;
  cursor: pointer;
  transition:
    transform 0.2s,
    border-color 0.2s,
    box-shadow 0.2s;
  overflow: hidden;
  animation: vaFadeIn 0.25s ease-out;
}

.va-asset-card:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.va-asset-selected {
  border-color: #166534;
}

.va-asset-selected:hover {
  border-color: #dc2626;
  box-shadow: 0 4px 20px rgba(220, 38, 38, 0.2);
}

.va-asset-available:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.2);
}

.va-asset-thumb {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-conic-gradient(#1a1a2e 0% 25%, #16213e 0% 50%) 0 0 / 12px 12px;
  padding: 6px;
}

.va-asset-thumb img {
  max-width: 80px;
  max-height: 60px;
  object-fit: contain;
  image-rendering: pixelated;
}

.va-asset-label {
  font-size: 0.65rem;
  color: #9ca3af;
  text-align: center;
  padding: 4px 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-top: 1px solid #1f2937;
  background: #0d1117;
}

.va-asset-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}

.va-asset-card:hover .va-asset-badge {
  opacity: 1;
}

.va-badge-add {
  background: #166534;
  color: #4ade80;
  border: 1px solid #22c55e;
}

.va-badge-remove {
  background: #7f1d1d;
  color: #f87171;
  border: 1px solid #ef4444;
}

@keyframes vaFadeIn {
  from {
    opacity: 0;
    transform: scale(0.85) translateY(6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.va-animating-out {
  animation: vaFadeOut 0.2s ease-in forwards;
}

@keyframes vaFadeOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.7);
  }
}
