.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  background: rgb(244, 244, 249);
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(88, 111, 124, 0.2);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  max-width: 400px;
  pointer-events: all;
  animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s;
  position: relative;
  overflow: hidden;
}
.toast::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
}
.toast.success::before {
  background: rgb(4, 114, 77);
}
.toast.success .toast-icon {
  color: rgb(4, 114, 77);
}
.toast.error::before {
  background: #dc3545;
}
.toast.error .toast-icon {
  color: #dc3545;
}
.toast.warning::before {
  background: #FFA500;
}
.toast.warning .toast-icon {
  color: #FFA500;
}
.toast.info::before {
  background: rgb(184, 219, 217);
}
.toast.info .toast-icon {
  color: rgb(88, 111, 124);
}
.toast .toast-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}
.toast .toast-content {
  flex: 1;
}
.toast .toast-content .toast-title {
  font-weight: 600;
  color: rgb(88, 111, 124);
  margin-bottom: 4px;
}
.toast .toast-content .toast-message {
  font-size: 0.9rem;
  color: rgba(88, 111, 124, 0.8);
}
.toast .toast-close {
  background: transparent;
  border: none;
  color: rgba(88, 111, 124, 0.5);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.toast .toast-close:hover {
  background: rgba(88, 111, 124, 0.1);
  color: rgb(88, 111, 124);
}
.toast .toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(88, 111, 124, 0.2);
  animation: progressBar 3s linear;
}

@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateX(400px);
  }
}
@keyframes progressBar {
  from { width: 100%; }
  to { width: 0%; }
}
/* Desktop - account for sidebar */
@media (min-width: 768px) {
  body.has-sidebar .toast-container {
    right: 20px;
    max-width: calc(100vw - 320px);
  }

  /* When sidebar is active on desktop */
  .navbar-sidebar.active ~ * .toast-container,
  body.sidebar-open .toast-container {
    right: 20px;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .toast-container {
    right: 10px;
    left: 10px;
    top: 10px;
    z-index: 999999;
  }
  .toast {
    min-width: unset;
    max-width: unset;
    width: 100%;
  }
}