.dashboard-container {
  background-color: var(--bg-sidebar);
  border-radius: 2rem;
  color: var(--text-color);
  box-shadow: var(--shadow);
}

@media (max-width: 768px) {
  .dashboard-container {
    border-radius: 1rem;
    padding: 1rem !important;
    margin: 0.5rem !important;
  }

  .kpi-card {
    padding: 1rem !important;
    gap: 0.75rem !important;
  }

  .icon-box {
    width: 40px !important;
    height: 40px !important;
  }

  .icon-box .material-symbols-outlined {
    font-size: 20px !important;
  }

  .h4,
  h4 {
    font-size: 1.1rem !important;
  }

  h2 {
    font-size: 1.5rem !important;
  }
}

@media (max-width: 480px) {
  .row.g-2 > [class^="col-"] {
    padding-left: 4px;
    padding-right: 4px;
  }

  .dashboard-container {
    padding: 0.75rem !important;
  }
}

.violetter-gradient-button {
  font-size: 20px;
  vertical-align: middle;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border: none;
  border-radius: 0.75rem;
  padding: 0.75rem 2rem;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
  color: hsl(0, 0%, 95%);
}

.btn-close {
  background-color: var(--bg-hover-color) !important;
  border-radius: 50px !important;
  padding: 0.75rem !important;
  background-size: 0.8rem !important;
}

.btn-close:hover {
  background-color: rgba(255, 255, 255, 0.4) !important;
  transform: rotate(90deg) !important;
}

.rund {
  animation: glowPulse 2s infinite alternate ease-in-out;
  border-radius: 50%;
  border: 2px solid #60a5fa;
  /* Initial Light Blue border */
}

@keyframes glowPulse {
  0% {
    border-color: #60a5fa;
    /* Light Blue */
    box-shadow:
      0 0 4px rgba(96, 165, 250, 0.5),
      inset 0 0 2px rgba(96, 165, 250, 0.2);
  }

  100% {
    border-color: #a78bfa;
    /* Violet */
    box-shadow:
      0 0 12px rgba(167, 139, 250, 0.6),
      inset 0 0 6px rgba(167, 139, 250, 0.3);
  }
}

.modern-modal .btn-outline-secondary {
  background: white;
  color: #64748b;
  border: 1.5px solid #cbd5e0;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
}

.modern-modal .btn-outline-secondary:hover {
  background: #f1f5f9;
  color: #475569;
  border-color: #94a3b8;
}

/* The Main Dropdown Menu Wrapper */
.s-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 1rem !important;
  box-shadow:
    0 10px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
  padding: 0.5rem !important;
  z-index: 2000 !important;

  /* Animation Properties */
  opacity: 0;
  transform: translateY(10px);
  visibility: hidden;
  transition:
    opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.25s;
  pointer-events: none;
}

/* Visibility State */
.s-dropdown-menu.open {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}

/* Dropdown Alignment Variants */
.s-dropdown-left {
  left: 0;
  right: auto;
}
.s-dropdown-center {
  left: 50%;
  right: auto;
  transform: translateX(-50%) translateY(10px);
}
.s-dropdown-center.open {
  transform: translateX(-50%) translateY(0);
}

/* Dropdown Items */
.s-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.75rem;
  text-decoration: none;
  color: var(--text-color) !important;
  font-size: 0.925rem;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.s-dropdown-item:hover {
  background: var(--bg-hover-color) !important;
  color: #6366f1 !important; /* Modern Purple */
  transform: translateX(4px);
}

.s-dropdown-item .material-symbols-outlined {
  font-size: 20px;
  color: #6366f1;
}

/* Logout Specific Variation */
.s-dropdown-item.danger:hover {
  background: #fef2f2 !important;
  color: #ef4444 !important;
}
.s-dropdown-item.danger .material-symbols-outlined {
  color: inherit;
}

/* Divider */
.s-dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.5rem;
  opacity: 0.5;
}

/* Header/Label inside dropdown */
.s-dropdown-header {
  padding: 0.4rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.05em;
}

/* The Trigger Button Logic (Optional Arrow Rotation) */
.s-trigger-active .dropdown-arrow {
  transform: rotate(180deg);
}
.dropdown-arrow {
  transition: transform 0.3s ease;
}

/* Optional: Unified Trigger Styles */
.s-dropdown-trigger {
  background: var(--bg-card) !important;
  border: 1.5px solid var(--border-color) !important;
  border-radius: 0.75rem !important;
  padding: 0.5rem 1.25rem;
  color: var(--modal-color-text-muted) !important;
  font-weight: 400 !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease !important;
  gap: 0.5rem;
}

.s-dropdown-trigger:hover {
  border-color: #6366f1 !important;
  background: var(--bg-hover-color) !important;
}

/* Swiperoo Dropdown (wiederverwendbar) */
.swiperoo-dropdown .dropdown-toggle {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 0.4rem 0.9rem;
  color: var(--modal-color-text-muted);
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}
.swiperoo-dropdown .dropdown-toggle:hover {
  border-color: #6366f1;
  background: var(--bg-hover-color);
}
.swiperoo-dropdown .dropdown-toggle .dropdown-arrow {
  transition: transform 0.3s ease;
}
.swiperoo-dropdown .dropdown-toggle.show .dropdown-arrow {
  transform: rotate(180deg);
}
/* Hide Bootstrap caret so only material arrow is visible */
.swiperoo-dropdown .dropdown-toggle::after {
  display: none !important;
  content: none;
}

.swiperoo-dropdown .dropdown-menu {
  min-width: 220px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 0.75rem;
  box-shadow:
    0 10px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.1);
  padding: 0.4rem;
  z-index: 3050;
}

.swiperoo-dropdown .dropdown-item {
  border-radius: 0.65rem;
  padding: 0.55rem 0.75rem;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.2s ease;
}
.swiperoo-dropdown .dropdown-item:hover {
  background: var(--bg-hover-color);
  color: #6366f1;
  transform: translateX(2px);
}
