.ws-toast-stack {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 0.85rem);
  right: 0.85rem;
  z-index: 11050;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: min(22rem, calc(100vw - 1.7rem));
  pointer-events: none;
}

body.has-staff-bar.device-desktop .ws-toast-stack,
body.has-staff-bar.device-tablet .ws-toast-stack {
  top: calc(var(--staff-topbar-h, 72px) + var(--staff-bar-h, 2.85rem) + 0.65rem);
}

body.device-mobile .ws-toast-stack {
  top: calc(env(safe-area-inset-top, 0px) + 3.75rem);
}

.ws-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.8rem 0.85rem;
  border-radius: 14px;
  border: 1px solid transparent;
  background: rgba(4, 12, 28, 0.94);
  color: #f8fafc;
  box-shadow: 0 14px 36px rgba(4, 12, 28, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transform: translateY(-0.45rem) scale(0.96);
  opacity: 0;
  transition:
    opacity 0.24s ease,
    transform 0.28s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.ws-toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.ws-toast.is-leaving {
  opacity: 0;
  transform: translateY(-0.35rem) scale(0.96);
}

.ws-toast-icon {
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.1rem;
}

.ws-toast-body {
  flex: 1;
  min-width: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  font-weight: 600;
}

.ws-toast-close {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.ws-toast-close:hover {
  background: rgba(255, 255, 255, 0.16);
}

.ws-toast--success {
  border-color: rgba(34, 197, 94, 0.35);
  background: linear-gradient(135deg, rgba(6, 44, 28, 0.96), rgba(8, 58, 36, 0.94));
}

.ws-toast--success .ws-toast-icon {
  color: #4ade80;
}

.ws-toast--error {
  border-color: rgba(248, 113, 113, 0.35);
  background: linear-gradient(135deg, rgba(58, 10, 16, 0.96), rgba(76, 12, 20, 0.94));
}

.ws-toast--error .ws-toast-icon {
  color: #fca5a5;
}

.ws-toast--warning {
  border-color: rgba(251, 191, 36, 0.35);
  background: linear-gradient(135deg, rgba(58, 40, 6, 0.96), rgba(76, 52, 8, 0.94));
}

.ws-toast--warning .ws-toast-icon {
  color: #fcd34d;
}

.ws-toast--info {
  border-color: rgba(96, 165, 250, 0.35);
  background: linear-gradient(135deg, rgba(8, 24, 58, 0.96), rgba(12, 34, 78, 0.94));
}

.ws-toast--info .ws-toast-icon {
  color: #93c5fd;
}

.ws-toast-confirm {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.97);
  color: #f8fafc;
  box-shadow: 0 16px 40px rgba(4, 12, 28, 0.34);
  transform: translateY(-0.45rem) scale(0.96);
  opacity: 0;
  transition:
    opacity 0.24s ease,
    transform 0.28s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.ws-toast-confirm.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.ws-toast-confirm-text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  font-weight: 600;
}

.ws-toast-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.ws-toast-confirm-btn {
  padding: 0.45rem 0.95rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: transparent;
  color: #cbd5e1;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.ws-toast-confirm-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.ws-toast-confirm-btn--primary {
  border-color: transparent;
  background: #2563eb;
  color: #fff;
}

.ws-toast-confirm-btn--primary:hover {
  background: #1d4ed8;
}

.ws-toast-confirm-btn--danger {
  border-color: transparent;
  background: #dc2626;
  color: #fff;
}

.ws-toast-confirm-btn--danger:hover {
  background: #b91c1c;
}